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

Change 'XXX' TO 'YYY'


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
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
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: 6965
Location: porcelain throne

PostPosted: Mon Aug 04, 2008 11:07 am
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

Moderator Emeritus


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

PostPosted: Mon Aug 04, 2008 11:12 am
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
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
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 All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Binary File format getting change whi... All Other Mainframe Topics 7
No new posts 3270 personal communications. Can't c... TSO/ISPF 2
No new posts SELECT from data change table DB2 5
No new posts Trying to change copybook in online c... CICS 4
No new posts Change Default Scroll Setting TSO/ISPF 1
Search our Forums:


Back to Top