Page 1 of 1

Repeat same sequence in output file

PostPosted: Fri Feb 12, 2010 1:57 am
by Eric
Hi,

I want to repeat tree channel 1,2,3 in the first position in the output file. I use this but the result repeat 1 to 9 and zero for each ten record.

OPTION COPY -
OUTREC OVERLAY=(1:SEQNUM,1,ZD)

The result i want is :

1
2
3
1
2
3
:

Can you help me ?
Thanks !
Eric

Re: Repeat same sequence in output file

PostPosted: Fri Feb 12, 2010 2:19 am
by Frank Yaeger
If I understand correctly what you want, this DFSORT job should do it:

//S1    EXEC  PGM=SORT
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD DSN=...  output file
//SYSIN    DD    *
  OPTION COPY
  INREC IFTHEN=(WHEN=GROUP,RECORDS=3,PUSH=(1:SEQ=1))
/*


If that doesn't give you what you want, then you need to be explain more clearly what you do want with an example of your input records and expected output records, RECFM, LRECL, etc.

Re: Repeat same sequence in output file

PostPosted: Sat Feb 13, 2010 3:10 am
by Eric
Hi Mr. Yaeger

that is what I was looking for,

thank you for your availability...

Eric