Need help in Syncsort



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

Need help in Syncsort

Postby Vinoth_RajS » Sat Dec 26, 2009 11:29 am

Hello,

I have a requirement as follows..need help (I am an syncsort user)

input records...
1234567890AA12345
1234567890BB12345
1234567890CC12345
9876543210AA12345
9876543210BB12345


output :
1234567890AABBCC12345
9876543210AABB  12345
Vinoth_RajS
 
Posts: 2
Joined: Sat Dec 26, 2009 11:23 am
Has thanked: 0 time
Been thanked: 0 time

Re: Need help in Syncsort

 

Re: Need help in Syncsort

Postby Vinoth_RajS » Sat Dec 26, 2009 1:42 pm

Just to add one more point..

this was able to be done thru splice as shown below...but my version of synctool does not support SPLICE..
that is why i need a alternate ..
//TOOLIN   DD  *                                           
   SPLICE FROM(IN) TO(OUT) ON(1,16,CH) WITHANY KEEPNODUPS -
   WITH(18,2) WITH(21,2) WITH(24,2) USING(CTL1)           
/*                                                         
//CTL1CNTL DD *                                           
   INREC IFTHEN=(WHEN=(18,2,CH,EQ,C'DB'),                 
   BUILD=(1,16,18:18,2)),                                 
     IFTHEN=(WHEN=(18,2,CH,EQ,C'DT'),                     
     BUILD=(1,16,21:18,2)),                               
       IFTHEN=(WHEN=(18,2,CH,EQ,C'DN'),   
       BUILD=(1,16,24:18,2))
Vinoth_RajS
 
Posts: 2
Joined: Sat Dec 26, 2009 11:23 am
Has thanked: 0 time
Been thanked: 0 time

Re: Need help in Syncsort

Postby expat » Sat Dec 26, 2009 2:34 pm

Topic moved from DFSORT forum to the correct forum.
expat
 
Posts: 382
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Need help in Syncsort

Postby Alissa Margulies » Mon Dec 28, 2009 11:16 pm

Based on the sample data and desired output provided in the original post, here is one way of accomplishing this task:

//SORT  EXEC PGM=SORT,PARM='EQUALS'           
//SORTIN  DD DSN=input.file
//SORTOUT DD DSN=output.file
//SYSOUT  DD SYSOUT=*                           
//SYSIN   DD *                                 
  SORT FIELDS=(1,10,CH,A)                         
  OUTREC IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,1,ZD,RESTART=(1,10))),
       IFTHEN=(WHEN=(81,1,ZD,EQ,1),BUILD=(1:1,10,11,2,4Z,13,5)),           
       IFTHEN=(WHEN=(81,1,ZD,EQ,2),BUILD=(1:1,10,2Z,11,2,2Z,13,5)),         
       IFTHEN=(WHEN=(81,1,ZD,EQ,3),BUILD=(1:1,10,4Z,11,2,13,5))             
  OUTFIL NODETAIL,REMOVECC,SECTIONS=(1,10,TRAILER3=(1,10,                 
       TOT=(11,2,BI,BI,LENGTH=2),       
       TOT=(13,2,BI,BI,LENGTH=2),       
       TOT=(15,2,BI,BI,LENGTH=2),17,5))                           
/*                                       
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: 1 time


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post