OPS/MVS

 View Only
  • 1.  Access plex global variable from EOM rule

    Posted Jul 06, 2022 04:53 PM
    Trying to access a plex global variable from an EOM rule and see in the manual it only works in certain rule types 'You may use the OPSVASRV function in API, ARM, and REQ AOF rules only.'   So I set up an opsreq rule to access the global and return the value, I am not getting the value back and have not been able to find an example that passes a value back.   There is a say for the the variable in the OPSREQ and the calling var name and I get nothing.   Any ideas?

    Thanks

    CALLING CODE

    Address tso
    "OPSREQ plxvrget GLVPLXPC.CICS.ETS.LIST CICS_VARs"
    cics_vars = return
    say 'cics_vars = ' cics_vars
    say 'output_var= ' output_var
    EXIT


    OPSREQ:

    )REQ PLXVRGET
    parse var req.text . plex_var output_var

    output_var = OPSVASRV("GET NAME('"plex_var"')")
    If vasrv_rc>4 & vasrv_rsn>4 Then
    do
    txt = plex_var 'was not available'
    RC = 16
    call Leave
    end

    return output_var
    Leave:
    ADDRESS WTO "TEXT('"txt"') MSGID(OPSPLVDI) "
    exit
    )End



         trace

    OPS0997T *-* 2: trace 'r'
    OPS0997T *-* 3: Address tso
    OPS0997T *-* 4: "OPSREQ plxvrget GLVPLXPC.CICS.ETS.LIST CICS_VARs"
    OPS0997T *-* 14:trace 'r'
    OPS0997T *-* 15:parse var req.text . plex_var output_var
    OPS0997T >>> PLEX_VAR=GLVPLXPC.CICS.ETS.LIST
    OPS0997T >>> OUTPUT_VAR=CICS_VARs
    OPS0997T *-* 22: output_var = OPSVASRV("GET NAME('"plex_var"')")
    OPS0997T >>> OUTPUT_VAR=CICSTSA CICSTSB CICSTSC
    OPS0997T *-* 23: If vasrv_rc>4 & vasrv_rsn>4 Then /* if
    OPS0997T *-* 30:return output_var
    OPS0997T *-* 5: cics_vars = return
    OPS0997T >>> CICS_VARS=RETURN
    OPS0997T *-* 6: say 'cics_vars = ' cics_vars
    OPS3092O cics_vars = RETURN
    OPS0997T *-* 7: say 'output_var= ' output_var
    OPS3092O output_var= OUTPUT_VAR
    OPS0997T *-* 8: EXIT
    OPS3092O READY
    **************************************** BOTTOM OF MESSAGES *********


    Chris Allamon
    NFCU


  • 2.  RE: Access plex global variable from EOM rule

    Posted Jul 07, 2022 06:34 AM
    Assume you put the calling code to fire the OPSREQ within the EOM. Address TSO/OSF commands/actions are shipped to an OPS server. If you look in the OPSLOG you'll see an OPS3724 audit message indicating the command was sent to a server. Thus, it is an asynchronous action and you will not get any output back within the calling rule. You'll need to ship an OPS/REXX pgm to a server to do you plex variable manipulation, passing any EOM environmental variables as an arg to the pgm as needed.


  • 3.  RE: Access plex global variable from EOM rule

    Posted Jul 07, 2022 01:22 PM
    Thanks Dave, actually I was testing running the process through a REXX and hadn't got to the EOM part yet.  I had originally tried to run it using ADDRESS OSF, same issue, the manual did not say that no output returned.
    So basically once an OPSREQ is called there is no return of data to the calling rule, is that for all rule types?

    To get back to my original issue, is that I just want to query a plex global when the EOM occurs to check to see if it is one of the CICS regions that we need to do some additional processing.  So in the EOM I have an OPSVASRV to pull the variable and receive an INCORRECT CALL TO ROUTINE.

    OPS0997T *-* 16:cics_plxvar ='GLVPLXPC.CICS.ETS.LIST'
    OPS0997T >>> CICS_PLXVAR=GLVPLXPC.CICS.ETS.LIST
    OPS0997T *-* 18:cics_reg = OPSVASRV('GET NAME('cics_plxvar')')
    OPS1040I ERROR 40 RUNNING CICS.CICSEOMQ, LINE 18: INCORRECT CALL TO ROUTINE

    Therefore, I am relegated to either hard code it in each of the rules that are going to be in this process or create a local global on each lpar.   Since the OPSVASRV is limited to ARM, API and REQ rules, or push everything to a REXX. I try to keep everything within the called rule, but that is my idiosyncrasy.   The goal was to perform the filter on the execution before calling a rexx or REQ.

    Thank you for the information.