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
 

 

How to pass data to a macro

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

New User


Joined: 24 Mar 2007
Posts: 35
Location: pune

PostPosted: Thu Oct 22, 2009 2:16 pm    Post subject: How to pass data to a macro
Reply with quote

Hi,

I have coded a macro(Name M7) in to hilite the component depending upon whethere they are COBOL or JCL or control card program etc.
WHen i call this coded macro from other REXX program, like MACRO(M7) i am not able to passs the coponenet type to the macro, so that correspoding HILITE command can be executed from the proc.

How to pass data to this M7 macro coded in REXX when calling M7 from my Main program as ISREDIT EDIT DATASET(filename) MACRO(M7).

Pelase help me out.

Regards,
Naveen
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: Thu Oct 22, 2009 2:28 pm    Post subject:
Reply with quote

Have you searched the forum because this has been asked and answered many times before.
Back to top
View user's profile Send private message
naveengec

New User


Joined: 24 Mar 2007
Posts: 35
Location: pune

PostPosted: Thu Oct 22, 2009 3:15 pm    Post subject:
Reply with quote

Yes Expat. I couldnt get the answer. Please help me out with the link if possible.
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: Thu Oct 22, 2009 3:30 pm    Post subject: Reply to: How to pass data to a macro
Reply with quote

How to call a macro with parameters.

passing values to macro.

passing parameters to macros.

To pass parm to a macro from a CLIST.

How to pass parameters to a macro from rexx?
Back to top
View user's profile Send private message
naveengec

New User


Joined: 24 Mar 2007
Posts: 35
Location: pune

PostPosted: Thu Oct 22, 2009 6:47 pm    Post subject:
Reply with quote

I tried VPUT then also i am not able to get the data inside my subrogram macro. I tried to display the data in the macro, it is displaying blank.

Mainprogram
Code:

PASSHI=HI.I                                         
ADDRESS ISPEXEC                                     
"VPUT  (PASSHI) PROFILE"                             
"VIEW DATASET('"DDIN1"') CHGWARN(YES) MACRO(WOW2)"   


subprogram macro WOW2
Code:
ADDRESS ISREDIT                     
"MACRO"                             
ADDRESS ISPEXEC "VGET PASSHI profile"
SAY "ISIDE MACRO = " PASSHI         
ADDRESS ISREDIT "HILITE '"PASSHI"'"
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Fri Oct 23, 2009 2:15 am    Post subject: Reply to: How to pass data to a macro
Reply with quote

Try specifying SHARED instead of PROFILE.

Separately, check the syntax of the VIEW call... it has a PARM parameter. And I think you can get the parm in the MACRO statement.
Back to top
View user's profile Send private message
naveengec

New User


Joined: 24 Mar 2007
Posts: 35
Location: pune

PostPosted: Fri Oct 23, 2009 12:41 pm    Post subject:
Reply with quote

You mean to say the code should be like this below?
1) SHARED is incorporated istead of PROFILE
2) the PASSHI variable is passed along with the Macro WOW2

Still it is not working.The latest code is below

Code:
PASSHI=HI.I                                         
ADDRESS ISPEXEC                                     
"VPUT  (PASSHI) SHARED"                             
"VIEW DATASET('"DDIN1"') CHGWARN(YES) MACRO(WOW2 PASSHI)"


Code:
ADDRESS ISREDIT                     
"MACRO"                             
ADDRESS ISPEXEC "VGET PASSHI SHARED"
SAY "ISIDE MACRO = " PASSHI         
ADDRESS ISREDIT "HILITE '"PASSHI"'"
Back to top
View user's profile Send private message
prino

Active Member


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

PostPosted: Fri Oct 23, 2009 1:36 pm    Post subject:
Reply with quote

Code:
"ispexec lminit dataid(myid) dataset('my.dsn') enq(shrw)"

myparm = 'anyparm'
mymem  = 'anymem'
mymac  = 'anymac'
"ispexec edit dataid("myid") member("mymem") " ||,
                            "macro("mymac") parm(myparm)"

"ispexec lmfree dataid("myid")"


Watch what's quoted and what not!
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Fri Oct 23, 2009 7:31 pm    Post subject: Reply to: How to pass data to a macro
Reply with quote

Code:
"VIEW DATASET('"DDIN1"') CHGWARN(YES) MACRO(WOW2 PASSHI)"


I am pretty sure I said to check the syntax... what you have should have given you a syntax error. I meant to check the manual.
Back to top
View user's profile Send private message
naveengec

New User


Joined: 24 Mar 2007
Posts: 35
Location: pune

PostPosted: Fri Oct 23, 2009 7:35 pm    Post subject:
Reply with quote

Hi Prins, Thanka for the reply. but it didnt help. It didnt fufill my requirement. How the macro recieves the data passed in PARM ie myparm.
Back to top
View user's profile Send private message
naveengec

New User


Joined: 24 Mar 2007
Posts: 35
Location: pune

PostPosted: Fri Oct 23, 2009 8:02 pm    Post subject:
Reply with quote

Pedra in this case how will we recieve the same in the macro WOW2?
I think there is some issue with the receieve of PASSHI.

Code:
ADDRESS ISREDIT                     
"MACRO"                             
ADDRESS ISPEXEC "VGET PASSHI SHARED"
SAY "ISIDE MACRO = " PASSHI         
ADDRESS ISREDIT "HILITE '"PASSHI"'"
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Oct 23, 2009 8:31 pm    Post subject:
Reply with quote

why does no one check return codes?
Back to top
View user's profile Send private message
naveengec

New User


Joined: 24 Mar 2007
Posts: 35
Location: pune

PostPosted: Fri Oct 23, 2009 8:52 pm    Post subject:
Reply with quote

yes now it is working... I changed the code like this,,,..
Code:
ADDRESS ISPEXEC "VGET PASSHI"   
SAY "INSIDE MACRO = " PASSHI   
ADDRESS ISREDIT "HI "PASSHI     


Thanks Evryone once again for the prompt response.... Thanks very much..!!!![/quote]
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 Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am
No new posts How to move a long alphanumeric data ... lind sh COBOL Programming 6 Mon Dec 05, 2016 7:51 pm
No new posts ODPP(Optim Data privacy Provider) Iss... Rama kishore IBM Tools 1 Mon Nov 07, 2016 5:46 pm
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts Can sending 5 MB data between cobol p... Kevin Vaz CICS 12 Tue Oct 18, 2016 4:50 pm


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