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

Change the String in input file.


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
callkris_cit

New User


Joined: 22 Apr 2006
Posts: 44

PostPosted: Thu Sep 21, 2006 12:36 pm
Reply with quote

Hi All,

I want to change one string in the Input file (SAY CATXXX.FILE1)

For example CATXXX.FILE1 contents is as below:

SURESHRAJESH
AAAAAAAAAAA
BBBBBBBBBBB

My requirement is if the value of the String is SURESH, then it should be changed to RAMESH.

After executing REXX program the output would be as below

RAMESHRAJESH
AAAAAAAAAAA
BBBBBBBBBBB

Please provide the Sample rexx code to do this requirement.

Thanks
Suresh
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Thu Sep 21, 2006 12:49 pm
Reply with quote

If the file is not too big, you can use a one-statement edit-macro "CHANGE ALL SURESH RAMESH".

For bigger files, you will need to read the files using EXECIO or the ISPF service LMMGET, and then do your own processing (OVERLAY, SUBSTR, TRANSLATE etc.).

O.
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Sorting date into YYYYMMDD, and creat... DFSORT/ICETOOL 13
No new posts To Sort detail records in a file with... SYNCSORT 5
No new posts To Populate Trailer cnt in the file w... SYNCSORT 1
No new posts Setting RC using NULLOFL/NOTMTOFL for... SYNCSORT 6
No new posts Sort card to know that creation date ... DFSORT/ICETOOL 10
Search our Forums:


Back to Top