View previous topic :: View next topic
|
Author |
Message |
blocis
New User
Joined: 03 Oct 2006 Posts: 2
|
|
|
|
Hi,
I am trying to use DF Sort to perform a search and replace within a text string. The string is 80 characters long and I need to search and replace all line feed characters with spaces.
Any help gratefully appreciated.
Thanks! |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
I'm not sure what the "line feed" character is. For purposes of the example, let's say it's X'25' (hex 25). You could use a DFSORT job like this to do what you asked for:
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file (FB/80)
//SORTOUT DD DSN=... output file (FB/80)
//SYSIN DD *
OPTION COPY
ALTSEQ CODE=(2540)
OUTREC FIELDS=(1,80,TRAN=ALTSEQ)
/*
|
For more information on TRAN=ALTSEQ, see the "Change all zeros in your records to spaces " Smart DFSORT Trick at:
www.ibm.com/servers/storage/support/software/sort/mvs/tricks/
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:
Use [URL] BBCode for External Links |
|
Back to top |
|
|
blocis
New User
Joined: 03 Oct 2006 Posts: 2
|
|
|
|
Thats exactly what I needed Frank.
Thanks for your awesome and speedy response! |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Glad I could help. |
|
Back to top |
|
|
|