OPSMVS : JES2 not stopping when using STOPJES2
search cancel

OPSMVS : JES2 not stopping when using STOPJES2

book

Article ID: 196605

calendar_today

Updated On:

Products

OPS/MVS Event Management & Automation

Issue/Introduction

Implementing the supplied Rexx STOPJES2 to shutdown JES2 during System Shutdown, it can happen that the following problem occurs: 

 JES2 is always waiting for 1 OSF SERVER to return JOBID:
M C040000 PSYS     20207 11:14:42.00          00000000 *$HASP715 ADDRESS SPACES WAITING FOR RETURN JOBID 466
D                                         466 00000000           ASID     JOBNAME
D                                         466 00000000           -------- --------
E                                         466 00000000           01DD     OPSOSF
even if there are multiple OSF servers up in the System.

How to solve the problem?

Environment

Release :  

Component : OPS/MVS

Resolution

In general it's important to usually set OSFGETJOBID to YES for example in order to use the OPSUBMIT function to submit a batch job directly from an OPS/REXX program or to use a SEND EMAIL Rexx to send email from within a Rexx. In addition, starting servers as SUB=MSTR requires to have OSFGETJOBID set to YES.

That said, below the steps to perform in order to correctly implement the supplied STOPJES2 Rexx:


1) Code a new Rexx exec (lets call it JES2DOWN)

/* JES2DOWN rexx that sets OSFGETJOBID then redrives STOPJES2 logic*/
SET = OPSPARM('SET','OSFGETJOBID','NO')     /* This turns off the JOBID*/
ADDRESS OSF
"OI STOPJES2"                                                      /* This re-drives stopping JES2 without a JOBID assigned*/
                                                                                /* to the 'OI' request to bring JES2 down*/


2) Assign the new JES2 UP/DOWN action to perform in the JES2 STCTBL_ACT

JES2 UP/DOWN TSOCMD("OI JES2DOWN")



3) if present, remove the OSFGETJOBID setting from within the SSMSHUT Rexx because it doesn't need to be done twice.