Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Changing the line , when a string is found

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
ap_mainframes

Active User


Joined: 29 Dec 2005
Posts: 181
Location: Canada

PostPosted: Fri May 25, 2007 2:42 pm    Post subject: Changing the line , when a string is found
Reply with quote

Hi,

I have got a typical requirement.
When ever I find a string in statement ( say Job ) , i need to insert the string '//*' in the first column.
This is to be done with REXX.

Can anybody help me with this ??

Thanks,
ap_mainframes
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri May 25, 2007 2:53 pm    Post subject:
Reply with quote

Yes, an ISPF edit macro will do exactly what you want it to do.
Back to top
View user's profile Send private message
ap_mainframes

Active User


Joined: 29 Dec 2005
Posts: 181
Location: Canada

PostPosted: Fri May 25, 2007 3:03 pm    Post subject: Re: Changing the line , when a string is found
Reply with quote

Can you please let me know which ??
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Sun May 27, 2007 12:10 am    Post subject:
Reply with quote

Here are the steps:
1. Start a FIND loop for the string in question.
2. Check the RC (RC=0 means the string was found).
3. If the string was found, get the line using LINE .ZCSR.
4. Use OVERLAY or INSERT to create the desired new line.
5. Use LINE again to override the old line.
6. Search for next occurence.

O.
Back to top
View user's profile Send private message
ap_mainframes

Active User


Joined: 29 Dec 2005
Posts: 181
Location: Canada

PostPosted: Mon May 28, 2007 12:07 pm    Post subject: Re: Changing the line , when a string is found
Reply with quote

Hi,

I think i need to be more clear in my requirement.

Basically the requirement is to Comment the Job Card in a JCL with a REXX routine.

Now I thought that the approach would be to find the strings

' JOB ' in the line and comment it.
' MSGCLASS ' in the line and comment it then..

Can anybody explain it now??
Thanks for all the help provided.

Thanks,
ap_mainframes
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts Record Not found in AlX but record re... mukun264 COBOL Programming 7 Fri Mar 24, 2017 9:28 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us