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
 
How to rewrite a line using ISREDIT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
Chaketh Ram

New User


Joined: 16 Nov 2011
Posts: 7
Location: India

PostPosted: Fri Dec 23, 2011 11:59 am    Post subject: How to rewrite a line using ISREDIT
Reply with quote

I have a requirement to find a particular string in a file and if a match is found,then an indicator has to be appended to that line.

I have coded upto searching for the string and creating an updated string with the added indicator.


Code:

address isredit
"macro noprocess"
"isredit reset"
"isredit cursor = 1  1"
"isredit find next abcdef 13"     /*srching for test string abcdef*/
if rc < 4 then
do
"isredit (lnc) = linenum .zcsr"
"isredit (cline) = line .zcsr"
job = substr(cline,1,12)
cline = left(job,12)||Y


One way to get the updated line would be to delete the old line and insert the new line.

Is there a way to directly update the existing line with the indicator.
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 Dec 23, 2011 12:36 pm    Post subject:
Reply with quote

I think that is what you may need to do
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1060
Location: Oostende, Belgium

PostPosted: Fri Dec 23, 2011 12:36 pm    Post subject:
Reply with quote

A whoopie, a yes/no question: YES
Back to top
View user's profile Send private message
Chaketh Ram

New User


Joined: 16 Nov 2011
Posts: 7
Location: India

PostPosted: Fri Dec 23, 2011 12:48 pm    Post subject: Reply to: How to rewrite a line using ISREDIT
Reply with quote

Figured out a way to do it.

Keyword MASKLINE is used for this.

Code:

address isredit
"macro noprocess"
"isredit reset"
"isredit cursor = 1  1"
"isredit find next abcdef 13"  /* search string abcdef*/
if rc < 4 then
do
"isredit (lnc) = linenum .zcsr"
"isredit (cline) = line .zcsr"
job = substr(cline,1,12)
cline = left(job,12)||Y
/*say cline*/
"isredit line" lnc "= maskline +(cline)"


Please let know if there is a better way to do it

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

Senior Member


Joined: 07 Feb 2009
Posts: 1060
Location: Oostende, Belgium

PostPosted: Fri Dec 23, 2011 6:28 pm    Post subject: Re: Reply to: How to rewrite a line using ISREDIT
Reply with quote

Chaketh Ram wrote:
Figured out a way to do it.

Keyword MASKLINE is used for this."

No, it isn't, but someday, after screwing up badly, you will find out why.
Back to top
View user's profile Send private message
Michael Jakob

New User


Joined: 13 Mar 2011
Posts: 17
Location: Switzerland

PostPosted: Fri Jan 06, 2012 3:58 am    Post subject: Add marker with CHANGE
Reply with quote

If you like you can change your line with:

In this case your marker will be placed at first empty place.

ADDRESS "ISREDIT" "CHANGE ' ' '"cline" .zcsr .zcsr"

With

ADDRESS "ISREDIT" "LINE .ZCSR = (cline)"

you fill you replace the line in the file with cline.
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 -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts line 52: Name or string > 250 char... Ashishpanpaliya CLIST & REXX 5 Sat Oct 14, 2017 2:29 am
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts ISREDIT MACRO NOT WORKING! :cry: kirank889 TSO/ISPF 3 Thu Aug 03, 2017 5:46 pm
No new posts RC 20 for Address ISPEXEC "ISRED... pkmurali CLIST & REXX 3 Sun Apr 16, 2017 11:30 pm
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm

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