I'm trying to execute a certain command ("VARY devaddr,OFFLINE") to run automatically during system startup. I can't find where the command should be placed. I tried setting the command in a proc, as follows:
//MYPROG PROC MODULE='IEFBR14'
/*$VS,'V 0A92,OFFLINE'
//DOIT EXEC PGM=&MODULE
//*
If I issue a START MYPROG I always get an error:
IEFC452I MYPROG - JOB NOT RUN - JCL ERROR 181
$HASP396 MYPROG TERMINATED
IEE122I START COMMAND JCL ERROR
Yet if I remove the command ('/*$VS,...') from the proc, it starts and completes fine. Also, if I create a job instead of a proc, I can submit it and it completes successfully.
My whole purpose is to have this unit taken offline after every IPL, without operator intervention. Does anybody have experience embedding commands in JCL, or an alternative way to accomplish this?
After cshneid's answer, I have edited my proc as follows:
//MYPROG PROC
//TEST COMMAND 'VARY 0A92,OFFLINE'
And my console output now looks like:
S MYPROG
IRR812I PROFILE * (G) IN THE STARTED CLASS WAS USED 121
TO START MYPROG WITH JOBNAME MYPROG.
$HASP100 MYPROG ON STCINRDR
VARY 0A92,OFFLINE
IEFC452I MYPROG - JOB NOT RUN - JCL ERROR 124
IEF281I 0A92 NOW OFFLINE
$HASP396 MYPROG TERMINATED
IEE122I START COMMAND JCL ERROR
IEA989I SLIP TRAP ID=X33E MATCHED. JOBNAME=*UNAVAIL, ASID=0059.
This seems to be the pattern no matter how I arrange the proc.