IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

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


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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 Developer


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

PostPosted: Fri Dec 01, 2006 10:22 pm
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
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 Developer


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

PostPosted: Fri Dec 01, 2006 10:29 pm
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 Developer


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

PostPosted: Thu Aug 28, 2008 11:34 pm
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:

Use [URL] BBCode for External Links
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
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
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 Developer


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

PostPosted: Fri Aug 29, 2008 12:55 am
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:

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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Search two or more word with FILEAID Compuware & Other Tools 15
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
Search our Forums:

Back to Top