The copybook that is used during the execution of the PRINT command is in CUSTOMER.COPYLIB(CPYBOOK). The file's data is overlaid with the copybook found in the member CPYBOOK.
PRINT, LAYOUTFILE(CUSTOMER.COPYLIB(CPYBOOK)), FORMAT(SINGLE)
Print Report DSN = CUSTOMER.FILE Rec #1 Pos *-----------FIELD NAME--------------* FORMAT *---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8 1 01 COMPANY-DATA 80 1 03 COMPANY-NAME C 20 Intl Widget 21 03 COMPANY-ADDRESS C 30 534 Commerce Way 51 03 COMPANY-CITY C 10 Denver 61 03 COMPANY-STATE-CODE C 2 CO 63 03 FILLER C 18
The copybook that is used during the execution of the COPY command is referenced by the ddname of DDLAYOUT. All records whose FIELD-A value is 55 are copied to the output file. You must provide a layout member because the SELRECIF keyword references a field name. This layout must map the input file's data. If LAYOUTFILE is omitted, the default ddname LAYOUT is used.
COPY, LAYOUTFILE(DDLAYOUT), SELRECIF(FIELD-A,EQ,N'55')
|
Copyright © 2013 CA.
All rights reserved.
|
|