Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rexx & Macro

Status
Not open for further replies.

ivviva

Technical User
Aug 20, 2003
12
0
0
IT
Hello,
I writed a rexx with inside ADDRESS TSO for deleting and allocating datasets, and ADDRESS ISPEXEC ISREDIT MACRO, for changing string.
How I use it.......
I open a member and I write in the line command the myrex name and execute it.... and all it's OK!
Well, now I would like use the parameter, I write the ARG inside myrexx, but when I recall my rexx with the arguments, the parameters are null; but if I use the sintax:
TSO myrexx param1 param2
the ARG is OK but.... the ISREDIT MACRO return RC=20! Why? I don't understand.
Thanks,
Ivana


 
Macros should generally be separate routines. Invoke them with
Code:
address ISPEXEC "EDIT ...... MACRO(...)"

Frank Clarke
Tampa Area REXX Programmers' Alliance
REXX Language Assn Listmaster
 
See if this helps.
Add something like this to the beggining of your routine.

/* ***** CHECK IF A MACRO OR A REXX ROUTINE PARM */
parm = arg(1)
Mac = "No"
If parm = '' | parm = 'PARM' then
Do
'ISREDIT MACRO NOPROCESS (MacParm)'
'ISPEXEC CONTROL ERRORS RETURN'
parm = MacParm
Mac = "Yes"
End
say 'MACRO='Mac ' Parm=('Parm')'
exit 0

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top