Page 1 of 1

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

PostPosted: Fri Oct 05, 2012 4:27 pm
by coollearner
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.

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

PostPosted: Fri Oct 05, 2012 4:32 pm
by BillyBoyo
Something around about like this:

INREC IFTHEN=(WHEN=(19,3,CH,EQ,C'PPP'),OVERLAY=(19:25X))