Skip to content

CMNURIBA (Easy access to http methods from ZMF batch processes)

This program is designed to allow easy access to HTTP methods (GET, POST, etc) from traditional batch processes. It makes use of the z/OS HTTP Web Enablement Toolkit (supplied as part of the operating system). As such, it requires the userid under which it is running to be defined with an OMVS segment. It also establishes (or re-uses) a POSIX(ON) LE enclave. It works with URI's, HTTP headers, and JSON bodies.

The utility can be used to request an external action via an HTTP request, wait for the response, and decide whether to continue with the job based on that response.

Direction on what CMNURIBA is to do is given via SYSIN parameters, these are described below:

Parameter Value
SERVER= Specify the IP address or DNS name which will process the HTTP method
PORT= Defines the port on which this server is listening for us
CONTEXT= REST servlet context, default is zmfrest
HTTPTIMEOUT= Defines how long, in seconds that we should wait for a response (default is 300, i.e. 5 mins)
TRACE= YES/NO. Verbose output produced with TRACE=YES - also requires the HTPTRACE ddname to be allocated. Internally produced trace output is written to SYSPRINT, HTTP toolkit generated trace output is written to HTPTRACE.
URN= Specifies the target resource name for the operation (default is//event/ skel or /zmfevent/event/skel if no context specified, i.e. the REST server as used by skeleton processing)
METHOD= Defines the HTTP method to be used (only GET and POST needed at this time)
PARM= Defines the query parameter to be appended to the header, there can be many of these (see example below).

Also, if a JSON body is required on the request (e.g. for a POST method) this is input (as is) via the JSONIN dd statement (see example below). Note that each JSON clause must be completed within 80 bytes at this time (e.g. like a card image). This may change in future should the need for longer clauses be identified.