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

How can I add in certain colum a chracter.


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Ali_gezer

Active User


Joined: 06 Apr 2021
Posts: 123
Location: argentina

PostPosted: Wed Nov 09, 2022 1:27 am
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Nov 09, 2022 1:32 am
Reply with quote

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
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Wed Nov 09, 2022 2:45 am
Reply with quote

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
View user's profile Send private message
Ali_gezer

Active User


Joined: 06 Apr 2021
Posts: 123
Location: argentina

PostPosted: Fri Nov 11, 2022 8:53 pm
Reply with quote

Thanks, I was blind to the solution.
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Fri Nov 11, 2022 9:33 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Update multiple rows with differentVa... DB2 9
No new posts How can identify which colum is diffe... CA Products 2
No new posts summing up the fields based on colum ... DFSORT/ICETOOL 6
No new posts query to find which all program updat... DB2 1
No new posts How to search for a colum name in DB2? DB2 2
Search our Forums:

Back to Top