Page 1 of 1

SYNCSORT - NEED TO ADD HEADER

PostPosted: Wed Dec 14, 2011 3:27 pm
by shrishant
Hi all,
I have a step in my JCL where I am changing the picture clause of the input file field and populating the same value in output file in readable format using SYNCSORT.
Everything is perfect and I am getting the expected output in the output report.

I want to add the header record into the output report that is not present in the input file.

The header is as below and should be displayed at the top of the output report.

SOURCE,GL-BUSS-UNIT,GL-DEPT-ID,STATE-PRO-SECU,ZIP-PRO-SECU,STATE-CUS,ZIP-CODE-CUS,EOM-OPB,YTD-INT-INCME,YTD-FEE-INCME,BK-NUM,ORG-LVL-NUM-6,

Please let me know if anyone have idea of achiving this in same step.

Regards,
Shri

Re: SYNCSORT - NEED TO ADD HEADER

PostPosted: Thu Dec 15, 2011 11:21 am
by dick scherrer
Hello,

Post a few sample input records and the output you want when this sample is processed.

Re: SYNCSORT - NEED TO ADD HEADER

PostPosted: Fri Dec 16, 2011 5:24 pm
by xknight
Hello,

Why not having static header in the seperate file and merge it, while copying/sorting your input file. Just a hint!!

Regards,
Xavier

Re: SYNCSORT - NEED TO ADD HEADER

PostPosted: Wed Dec 21, 2011 12:25 am
by Alissa Margulies
Hello Shri.

Since we cannot see what your current control cards are, try adding the following OUTFIL statement to the SYSIN of your existing sort step:

//SYSIN DD *
  .
  .
  .
  OUTFIL HEADER1=(1:C'SOURCE,GL-BUSS-UNIT,GL-DEPT-ID,STATE-PRO-SECU,',
     47:C'ZIP-PRO-SECU,STATE-CUS,ZIP-CODE-CUS,EOM-OPB,',           
     91:C'YTD-INT-INCME,YTD-FEE-INCME,BK-NUM,ORG-LVL-NUM-6')


If you run into a problem, please post the sample input and expected output (as previously requested) along with the error messages.

Thank you.