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
 

 

Change 'XXX' TO 'YYY'

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
cvadlamudi

New User


Joined: 19 Apr 2007
Posts: 68
Location: India

PostPosted: Mon Aug 04, 2008 10:29 am    Post subject: Change 'XXX' TO 'YYY'
Reply with quote

Hi All,

Is there any command in TSO, to change a string in particular lines only.
In the below example, all 'XXX' in the lines with string 'AAA' are changed to 'YYY'.

Input :
111 AAA 000XXX
222 AAA 000XXX
333 BBB 000XXX
444 CCC 000XXX
555 AAA 000XXX

Output :
111 AAA 000YYY
222 AAA 000YYY
333 BBB 000XXX
444 CCC 000XXX
555 AAA 000YYY

Thanks,
Mouli
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6967
Location: porcelain throne

PostPosted: Mon Aug 04, 2008 11:07 am    Post subject:
Reply with quote

x all
f all 'AAA'
chg all 'XXX' 'YYY' nx
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Aug 04, 2008 11:12 am    Post subject:
Reply with quote

Hello,

Not in a single command but you might try something like:
Code:
X ALL
F 'AAA'
FLIP
C 'XXX' 'YYY'

or
Code:
X ALL; F 'AAA'; FLIP; C 'XXX' 'YYY'

I'd suggest creating a member for testing before doing this on something "real".
Back to top
View user's profile Send private message
cvadlamudi

New User


Joined: 19 Apr 2007
Posts: 68
Location: India

PostPosted: Mon Aug 04, 2008 2:22 pm    Post subject: Reply to: Change 'XXX' TO 'YYY'
Reply with quote

Thanks a lot, Dick Brenholtz and dick scherrer
I was looking this for a long time... Thanks

Regards,
Mouli
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Mon Aug 04, 2008 6:29 pm    Post subject:
Reply with quote

Hi Mouli,

If you need a 1 cmd solution you can try:
Code:

c all p'AAA ===XXX' p'AAA ===YYY'
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 -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Fail to change physical VSAM filename... jacobdng CICS 7 Fri Jan 20, 2017 12:36 pm
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm
No new posts How to change dataset attributes of m... ignich7 JCL & VSAM 3 Thu Jul 21, 2016 9:17 pm
No new posts GDG vsersion number change Raghu navaikulam JCL & VSAM 5 Fri May 27, 2016 4:49 pm


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