OPS return code of 1(OPSRC = 0) when using OPSJESX function in Request Rule
search cancel

OPS return code of 1(OPSRC = 0) when using OPSJESX function in Request Rule

book

Article ID: 47227

calendar_today

Updated On:

Products

OPS/MVS Event Management & Automation

Issue/Introduction

The below code has worked great in the past.

$JOB = 'SYSPSMFP'
$RUN = OPSJESX("S","JOBNAME("$JOB")" "SYSTEM(SYSA)")

Now when used in a REQ rule, it gives false information. it returns '0' back for jobs that are actually running. The manual shows to use OPSJESX in a REQ rule. Looking at the same job with this code in Rexx it returns a '1' which was what was expected.

Is this a Request rule issue where this OPSJESX does not work?



Environment

OPS/MVS, all releases

Resolution

 
Yes. The way the OPSJESX function is written, it can only be used in TOD rules; not in Request rules.
A return code of one(OPSRC = 1), in this case, indicates that it is in a non supported environment.


0 – Successful completion.
1 -- Error in OPS/MVS related processing

Additional Information

Note: The OPSJESX function can also be used in OPS/REXX. OPSJESX can additionally be used in TOD and REQ AOF rules. The use within REQ rules is further restricted to within System State Manager (SSM). OPSJESX cannot be used in any other AOF rule type. The OPSJESX call operates for both JES2 and JES3.