Skip to content

Sample REXX HLL exit code

General note on usage: All HLL exits may have an impact on the client user interface. Especially, for example, if an HLL exit does a significant amount of processing the user will be ’locked’ in their interaction with ZMF in general. This may cause a frustrating end-user experience. For that reason it is recommended (and the samples supplied follow this recommendation) that HLL exits be used to simply notify the REST server of events and not to expect significant synchronous processing by the target process before returning to the REST server. Use of the post-service HLL exits (supplied in the samples) is recommended for event notification purposes. The target process should return immediately to the REST server even if significant processing has been initiated. The user will remain locked by HLLX until the target process has returned to the REST server and the REST server has, in turn, returned to the HLL exit. Also note that the out-of-the-box support is placed after the function service has completed (i.e. we are notifying the REST server that something has already happened). No check is (or should be) made on the success or otherwise of the call to the REST server. There is no point as the ZMF function has already been completed and whatever happens the other side of the REST server is of no consequence to that ZMf action. Note that the REST server will differentiate between the call origins for the same event so that the target process can decide whether to undergo significant synchronous processing for the event (e.g. as driven from a batch job step via the zmfevent/event/skel urn) or not (e.g. when driven from an HLL exit via the zmfevent/event/hllx urn).

When the HLLX address space starts up (and when a HLLX RELOAD is requested) the ZMF settings for the REST server are passed to it. If the REST server is active then it will query all HLLX supported events to see if there are subscribers. For all subscribed-to events the relevant (HLLX TCA) variable will be set to Y. When the HLL REXX exit is called CMNREXCI (our REXX initialization exit) has access to all these variables and will set the relevant REXX variables for use by the target HLL exit.

The supplied sample exit points for calling the REST server from an HLL exit are these:

Event HLL exit name Description Sample exit name
01 RVRT01XB Backout Package HXRRVEV
10 RVRT01XM Revert Package HXRRVEV
20 APRV01XM Approve Package HXRAPEV
30 APRV01XM Reject Package HXRAPEV
40 FREZ01XM/FREZ01XR Freeze Package HXRFREV
42 FREZ01XU Selectively Unfreeze Package HXRFREV
44 PRDM01XD Demote Package HXRPREV
48 PRDM01XP Promote Package HXRPREV
50 AUDT01JB Audit Package HXRAUEV
64 SCRN01XM Scratch component HXRSCEV
66 SCRN01XM Rename component HXRSCEV
67 BULD01XL Relink component HXRBUEV
78 RCKI01CI Checkin to area is complete HXRRCEV
80 PCRE01XM Create Package HXRPCEV
82 CKOT01XM Checkout Component HXRCKEV
84 BULD01XC Stage Component HXRBUEV
86 BULD01XD Delete component from pkg HXRBUEV
87 CKOT01XM Checkout from release HXRCKEV
88 PCRE01XM Copy forward package HXRPCEV
100 BULD00XB Pre-build of component HXRBUEV
101 BULD01XB Post-build of component HXRBUEV

The REXX variable 'evSrvActive' is defined for all HLL exits and set to Y or N to denote whether HLLX has found the REST server to be active. RES 3 pp;T server exit code should only ever be executed if evSrvActive='Y'.

The following REXX variables are defined and set only if evSrvActive='Y':

  • evSrvAddress: The DNS/ip address of the REST server (e.g. in our test cases this was set to 'd001.microfocus.com')

  • evSrvPort: The port on which the REST server is listening (e.g. 09992 in our test case)

  • evSrvContext The context for the target event servlet (default is zmfevent)

  • evSrvEvent/nn/: where /nn/ or /nnn/ is set to the specific event id (e.g. evSrvEvent01). These variables are set to Y or N depending on whether or not the event is active (i.e. subscribed to at the eventserver).

Look at the sample code for an HLL exit that is invoked at 5 HLL exit points relating to 5 different events, in member HXRBUEV of the SAMPLE library.