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

ISPF EDIT Macro Code explanation


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

Active User


Joined: 17 Oct 2004
Posts: 191
Location: hyderabad

PostPosted: Mon Mar 26, 2007 8:19 pm
Reply with quote

HI all

MY dataset is 'TEST.UES.COBOL(TEST1)'.

I had to insert a new line when 'FRANK' is found, i got the below code from a website But i dont know there to give my input dataset 'TEST.UES.COBOL(TEST1)'.

Can some one please explain me the below Code & where to mention my input dataset & other needed details

/* REXX */
STRING = 'FRANK'
ADDRESS ISPEXEC 'VPUT STRING'
ADDRESS ISPEXEC "EDIT DATASET('UESR.MY.DSN') MACRO(MYMACRO)"

MYMACRO:

ADDRESS ISREDIT
ADDRESS ISPEXEC "VGET STRING"
LINE3 = 'BLUE'
LINE2 = 'RED'
LINE1 = 'ORANGE'
"F" STRING
IF RC > 0 THEN EXIT
"LINE_AFTER .ZCSR = (LINE3)"
"LINE_AFTER .ZCSR = (LINE2)"
"LINE_AFTER .ZCSR = (LINE1)"
"END"
EXIT
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon Mar 26, 2007 8:47 pm
Reply with quote

I'd think that the dataset you want to edit goes right after the "EDIT DATASET".
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Mon Mar 26, 2007 9:30 pm
Reply with quote

... and make sure that the code for the macro MYMACRO resides in a valid PDS allocated in your TSO session to the SYSPROC DD.
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 run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts Looking for a little history of ISPF ... TSO/ISPF 5
No new posts Adding QMF and SPUFI to the ISPF menu DB2 20
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
Search our Forums:

Back to Top