Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Search & Replace within a range of text

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
blocis

New User


Joined: 03 Oct 2006
Posts: 2

PostPosted: Tue Oct 03, 2006 1:14 am    Post subject: Search & Replace within a range of text
Reply with quote

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
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Oct 03, 2006 1:43 am    Post subject:
Reply with quote

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:

http://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:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html
Back to top
View user's profile Send private message
blocis

New User


Joined: 03 Oct 2006
Posts: 2

PostPosted: Tue Oct 03, 2006 2:09 am    Post subject:
Reply with quote

Thats exactly what I needed Frank.

Thanks for your awesome and speedy response!
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Oct 03, 2006 2:30 am    Post subject:
Reply with quote

Glad I could help.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Find & Replace string in CA-SORT mrgnndhmk CA Products 1 Fri Mar 30, 2018 12:58 am
No new posts Replace last name by first name anatol DFSORT/ICETOOL 10 Thu Mar 15, 2018 3:43 pm
No new posts help to replace columns by rows Vikas Maharnawar DFSORT/ICETOOL 8 Tue Mar 06, 2018 3:27 pm
No new posts How to replace the below query? pkmurali DB2 12 Tue Feb 27, 2018 9:51 pm
No new posts Do we have any Modern tools to replac... NajeebKR Compuware & Other Tools 4 Sat Jan 27, 2018 1:22 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us