When using the OPSJESX function in a Request rule, getting a OPS return code of 1(OPSRC = 0) in CA OPS/MVS 12.3.

Document ID : KB000047227
Last Modified Date : 14/02/2018
Show Technical Document Details

I am using the below code. This has worked great for me in the past. I have used this in many Rexx's.


When I use it in a REQ rule, I found it is giving me false information. I am getting a '0' back for jobs that are actually running. I saw in manual that we can use OPSJESX in a REQ rule. I looked at the same job with this code in a Rexx and it gave me a '1' which was what I expected.

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

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:
A documentation correction has been requested for the text below:

OPS/REXX Built-in Functions › OPSJESX Function

Note: You can use the OPSJESX function in OPS/REXX. OPSJESX can also 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.