I came across the below code in a fully free RPG program.
dcl-ds *N;
*N char(2) inz('PR');
//STR0037123 - start
*N char(2) inz('ER');
*N char(2) inz('MP');
*N char(2) inz('PC');
*N char(2) inz('PT');
*N char(2) inz('RB');
*N char(2) inz('RG');
*N char(2) inz('RL');
*N char(2) inz('RT');
*N char(2) inz('TB');
*N char(2) inz('TO');
*N char(2) inz('TP');
*N char(2) inz('TV');
//STR0037123 - end
wPRGroupDOM char(2) dim(13) pos(1);
end-ds;
Can someone please help me to understand what this means? To me it seems like a compile time array but I am not sure why it seems to be declared like a data structure.
This has been used in the code as below:
if %lookup(Ipl9022L(wIdx).RIGHTCODE : wPRGroupDOM) > *zero;
Can someone please help with the equivalent fixed format declaration of this??
Here's the equivalent fixed-form declaration of the data structure (but with only a few subfields, to keep it small).
I hope nobody is actually required to code in fixed-form any more. But I'll post this anyway, in case it helps to understand the free-form code.
D ds ds
D 2a inz('PR')
D 2a inz('ER')
D 2a inz('MP')
D 2a inz('PC')
D wPRGroupDDM 2a DIM(4)
D overlay(ds:1)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With