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
 

 

Macro filed when Open the jcl with macro

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
kbmkris

Active User


Joined: 24 Jun 2006
Posts: 101

PostPosted: Thu Jun 29, 2006 5:03 pm    Post subject: Macro filed when Open the jcl with macro
Reply with quote

hi all,

i have just started studying REXX. while creating macros for the opening of copy books or the dataset mentioned in the jcl, i had a problem. while i tried to open the jcl with imacro, the macro starts running and get failed. i want my macro to run only when the enter key is pressed. can anyone help me on this case.
Back to top
View user's profile Send private message

kbmkris

Active User


Joined: 24 Jun 2006
Posts: 101

PostPosted: Thu Jun 29, 2006 5:03 pm    Post subject:
Reply with quote

hi this is the macro program i have written for that
Code:

/* REXX */
"MACRO"                           
ADDRESS ISREDIT                   
X = MSG('OFF')                     
"(NUM) = LINENUM ".ZCSR           
"(LNCONT) = LINE "NUM             
IND = INDEX(LNCONT,"'")           
DSN = SUBSTR(LNCONT,IND+1)         
DSN  = STRIP(STRIP(DSN),B,"'")     
DSN = "'"||DSN||"'"               
SAY DSN                           
IF SYSDSN(""DSN"")= 'OK' THEN     
 DO                               
   ADDRESS ISPEXEC                 
  "VIEW DATASET("DSN") MACRO(RES)"
 END                               
EXIT
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Fri Jun 30, 2006 1:26 am    Post subject: Re: Macro filed when Open the jcl with macro
Reply with quote

I would call the ISPF EDIT session with a panel:

Do Forever
"ISPEXEC EDIT DATASET('dsname') PANEL(thepanel)"
If rc <> 0 Then Exit
Else (call EDIT with the macro)...
End

With a panel, you can process the Return-code based on Enter (rc=0) or End (rc=8). When rc=0, then call EDIT again, this time without the panel, but with the macro.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts RC 20 for Address ISPEXEC "ISRED... pkmurali CLIST & REXX 3 Sun Apr 16, 2017 11:30 pm
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts How can we have the varying lenth of ... Gunapala CN DFSORT/ICETOOL 6 Fri Oct 14, 2016 7:31 pm
No new posts FTOPEN TEMP is failing due to dataset... mbenaud TSO/ISPF 7 Thu Jul 28, 2016 4:28 pm
No new posts PCOMM macro to call another PCOMM macro boyti ko All Other Mainframe Topics 4 Tue Jul 12, 2016 4:30 pm


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