syncsort



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

syncsort

Postby meena » Mon Nov 28, 2011 5:09 pm

hi all,
can we delete adjacent duplicate records by syncsort..i have a file after processing thru many codes like below....
my ip file ll contain
11111111111110001
11111111111110001
12121212121210001
22222222222220002
23232323232320002
55555555555550003
55555555555550003
56565656565650003
33333333333330004
where 0001,0002 are sequence nos introduced while proceesing.

my op file shld contain:
1111111111111
1212121212121
2222222222222
2323232323232
5555555555555
5656565656565
3333333333333

i need to delete the adjacent duplicates and copy only the data not the sequence no...

kindly suggest a soln
meena
 
Posts: 11
Joined: Sat Oct 22, 2011 11:59 am
Has thanked: 0 time
Been thanked: 0 time

Re: syncsort

Postby Alissa Margulies » Tue Dec 06, 2011 4:16 am

Here is one way to achieve the desired output:
//STEP1 EXEC PGM=SORT   
//SYSOUT  DD SYSOUT=*
//SORTIN  DD *
11111111111110001
11111111111110001
12121212121210001
22222222222220002
23232323232320002 
55555555555550003
55555555555550003
56565656565650003
33333333333330004   
//SORTOUT DD DISP=(NEW,PASS),DSN=&&TEMP,SPACE=(TRK,1),UNIT=SYSDA
//SYSIN   DD * 
  INREC OVERLAY=(81:SEQNUM,8,ZD,RESTART=(1,13)) 
  SORT FIELDS=COPY
/*
//STEP2 EXEC PGM=SORT
//SORTIN  DD DISP=SHR,DSN=&&TEMP
//SORTOUT DD SYSOUT=*
//SYSOUT  DD SYSOUT=*   
//SYSIN   DD * 
  INCLUDE COND=(81,8,ZD,EQ,1)
  INREC BUILD=(1,13)
  SORT FIELDS=COPY 
/*           


Regards,
Alissa Margulies
Syncsort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Alissa Margulies
Global moderator
 
Posts: 369
Joined: Tue Feb 26, 2008 11:15 pm
Location: USA
Has thanked: 1 time
Been thanked: 3 times


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post