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
 
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: 8666
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 Splitting one row into multiple Rows ... Rajan Moorthy DFSORT/ICETOOL 9 Mon May 14, 2018 10:58 pm
No new posts VSAM file NOT Found error while proce... SumaReva CICS 5 Wed Apr 11, 2018 9:54 pm
No new posts Find & Replace string in CA-SORT mrgnndhmk CA Products 1 Fri Mar 30, 2018 12:58 am
No new posts Find a string in PS file opened in br... mukkas CLIST & REXX 3 Sat Feb 24, 2018 2:15 pm
No new posts VSAM dataset not found abdulrafi JCL & VSAM 5 Fri Jan 12, 2018 11:19 am

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