View previous topic :: View next topic
|
Author |
Message |
deepgosrani
New User
Joined: 03 Sep 2007 Posts: 1 Location: Hyderabad
|
|
|
|
Suppose the record structure in my input file is
abcdxxgauravxxxar
xxgauravxxxxxlmno
xxxxxxxxxxgauravx
and i want 'gaurav' to be replaced by 'deep'
i want output as
abcdxxdeepxxxxxar
xxdeepxxxxxxxlmno
xxxxxxxxxxdeepxxx |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Dick,
That alternate method (TRAN=ALTSEQ) only works for replacing one character with another. It can't be used to replace a word with another word. That requires FINDREP. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
i want 'gaurav' to be replaced by 'deep' |
From the example you show, it appears you actually want 'gaurav' to be replaced by 'deepxx'. You could use these DFSORT control statements to do that:
Code: |
OPTION COPY
INREC FINDREP=(IN=C'gaurav',OUT=C'deepxx')
|
|
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
thx Frank, I miss-interpreted what was going on in the other post. |
|
Back to top |
|
|
|