Page 1 of 1

Header and Trailer in JCL

Posted: Tue Nov 27, 2012 10:12 am
by Harshal_Chaudhari
Hi,

I have an input file as,

-SCAN *ABC123E
-SCAN *EIC345D*
-SCAN *CUC141E*
-SCAN *OPC120U*

and I want output as,

-OPT UTILITY
-SCAN *ABC123E
-SCAN *EIC345D*
-SCAN *CUC141E*
-SCAN *OPC120U*
-END

The DCB Parameter is (LRECL=10,BLKSIZE=23470,RECFM=FB).

So Please suggest me if we can use Concatenation of file for this or need to use Header and Trailer to get the Output file?

Posted: Tue Nov 27, 2012 12:38 pm
by William Collins
Your header and trailer content are fixed. You could use either and achieve the same results. Concatenation (if using the concatenated dataset into the step where it will be processed, rather that concatenating with a COPY operation) saves a pass of the data, though the volume on your file (control cards) will never be such to benefit from that.

Do it the way it is easiest to understand and maintain, at your site.

Posted: Thu Nov 29, 2012 10:08 am
by Harshal_Chaudhari
Thanks William it was really helpful!!!!

Posted: Tue Dec 04, 2012 10:20 am
by Anuj Dhawan
***intresting***!

Posted: Wed Dec 05, 2012 11:44 pm
by DikDude
FWIW - i suspect this is not correct . . .
The DCB Parameter is (LRECL=10,BLKSIZE=23470,RECFM=FB).