At 10:49 AM -0400 on 06/13/2010, Andreas F. Geissbuehler wrote about
Re: What control block would be best to get the current val:
For example, given the following JCL should could I get the value of JCL
symbolic variable OPTION. I am unable to pass this value in via PARM
because I will be a sub task the step's program, who expects specific
values in PARM.
Have you considered fishing for Reg.1 in [TCBFSA] ?
Depending on your (sub)task structure you need to follow TCBOTC until
you get to the top where TCBFSA points to the first register save area.
Fetch the PARM field address from +24.
If you have a SYSUDUMP you can verify beforehand:
-SAVE AREA TRACE
-PROCEEDING FORWARD FROM TCBFSA
Andreas F. Geissbuehler
AFG Consultants Inc.
http://www.afgc-inc.com/
This will not work since, as noted in the query, the parm field from
the JCL is reserved for the EXEC launched main program which needs to
have a fixed set of data being passed to it (and will not like the
OPTION parm being there in addition to its data).