On 2018-10-18 10:48 AM, Jon Paris wrote:
You can't do this right now but you could set an arbitrary high limit and then use the result of a count over sys columns for the table with %SubArry to restrict the number you access.

In this case though you appear to be building the null map for a known file - so why not just use Extname with the *null option and have the compiler generate the list you want?

To get an array of int(5) SQL-type nulls, you could code like this (assuming v7r3).

dcl-ds ORDD30WF1_nullinds extname(ORDD30WF1:*null) end-ds;
dcl-s gF1Null int(5) dim(%size(ORDD30WF1_nullinds));

There's an RFE: "Option for EXTNAME/LIKEREC(*NULL) to create SQL-type int(5) indicator subfields"
https://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=97462

With that enhancement, you could code something like this:

dcl-ds ORDD30WF1_nulls extname(ORDD30WF1:*sqlnull) end-ds;

The subfields of the data structure would be int(5) subfields with the same names as the fields in the file.


This thread ...

Follow-Ups:
Replies:

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

This mailing list archive is Copyright 1997-2019 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].