View previous topic :: View next topic
|
Author |
Message |
chong.zhou
New User
Joined: 31 May 2017 Posts: 9 Location: Czech
|
|
|
|
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 |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
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 |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
Do not resuurect old topics - 11 YEARS this has been sleeping quietly! Even 6 months is too long. |
|
Back to top |
|
|
chong.zhou
New User
Joined: 31 May 2017 Posts: 9 Location: Czech
|
|
|
|
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 |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2144 Location: USA
|
|
|
|
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 |
|
|
chong.zhou
New User
Joined: 31 May 2017 Posts: 9 Location: Czech
|
|
|
|
Thank you sergeyken. Your 1st idea can't be better. Great!! |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2144 Location: USA
|
|
|
|
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 |
|
|
|