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 pass variable from REXX exec to a macro called

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
sparrow

New User


Joined: 26 Mar 2007
Posts: 57
Location: Pune

PostPosted: Tue Mar 02, 2010 6:09 pm    Post subject: how to pass variable from REXX exec to a macro called
Reply with quote

hello..how do i pass variable with some value to a called macro ?

and how do i accept in the macro ?
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: Tue Mar 02, 2010 6:14 pm    Post subject:
Reply with quote

VPUT VGET
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1243
Location: Israel

PostPosted: Tue Mar 02, 2010 6:39 pm    Post subject: Reply to: how to pass variable from REXX exec to a macro cal
Reply with quote

In this example, my rexx program edits a file (full name in var dsn_member) and runs the MYMACRO macro.
Values are passed with the PARM option:
Code:
dsn_member = 'HLQ.SPF.COBOL('member')'
MyParms = '7 14 A'
Address ISPEXEC "EDIT DATASET('"dsn_member"') MACRO(MYMACRO) PARM(MyParms)"


In the macro:
Code:
Address ISREDIT "MACRO (ParmFROM ParmTO ParmSEQ)"


In this example, ParmFROM contains 7, ParmTO = 14 and ParmSEQ = 'A'

In order for your rexx program to continue without displaying the edited member, the macro should finish with SAVE;END or a CANCEL;END.
The macro can search and/or modify the edited file. For this use only ISPF Edit and Edit Macro commands.
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: Tue Mar 02, 2010 6:46 pm    Post subject: Reply to: how to pass variable from REXX exec to a macro cal
Reply with quote

Another repetitive topic that seems like it's been beaten to death. icon_rolleyes.gif

It's quite plainly shown when you do a copy of one of the ISPF EDIT models into your code:

Code:

'EDIT DATASET('dsname')    VOLUME('serial')     PASSWORD('pswd')    ',
     'PANEL('panel-id')    MACRO('mac-name')    PROFILE('prof-name')',
     'PROFILE('prof-name') FORMAT('form-nam')   MIXED(NO)           ',
     'CONFIRM(YES)         WS(NO)               WRAP                ',
     'PRESERVE             PARM('parmvar')'                           
'EDIT DATAID('data-id')    MEMBER('mbr-name')   PANEL('panel-id') ', 
     'MACRO('mac-name')    PROFILE('prof-name') FORMAT('form-nam')', 
     'MIXED(NO)                                 CONFIRM(YES)      ', 
     'WS(NO)               WRAP                 PRESERVE          ', 
     'PRESERVE             PARM('parmvar')'     

mac-name  - Optional, name of the initial macro to be executed 
            after the data is read.                             

parmvar   - Optional, name of a variable containing parameters   
            to be passed to the initial macro.  The value of the 
            variable must be 200 characters or less.                                   
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 How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 47 Fri Sep 29, 2017 1:08 pm
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

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