Page 1 of 1

How to generate a Header & trailer records in output file

PostPosted: Wed Jun 04, 2014 11:36 pm
by Sunnyjo
Hi,

Need some help from someone on how to generate a header & trailer records alone by referring date card file.

Please find my requirement

Input :
----+----1----+----2----+----3----+----4----+----5----+----6----+---
********************************* Top of Data **********************
1406 20140602 20140602 DAILY 1406 20140603 00 N
(Previous date) (Current date)

Output :

H06032014
T060320140000000000000000

Can someone please help me on this....

Re: How to generate a Header & trailer records in output fil

PostPosted: Thu Jun 05, 2014 1:01 am
by BillyBoyo
Use OUTFIL BUILD with the slash operator (/), which allows the creating of multiple outputs from a single input record.
 OUTFIL BUILD=(C'TEXT FOR LINE 1',
               /,
               C'TEXT FOR LINE 2')


Should get you

TEXT FOR LINE 1
TEXT FOR LINE 2


Then replace the literals with the positions you want from your input data.

Re: How to generate a Header & trailer records in output fil

PostPosted: Thu Jun 05, 2014 11:01 pm
by NicC
Not possible by JCL. Perhaps using your sort product for which BillyBoyo has given you the gist.