I'd need to know how to find that a program was compiled with ALWNULL(*USRCTL) (or whatever which one).
Command DSPPGM doesn't seem to give that info.
We're running V7r1.
Thank you.
I'd need to know how to find that a program was compiled with ALWNULL(*USRCTL) (or whatever which one).
Command DSPPGM doesn't seem to give that info.
We're running V7r1.
Thank you.
There's no way to tell from a program (or from a module) what ALWNULL parameter it was compiled with.
Revealing why the question is being asked, might allow for a response that better addresses the real needs; i.e. except for having encountered an error, there is unlikely to be any need\desire to know how the program was compiled. If the impetus for making the inquiry was an unexpected error condition, then perhaps a more appropriate question might be directed there instead.?
While not a visible attribute, manifest via neither a Display (DSP) feature nor a Retrieve (RTV) feature, the setting can be inferred from the run-time effects for the Open of a database file member by the RPG program. The indication of whether the RPG run-time had intended to open the member using the Allow-Nulls capability would be revealed in the Open Data Path (ODP) created for that Open; of course if the compiler was told to effect ALWNULL(*USRCTL), but the run-time failed to do so, that likely would be a defect and the inference would be inconclusive. FWiW the RPG DUMP feature will manifest that value as the "Null Capable Field File" attribute\setting in the "OPEN FEEDBACK" for the ODP of actual file.mbr that was opened.
Perhaps more can be gleaned from my replies here:
http://archive.midrange.com/rpg400-l/201504/msg00020.html
http://archive.midrange.com/rpg400-l/201504/msg00022.html
I'm not sure what the purpose is, however you could try this approach if the object's source is on your system. The object may tell you (depending on how the object is compiled) where the source is, so you could write a program to get that meta information from the object, and then have the program open up that source member and look for the presence of ALWNULL
.
If you don't have the source, and again depending on how the object was compiled, maybe you can extract the source listing from the object itself and inspect that.