View previous topic :: View next topic |
Author |
Message |
sushma4satya Beginner
Joined: 04 Nov 2005 Posts: 14 Topics: 4
|
Posted: Wed Feb 28, 2007 5:16 pm Post subject: Find and replace |
|
|
File looks like below :
Code: |
------------------------------------------------------------------------------
AAAAAAAA 2006-09-01 XXXXXXXXXX 001 000
BBBBBBBB 2006-06-01 XXXXXXXXXX 001 000
CCCCCCC 2006-01-01 2006-05-31 001 000
DDDDDDD 2007-01-01 XXXXXXXXXX 001 000
------------------------------------------------------------------------------
|
Note : Assume XXXXXXXX =spaces
My requirement : If I find a space in position 63-72 , I need to replace with 9999-99-99.
Output should look like: Code: |
------------------------------------------------------------------------------
AAAAAAAA 2006-09-01 9999-99-99 001 000
BBBBBBBB 2006-06-01 9999-99-99 001 000
CCCCCCC 2006-01-01 2006-05-31 001 000
DDDDDDD 2007-01-01 9999-99-99 001 000
------------------------------------------------------------------------------
|
Can we do it using sort or icetool without using change all command.
Thanks |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Wed Feb 28, 2007 9:21 pm Post subject: |
|
|
sushma4satya,
Sushma4satya,
try these sort control cards
Code: |
//SYSIN DD *
SORT FIELDS=COPY
OUTREC IFTHEN=(WHEN=(63,10,CH,EQ,C' '),
OVERLAY=(63:C'9999-99-99'))
/*
|
btw 9999-99-99 is not a valid date (assuming that the field is a date field). you should have it as 9999-12-31.
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
sushma4satya Beginner
Joined: 04 Nov 2005 Posts: 14 Topics: 4
|
Posted: Wed Feb 28, 2007 10:51 pm Post subject: |
|
|
Kolusu,
Thanks so much...it worked .
Satya |
|
Back to top |
|
|
|
|