Apply same number on records



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

Apply same number on records

Postby ranga_subham » Sat Feb 26, 2011 1:17 pm

Hi,

My input file has few records separated by '#'.

INPUT: LRECL=80, RECFM=FB
100200
200300
#
100002
200003
#
300400
400500
#
500600
600700


I want a same number applied on the records fall between '#' symbol.

OUTPUT:
100200         
200300
#
100002         0001
200003         0001
#
300400         0001
400500         0001
#
500600
600700


Can you please help me it with Syncsort.

Thanks.
ranga_subham
 
Posts: 279
Joined: Fri Jul 18, 2008 7:46 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Apply same number on records

 

Re: Apply same number on records

Postby ranga_subham » Tue Mar 01, 2011 4:06 pm

Tried this code but with not much success :(

//SYSIN    DD *                                                     
  INREC IFTHEN=(WHEN=GROUP,BEGIN=(1,1,CH,EQ,C'#'),PUSH=(10:ID=3)),
        IFTHEN=(WHEN=(1,4,CH,EQ,C'#'),OVERLAY=(10:C'   ')),       
        IFTHEN=(WHEN=(10,3,ZD,EQ,NUM),OVERLAY=(10:C'001'))           
  SORT FIELDS=COPY                                                   


Thanks.
ranga_subham
 
Posts: 279
Joined: Fri Jul 18, 2008 7:46 pm
Has thanked: 0 time
Been thanked: 1 time


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post