ATTACH MACRO
Posted:
Sat Mar 26, 2011 8:27 am
by belkin99
I used ATTACH macro to pass the control to external routine with list of parameters.
In the called subroutine, I would like to know which register will point at those parameters because I want to access them.
is R1 pointing on the list ??
Re: ATTACH MACRO
Posted:
Sat Mar 26, 2011 8:48 am
by steve-myers
The new program receives control with standard linkage. In other words, reg 1 points to a parameter list you specified in your ATTACH macro, reg 13 points to a "standard" OS/360 72 byte save area, register 14 probably points to an SVC 3 instruction, and reg 15 contains the entry point address of the program being started by the ATTACH macro.
Is there a reason you're using the ATTACH macro? There are any number of valid reason to use it, but there is quite a bit of overhead associated with it, so it should only be used for a valid reason.
Re: ATTACH MACRO
Posted:
Sat Mar 26, 2011 8:52 am
by steve-myers
This simulates starting a program with PARM=PARAMETER.
ATTACH EP=PGM. X
PARAM=PARMLEN, X
VL=1, X
ECB=DONE
ST 1,TCBADDR
WAIT 1,ECB=DONE
DETACH TCBADDR
...
DONE DC F'0'
PARMLEN DC AL2(8),C'PARAMETER'