[CLOSED] How to calculate FILEDEF LRECL for variable length fields
I have a master file in which a few fields are defined as variable length ( e.g., A3V). This is unusable, however, as the data is still being loaded from an oracle warehouse. Regardless, I am creating a report with these fields (and their formats) and made-up data.
I have created a MFD with -WRITE, like this:
SET HOLDLIST=PRINTONLY
-RUN
FILEDEF MASTER DISK labelf.mas
-RUN
-WRITE MASTER FILENAME=LABELF, SUFFIX=FIX, $
-WRITE MASTER SEGNAME=LABELF, $
-WRITE MASTER FIELDNAME=LABELN, FORMAT=I4, ACTUAL=A4, $
-WRITE MASTER FIELDNAME=FILLER, FORMAT=A1, ACTUAL=A1, $
-WRITE MASTER FIELDNAME=LABELA, FORMAT=A2, ACTUAL=A2V, $
-SET &XLEN = ?? ;
FILEDEF LABELF DISK LABELF.txt (LRECL &XLEN RECFM V
-RUN
-WRITE LABELF 0001 A
-WRITE LABELF 0002 B
-WRITE LABELF 0003 C
-WRITE LABELF 0004 D
-WRITE LABELF 0005 E
-RUN
-EXIT
My question is, do I code the LREC by totaling up the FORMAT values, or the ACTUAL values?
Thanks,This message has been edited. Last edited by: <Kathryn Henning>,