Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to change a string containing the command delimiter

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

New User


Joined: 31 May 2017
Posts: 7
Location: Czech

PostPosted: Tue Aug 29, 2017 3:34 pm    Post subject: Re: find or replace command
Reply with quote

superk wrote:
Since I'm sure that you're aware that the semi-colon ';' is the command delimiter for ISPF, you can't do what you're trying that way. The easiest thing to do is to use the hex representation of the semi-colon instead:

C X'5E' X'40' ALL or C X'5E' ' ' ALL


Hi superK, but what if the semi-colons are in the middle of a string? Like below:

c 'A;B;C' 'A-B-C' all

I tried "AX'E5'B" and 'AX"E5"B', none worked. How do you put the X'5E' in the middle of a string? Thanks!
Back to top
View user's profile Send private message

Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1247
Location: Israel

PostPosted: Tue Aug 29, 2017 4:27 pm    Post subject:
Reply with quote

It is better to start a new topic, even if the question is related.

Now, two correct answers:
1. it is always possible to do multiple changes (first change X'5E' to something unusual like ~ [X'A1'], then change 'A~B~C' to whatever, then back from X'A1' to X'5E')

2. Change the command delimiter (Option 0 for ISPF Settings, change command delimiter to something unusual like ~) then 'A;B;C' will work.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1922
Location: UK

PostPosted: Tue Aug 29, 2017 4:56 pm    Post subject:
Reply with quote

Do not resuurect old topics - 11 YEARS this has been sleeping quietly! Even 6 months is too long.
Back to top
View user's profile Send private message
chong.zhou

New User


Joined: 31 May 2017
Posts: 7
Location: Czech

PostPosted: Tue Aug 29, 2017 5:07 pm    Post subject:
Reply with quote

Marso wrote:
It is better to start a new topic, even if the question is related.

Now, two correct answers:
1. it is always possible to do multiple changes (first change X'5E' to something unusual like ~ [X'A1'], then change 'A~B~C' to whatever, then back from X'A1' to X'5E')

2. Change the command delimiter (Option 0 for ISPF Settings, change command delimiter to something unusual like ~) then 'A;B;C' will work.


Cool. I like the second idea, because sometimes the purpose of including semi-colons in the search pattern is just for more accurate matching.
Back to top
View user's profile Send private message
sergeyken

Active User


Joined: 29 Apr 2008
Posts: 212
Location: Maryland

PostPosted: Tue Aug 29, 2017 7:17 pm    Post subject: Re: find or replace command
Reply with quote

chong.zhou wrote:
c 'A;B;C' 'A-B-C' all

I tried "AX'E5'B" and 'AX"E5"B', none worked. How do you put the X'5E' in the middle of a string? Thanks!

For relatively short strings you also can code it whole in hex:
Code:
c  X'C1E5C2E5C3'  'A-B-C' all

Another (less safe) approach is, using "picture" characters
Code:
c  P'A$B$C'  'A-B-C' all

('$' stands for "any special character, neither alphabetic nor numeric")
Back to top
View user's profile Send private message
chong.zhou

New User


Joined: 31 May 2017
Posts: 7
Location: Czech

PostPosted: Tue Aug 29, 2017 8:10 pm    Post subject:
Reply with quote

Thank you sergeyken. Your 1st idea can't be better. Great!!
Back to top
View user's profile Send private message
sergeyken

Active User


Joined: 29 Apr 2008
Posts: 212
Location: Maryland

PostPosted: Tue Aug 29, 2017 10:44 pm    Post subject:
Reply with quote

chong.zhou wrote:
Thank you sergeyken. Your 1st idea can't be better. Great!!

Whenever I was in need of making changes for a very sophisticated combinations of characters, first I used some combination of EXCLUDE/FIND commands - to display only those lines I was interested in, and then used "CHANGE NX ALL ..." command, for not to affect unexpected lines of code.
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 line 52: Name or string > 250 char... Ashishpanpaliya CLIST & REXX 5 Sat Oct 14, 2017 2:29 am
No new posts Partial color change of a field in CI... waseem0424 CICS 5 Fri Sep 29, 2017 7:56 pm
No new posts MQ command in option 6 of ISPF! Vignesh Sid All Other Mainframe Topics 3 Tue Sep 26, 2017 6:01 pm
No new posts Search for a string in many PDS KARTHIGADEVI CLIST & REXX 5 Fri Sep 08, 2017 2:32 pm
No new posts Failure after DIR command Hank Watson All Other Mainframe Topics 2 Tue Aug 29, 2017 3:14 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us