Joined: 14 Jan 2008 Posts: 2504 Location: Atlanta, Georgia, USA
If there's someone in your shop that writes Assembler, you could call an Assembler sub-program (which issues a SHOWCB Macro) and it can return the number of records and (if needed) the LRECL of the target VSAM file which you want to load into memory.
Then, you can define your table in LINKAGE, with an OCCURS DEPENDING ON and acquire dynamic storage via the LE Callable Service routine "CEEGTST" or an Assembler sub-program which issues an MVS "GETMAIN".
By doing it this way, you won't have to worry about defining an OCCURS table in WS, which could spill over at 3:00am, causing someone to increase the OCCURS, re-compile the program and cross their fingers.
However, if it spills over once, it will spill over again.