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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Binary File format getting change whi... All Other Mainframe Topics 7
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
Search our Forums:

Back to Top