Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Search for a string "abc" and replace with "x

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

New User


Joined: 30 Nov 2006
Posts: 6
Location: fort worth

PostPosted: Fri Dec 01, 2006 9:00 pm    Post subject: Search for a string "abc" and replace with "x
Reply with quote

I have a file, DSORG=FBA LRECL=188

The report has 3 headers. The 2nd header has the string "ABC" which I would like to replace with "XYZ".
The string ABC does not start at a fixed position. Could I do this using DFSORT.

I do realize that we can replace a single character using ALTSEQ and strings can be replaced with another string using CHANGE command as long as the position is fixed.

I can do the above using REXX which is quite simple but I would love to know if it is possible to do using DFSORT.

The lines between the header and the trailer report contain Edited Numeric fields and description.
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: Fri Dec 01, 2006 10:22 pm    Post subject:
Reply with quote

Sort products do not have built-in functions for find and replace.
Back to top
View user's profile Send private message
elsajthomas

New User


Joined: 30 Nov 2006
Posts: 6
Location: fort worth

PostPosted: Fri Dec 01, 2006 10:23 pm    Post subject: Re: Search for a string "abc" and replace with &qu
Reply with quote

Thank you Frank. Please do let us know if in the future this will be incorporated.
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: Fri Dec 01, 2006 10:29 pm    Post subject:
Reply with quote

It's on the list of candidates for future enhancements to DFSORT.
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: Thu Aug 28, 2008 11:34 pm    Post subject:
Reply with quote

Find and replace is now available with DFSORT's new FINDREP function in z/OS DFSORT V1R5 PTF UK90013 (July, 2008). For example:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD DSN=...  output file
//SYSIN    DD    *
  OPTION COPY
  INREC FINDREP=(IN=C'ABC',OUT=C'XYZ')
/*


For complete details on the new FINDREP function and the other new functions available with PTF UK90013, see:

www.ibm.com/systems/support/storage/software/sort/mvs/ugpf/
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Thu Aug 28, 2008 11:59 pm    Post subject:
Reply with quote

Does the following mean that we do not yet have the new "release"? How could I see what release we are using.
Code:
ICE143I 0 BLOCKSET     COPY  TECHNIQUE SELECTED                               
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AND MORE     
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 - 13:19 ON THU AUG 28, 2008 -
           SORT FIELDS=COPY                                                   
           INREC FINDREP=(IN=C'ABC',OUT=C'XYZ')                               
                 $                                                             
ICE104A 0 INVALID INREC OR OUTREC STATEMENT OPERAND                           
ICE751I 0 C5-K26318 C6-K90007 C7-K90000 C8-K23476 E7-K24705                   
ICE052I 3 END OF DFSORT                                                       
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Fri Aug 29, 2008 12:08 am    Post subject:
Reply with quote

Sorry, I worded that wrong. How can I tell what PTFs we have.
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: Fri Aug 29, 2008 12:55 am    Post subject:
Reply with quote

Quote:
Does the following mean that we do not yet have the new "release"? How could I see what release we are using.

How can I tell what PTFs we have.


It's NOT a new release. It's a PTF. It makes a difference because you can install the PTF on top of z/OS DFSORT V1R5 immediately on whichever release of z/OS you have. DFSORT currently only has one current release - z/OS DFSORT V1R5 (for z/OS 1.5 to 1.9). It will soon have two current releases, when z/OS DFSORT V1R10 is available.

The release you are using is shown in the ICE000I message.

See the following for a discussion of how to tell which PTF level you have:

http://ibmmainframes.com/viewtopic.php?t=33389

That message does indicate that you don't have the July, 2008 PTF installed. Ask your System Programmer to install it (it's free).
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 Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts RC 20 for Address ISPEXEC "ISRED... pkmurali CLIST & REXX 3 Sun Apr 16, 2017 11:30 pm
No new posts Replacing same string with different ... vickey_dw DFSORT/ICETOOL 6 Wed Feb 22, 2017 10:44 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us