Page 1 of 2

How to overlay a text on particular record using Sync sort?

PostPosted: Wed Jul 15, 2009 12:38 am
by venkatapetchetti
Hi,

The attached file will have input and output format of my requirement. The input and output files are LRECL=133 and FBA. Could you help me how we can code using sync sort. Thanks

Venkat

Re: How to overlay a text on particular record using Sync sort?

PostPosted: Wed Jul 15, 2009 1:02 am
by Alissa Margulies
I don't understand your requirement. Are these header and trailer records? Do you simply want another trailer record inserted just before the last line?

Re: How to overlay a text on particular record using Sync sort?

PostPosted: Wed Jul 15, 2009 1:12 am
by venkatapetchetti
In the file '1' indicates the begining of the each record. The every 8th record after 1(ie, 9th record including 1st record) should have 'Report' from 11th column. Let me know still you have any questions.

Thanks
Venkat

Re: How to overlay a text on particular record using Sync sort?

PostPosted: Wed Jul 15, 2009 1:45 am
by Alissa Margulies
Thank you for the clarification. It now makes sense. This SyncSort for z/OS 1.3 job should give you the requested results:
//STEP1 EXEC PGM=SORT
//SYSOUT  DD SYSOUT=*
//SORTIN  DD DSN=Input.File,DISP=SHR  (FBA/133)
//SORTOUT DD DSN=Output.File
//SYSIN   DD *                                                       
   SORT FIELDS=COPY                                                   
   OUTREC IFTHEN=(WHEN=GROUP,BEGIN=(1,1,CH,EQ,C'1'),PUSH=(134:SEQ=3)),
          IFTHEN=(WHEN=(134,3,ZD,EQ,9),BUILD=(1,10,C'REPORT',17,116)),
          IFTHEN=(WHEN=NONE,BUILD=(1,133))                                                 
/* 

Re: How to overlay a text on particular record using Sync sort?

PostPosted: Wed Jul 15, 2009 2:03 am
by venkatapetchetti
Thanks for your response.

Do you know why am I getting the below error?
SYSIN :
SORT FIELDS=COPY
OUTREC IFTHEN=(WHEN=GROUP,BEGIN=(1,1,CH,EQ,C'1',AND,16,1,CH,EQ,C' '),
*
PUSH=(134:SEQ=3)),
IFTHEN=(WHEN=(134,3,ZD,EQ,9),BUILD=(1,11,C'REPORT',17,116)),
IFTHEN=(WHEN=NONE,BUILD=(1,133))
WER268A OUTREC STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE

Re: How to overlay a text on particular record using Sync sort?

PostPosted: Wed Jul 15, 2009 2:04 am
by Alissa Margulies
Support for WHEN=GROUP was included in SyncSort for z/OS 1.3.2. Are you running an older release of SyncSort?

Re: How to overlay a text on particular record using Sync sort?

PostPosted: Wed Jul 15, 2009 2:15 am
by venkatapetchetti
I am using SYNCSORT FOR Z/OS 1.3.0.3R

Re: How to overlay a text on particular record using Sync sort?

PostPosted: Wed Jul 15, 2009 7:16 pm
by venkatapetchetti
Alissa,

Can't we acheive this using the older version?

Thanks
Venkat

Re: How to overlay a text on particular record using Sync sort?

PostPosted: Thu Jul 16, 2009 2:13 am
by dick scherrer
Hello,

Sorry, but if your organization is not willing to install the current release of the software, why should people waste time working on an already out-dated solution.

If the organization is unwilling to upgrade, maybe they should face the expense of writing their own code. . . :?

Re: How to overlay a text on particular record using Sync sort?

PostPosted: Fri Jul 17, 2009 2:33 am
by venkatapetchetti
Yes, I agree.. But that's not in our hands :-)