Find and find replace



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

Find and find replace

Postby karthik_sripal » Thu Apr 23, 2009 10:43 pm

Hi all,

I have requirement like if at posistion 10 there is '40' and at posistion 20 there is '09' i need to change that 09 to 90.
Hope i explained it clear.

for example my input file is like this
 ----+----1----+----2----+----3----+----4----+---
 ***************************** Top of Data ******
 THIS IS HEADER                                 
 ---------40AAAAAAAA09-----------AAAAAAAAA       
 ---------45AAAAAAAAAA...................A       
 ---------46AAAAAAAAAAMMMMMMMMMMMMMMMMMMMA       
 ---------40AAAAAAAA08BBBBBBBBBBBBBBBBBAAA       
 ---------40AAAAAAAA09CCCCCCCCCCCCCCCCCAAA       
 THIS IS FOOTER                                 
 **************************** Bottom of Data ****


I want my output file like

----+----1----+----2----+----3----+----4----+----
 ***************************** Top of Data *******
 THIS IS HEADER                                   
 ---------40AAAAAAAA90-----------AAAAAAAAA       
 ---------45AAAAAAAAAA...................A       
 ---------46AAAAAAAAAAMMMMMMMMMMMMMMMMMMMA       
 ---------40AAAAAAAA08BBBBBBBBBBBBBBBBBAAA       
 ---------40AAAAAAAA90CCCCCCCCCCCCCCCCCAAA       
 THIS IS FOOTER                                   
 **************************** Bottom of Data *****



could some one please tell me how to do this.
karthik_sripal
 
Posts: 3
Joined: Fri Apr 03, 2009 5:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Find and find replace

Postby Alissa Margulies » Thu Apr 23, 2009 11:04 pm

karthik,

Try this SyncSort for z/OS job:

//SORT1 EXEC PGM=SORT                 
//SORTIN  DD *                             
THIS IS HEADER                             
---------40AAAAAAAA09-----------AAAAAAAAA 
---------45AAAAAAAAAA...................A 
---------46AAAAAAAAAAMMMMMMMMMMMMMMMMMMMA 
---------40AAAAAAAA08BBBBBBBBBBBBBBBBBAAA 
---------40AAAAAAAA09CCCCCCCCCCCCCCCCCAAA 
THIS IS FOOTER                             
//SORTOUT DD SYSOUT=*                     
//SYSOUT  DD SYSOUT=*                       
//SYSIN   DD *                               
   SORT FIELDS=COPY                         
   OUTREC IFTHEN=(WHEN=(10,2,CH,EQ,C'40',AND,
                        20,2,CH,EQ,C'09'),         
         OVERLAY=(20:C'90'))               
/*                           
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

Re: Find and find replace

Postby karthik_sripal » Thu Apr 23, 2009 11:20 pm

Thank you so much Alissa !! ..
it has worked as expectecd.. you have made my day !! :) ..
karthik_sripal
 
Posts: 3
Joined: Fri Apr 03, 2009 5:45 pm
Has thanked: 0 time
Been thanked: 0 time


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post