I have an EZT program that runs in test and production. I want to use the macro to pass in the variables so I don't need to modify the code each time I move. I want to define one macro in test with the test values and one in the prod library with the prod values. I coded this macro named ENVVAR:
in test :
macro 0 env test dbown db2t
mend
in prod:
macro 0 env prod dbown db2p
mend
this is my test code:
%ENVVAR
JOB INPUT NULL
DISPLAY 'PROCESSING BEGINS: '
DISPLAY 'PARM1 : ' &ENV
DISPLAY 'PARM2 : ' &DBOWN
STOP EXECUTE
I get these errors when I run it:
56 DISPLAY 'PROCESSING BEGINS: '
57 DISPLAY 'PARM1 : ' &ENV
57 *******B027 NOT A VALID NAME - &ENV
58 DISPLAY 'PARM2 : ' &DBOWN
58 *******B027 NOT A VALID NAME - &DBOWN
Should this work?