I want to specify a single byte area in linkage section. Program A could call program B as
call 'PROGB' using mycopybook
where mycopybook could be 500 bytes one time, 2000 bytes the next time etc etc.
A "simple" way around avoiding the need to know/reserve the maximum number of bytes expected in the linkage section in program B is to define it as ONE byte (after all, program B's linkage section is only a pointer to mycopybook in memory, neither more nor less). Trouble is, when I try and compile program B using the following
LINKAGE SECTION.
01 copybook-1 pic x.
procedure division using copybook-1.
display 'First 4 bytes passed in 'copybook-1(1:4)
I get a compilation error.
progent.cbl: 113: error: length of 'copybook-1' out of bounds: 4
Is there some COBC parameter that is the equivalent of NOSSRANGE?
(FWIW, In Micro Focus' Mainframe Express, the default where I worked was SSRANGE, so I had to set NOSSRANGE specifically for the example above, but after that there was no problem)