dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
I'm not positive, but i believe you can do what you want with Syncsort. Someone strong with Syncsort might contribute suggestions.
It may take a bit of digging in the Fine Manual. If you do not have the documentation, it may be gotten for free from Syncsort (if your organization is a licensed user). |
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi There,
I have done these in three step
First step : To Insert Seq number at the end
Code: |
Sort card
//SYSIN DD *
OPTION COPY
INREC FIELDS=(1,80,SEQNUM,8,ZD)
/* |
Second step:To insert *** starting at 13 th byte if cnt1 not equal to cnt2 or val1 not equal to val2 .Its taking the input from prev sortout file
Sort Card
Code: |
//SYSIN DD *
OPTION COPY
OUTFIL FILES=A,OUTREC=(1,12,C'***',16,73),
INCLUDE=(5,2,ZD,NE,9,2,ZD,OR,7,2,ZD,NE,11,2,ZD)
OUTFIL FILES=B,OUTREC=(1,88),
INCLUDE=(5,2,ZD,EQ,9,2,ZD,AND,7,2,ZD,EQ,11,2,ZD)
/* |
Third Step:To Concatenate both the file by using seq number
Code: |
Sort card:
//SYSIN DD *
SORT FIELDS=(81,8,ZD,A)
OUTREC FIELDS=(1,80)
/* |
Its not optimized solution but its giving desired result |
|