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
 
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: 4650
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 Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
No new posts exec macro in the end of edit anatol CLIST & REXX 8 Fri Sep 22, 2017 5:10 am
No new posts Reply MQ open error Vignesh Sid COBOL Programming 6 Thu Sep 07, 2017 6:02 pm
No new posts How to Run Rexx Macro? Kalaivignesh CLIST & REXX 5 Fri Sep 01, 2017 9:08 pm
No new posts ISREDIT MACRO NOT WORKING! :cry: kirank889 TSO/ISPF 3 Thu Aug 03, 2017 5:46 pm

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