Find a word and replace with spaces till the end of field



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

Find a word and replace with spaces till the end of field

Postby coollearner » Fri Oct 05, 2012 4:27 pm

Hi,

I have a file with following data:

AAA XXX 123456678 MUSEUM..(PPP..xx.xx.xx.xx MNO
BBB XXX 324368867 PACE..(PPP..yyyyyy..yyyyyiiii PQR
CCC XXX 464368689 AB..(PPP..yyyyyy..rrrrrrriiiirr XYR


I have the fields as:
Field 1 - 3 bytes
Filler - 1 byte
Field 2 - 3 bytes
Filler - 1 byte
Field 3 - 9 bytes
Filler - 1 byte
Field 4 - 25 bytes
Filler - 1 byte
Field 5 - bytes

In Field 4, I want to search for "..(PPP" and replace with Spaces till 25th byte.

Expected output:

AAA XXX 123456678 MUSEUM MNO
BBB XXX 324368867 PACE PQR
CCC XXX 464368689 XYZ

Please let men know how can I do this with Syncsort.
Knowledge is wealth
coollearner
 
Posts: 33
Joined: Thu Jun 03, 2010 3:15 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Find a word and replace with spaces till the end of field

 

Re: Find a word and replace with spaces till the end of fiel

Postby BillyBoyo » Fri Oct 05, 2012 4:32 pm

Something around about like this:

INREC IFTHEN=(WHEN=(19,3,CH,EQ,C'PPP'),OVERLAY=(19:25X))
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post