IBM Security Z Security

Expand all | Collapse all

CKRCARLA Return Code Manipulation

  • 1.  CKRCARLA Return Code Manipulation

    Posted Wed December 09, 2020 07:51 AM
    I'm wondering if there's a way to manipulate the return code from the CKRCARLA program based on results from the query executed.

    One use-case I've came up with would be that I'd want a certain CARLA query to return a RC=8 if any results are returned and if not, a RC=0.

    Is this possible, through some CARLA keyword? Obviously there's other ways to achieve this outside of CARLA, but just curious.

    Adam Klinger

  • 2.  RE: CKRCARLA Return Code Manipulation

    Posted Wed December 09, 2020 08:31 AM
    Edited by Rob van Hoboken Wed December 09, 2020 08:32 AM

    There is no such function in CARLa, but you could add your vote in the system by opening an RFE.  Please be sure to provide use cases so developers know how this is meant to work.
    I use the IDCAMS program to set the JCL level return code, from a temporary file that you fill from a CARLa program.  Then test the return code of the IDCAMS step instead:

    //SYSIN DD *
    newlist dd=rc nopage outlim=1,
      emptylist=' SET LASTCC=4'
      s c=user special revoked
      sortlist ' SET LASTCC=0'

    Rob van Hoboken

  • 3.  RE: CKRCARLA Return Code Manipulation

    Posted Wed December 09, 2020 11:45 AM
    Hi Adam,

    Thanks for your question. It sounds like you basically need the opposite of the current REQUIRED option of the NEWLIST or OPTION statement, and then for use in the batch, not ISPF, and set a return code. What you can today is use the NEWLIST WTO option and trigger an automated operations script. To influence the program return code you would have to put in an RFE for a NEWLIST option for a specific new return code, so far unused, to be set if there is any output in the newlist. Probably we would then design one that can be made to react to either NO output or ANY output in the newlist.

    Hans Schoone
    Chief Architect zSecure
    IBM Security Systems