View previous topic :: View next topic
|
Author |
Message |
Ali_gezer
Active User
Joined: 06 Apr 2021 Posts: 120 Location: argentina
|
|
|
|
I need in column 3 to add or insert a '*' symbol, and all the info to the right has to move. I cant use the Change because I have to keep the info, just add the * and move the rest of the info to the right.
Is there certain command?
thanks.
Code: |
ORIGINAL CODE
//ABCD
//ABCD
//ABCD
DESIRED CODE
//*ABCD
//*ABCD
//*ABCD
//*ABCD
|
|
|
Back to top |
|
 |
Robert Sample
Global Moderator

Joined: 06 Jun 2008 Posts: 8671 Location: Dubuque, Iowa, USA
|
|
|
|
Why not use
Code: |
C 1 2 '//' '//*' ALL |
since there's nothing to keep you from expanding past columns 1 and 2.
Note: this approach will give you problems if your JCL has any data in column 71 since that means the data will be in the continuation column 72. It will also give you problems if you have anything in column 72 since that means the data will no longer be in the continuation column. You can use bounds in the profile to ameliorate these issues but they are still possible. |
|
Back to top |
|
 |
Willy Jensen
Active Member

Joined: 01 Sep 2015 Posts: 648 Location: Denmark
|
|
|
|
Quote: |
this approach will give you problems if your JCL has any data in column 71 since that means the data will be in the continuation column 72 |
not neccessarily, the first double blank will be truncated to a single. |
|
Back to top |
|
 |
Ali_gezer
Active User
Joined: 06 Apr 2021 Posts: 120 Location: argentina
|
|
|
|
Thanks, I was blind to the solution. |
|
Back to top |
|
 |
Willy Jensen
Active Member

Joined: 01 Sep 2015 Posts: 648 Location: Denmark
|
|
|
|
if you really want to shift everything from col 3 one to the right, then I can only think of an edit macro like:
Code: |
/* Insert a '*' in col 3 rexx */
Address Isredit "MACRO NOPROCESS (PRM)"
Address Isredit
"(last) = linenum .zlast"
Do lnr=1 to last
"(s)= line (lnr)"
s=insert('*',s,2)
"line (lnr) = (s)"
End |
|
|
Back to top |
|
 |
|