View previous topic :: View next topic
|
Author |
Message |
naveengec
New User
Joined: 24 Mar 2007 Posts: 35 Location: pune
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Have you searched the forum because this has been asked and answered many times before. |
|
Back to top |
|
|
naveengec
New User
Joined: 24 Mar 2007 Posts: 35 Location: pune
|
|
|
|
Yes Expat. I couldnt get the answer. Please help me out with the link if possible. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
Back to top |
|
|
naveengec
New User
Joined: 24 Mar 2007 Posts: 35 Location: pune
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2594 Location: Silicon Valley
|
|
|
|
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 |
|
|
naveengec
New User
Joined: 24 Mar 2007 Posts: 35 Location: pune
|
|
|
|
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 |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1315 Location: Vilnius, Lithuania
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2594 Location: Silicon Valley
|
|
|
|
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 |
|
|
naveengec
New User
Joined: 24 Mar 2007 Posts: 35 Location: pune
|
|
|
|
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 |
|
|
naveengec
New User
Joined: 24 Mar 2007 Posts: 35 Location: pune
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
why does no one check return codes? |
|
Back to top |
|
|
naveengec
New User
Joined: 24 Mar 2007 Posts: 35 Location: pune
|
|
|
|
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 |
|
|
|