× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Well if I thought my code was "going through RPG runtime",  then I would
try ALWNULL(*USRCTL) and %NULLIND(field) in that (RPG) code!

Here is DDS for a little file named "NULLFILE".

     A          R NULLFILER
     A            AAAAA          5A
     A            BBBBB          5A         ALWNULL
     A            CCCCC          5A         ALWNULL
     A            DDDDD          5A

And here is a little MI program that writes four records with some null
maps to "NULLFILE".
Note the comment about null maps!  Try this, and then look at "DSPPFM
NULLFILE".

DCL SPCPTR ?ODP      AUTO;
DCL DD     DNLOFF    BAS(?ODP) POS(17) BIN(4);
DCL SPCPTR ?INREC    AUTO;
DCL SPCPTR ?OUTREC   AUTO;
DCL DD     OUTREC    BAS(?OUTREC) CHAR(32767);
DCL DD     *         AUTO CHAR(80);
DCL DD     FILE      AUTO CHAR(10) INIT("NULLFILE");
DCL DD     *         AUTO BIN(2) INIT(-72);
DCL DD     LIBR      AUTO CHAR(10) INIT("*LIBL");
DCL DD     *         AUTO BIN(2) INIT(-73);
DCL DD     *         AUTO CHAR(20) INIT;
DCL DD     INDEX     AUTO BIN(2);
DCL DD     FLAGS     AUTO CHAR(2) INIT(X"8010");
DCL DD     VERSION   AUTO CHAR(4) INIT("0100");
DCL DD     MARK      AUTO BIN(4);
DCL DD     FLAG3     AUTO CHAR(1) INIT(X"00");
DCL DD     *         AUTO CHAR(3);
DCL DD     FLAG4     AUTO CHAR(1) INIT(X"02"); /* USE NULL MAPS! */
DCL DD     *         AUTO CHAR(19);
DCL DD     *         AUTO BIN(2) INIT(7);
DCL DD     *         AUTO BIN(2) INIT(1);
DCL DD     *         AUTO BIN(2) INIT(1);
DCL DD     *         AUTO CHAR(10) INIT("NULLFILER");
DCL DD     *         AUTO CHAR(13) INIT("36844F6B4E175");
DCL DD     FINAL     AUTO BIN(2) INIT(32767);
DCL DD     TYPE      AUTO CHAR(4) INIT(X"00000005");
DCL DD     CONTROL   AUTO CHAR(1) INIT(X"01");
DCL DD     *         AUTO BIN(2) INIT(10);
DCL DD     *         AUTO CHAR(10) INIT("NULLFILER");
DCL DD     *         AUTO CHAR(1) INIT(X"FF");
DCL SPCPTR ?UFCB     AUTO INIT(?ODP);
DCL SPCPTR ?TYPE     AUTO INIT(TYPE);
DCL SPCPTR ?CONTROL  AUTO INIT(CONTROL);
DCL OL     IOLIST    (?UFCB, ?TYPE, ?CONTROL) ARG;
DCL OL     OCLIST    (?UFCB) ARG;
DCL SPCPTR ?SEPT     BASPCO;
DCL SYSPTR ?OS(5500) BAS(?SEPT);
DCL MSPPTR ?M;
DCL DD     EPT(256)  BAS(?M) POS(5) CHAR(130);
DCL DD     PUT(256)  DEF(EPT) POS(29) BIN(2) AEO(130);
DCL DD     X         AUTO BIN(4);

CALLX      ?OS(12), OCLIST, *;
ADDSPP     ?M, ?ODP, DNLOFF;
CPYNV      X, PUT(INDEX);
CAT        OUTREC(1:24), "aaaaabbbbbcccccddddd", "0100";
CALLX      ?OS(X), IOLIST, *;
CAT        OUTREC(1:24), "eeeeefffffggggghhhhh", "0000";
CALLX      ?OS(X), IOLIST, *;
CAT        OUTREC(1:24), "iiiiijjjjjkkkkklllll", "0110";
CALLX      ?OS(X), IOLIST, *;
CAT        OUTREC(1:24), "mmmmmnnnnnoooooppppp", "0010";
CALLX      ?OS(X), IOLIST, *;
CALLX      ?OS(11), OCLIST, *;
PEND;



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.