COBOL Batch Subroutine Client SERXMLCC
To process requests and receive replies from the SERERNA XML Services interface, your custom COBOL program must call the COBOL batch client program, SERXMLCC. You issue this call after initializing and populating a set of request variables in the REQUEST-BUFFER data structure of a particular COBOL copybook. Your custom COBOL program may issue only one Serena XML Services request at a time. The associated reply — which is delivered to the RESULT-BUFFER data structure by SERXMLCC — should be processed before another request is sent.
SERXMLCC preprocesses your generated XML request message to ensure a minimum level of well-formed syntax and to verify that all required XML tags are present. It then passes your message to the SERCLIEN messaging client for delivery to SERNET and the
ChangeMan ZMF server. On receipt of an XML reply, SERXMLCC parses the XML message and populates the COBOL variables in the RESULT-BUFFER.
The SERXMLCC subroutine is designed to run in batch mode only.
Compiling Programs That Call SERXMLCC
Your custom program that uses COBOL-to-XML copybooks and calls SERXMLCC observe the following JCL requirements.
Compile JCL
The SYSLIB DD statement in your compile JCL must include the Serena SERCOMC ASMCPY library that you unloaded from the ChangeMan ZMF installer. This is where the COBOL-to-XML copybooks reside.
Make dynamic COBOL calls to SERXMLCC and use compile parameter DYNAM to avoid having to relink your program each time a new version of SERXMLCC is released by Serena.
Link-edit or Binder JCL
If you choose to link SERXMLCC statically to your custom program, then the SYSLIB DD statement in your link-edit JCL must include the Serena SERCOMC LOAD library you unloaded from the ChangeMan ZMF installer. This is where the COBOL batch subroutine client SERXMLCC and all other Serena subroutines reside.
Link edit your program into your custom CMNZMF LOAD library.
Running Programs That Call SERXMLCC
When you call SERXMLCC from your user program, you connect indirectly to the SERNET started task with the subsystem ID that you moved to the HEADER-SUBSYS variable in the COBOL-to-XML copybook in your program.
The libraries you use in the execution JCL for your programs must be the same as the libraries in the SERNET started task JCL.
-
STEPLIB or JOBLIB — Use the same load library concatenation that you use in the STEPLIB for the SERNET started task JCL.
-
SER#PARM — Point to the same PDS that is coded in the SERNET started task JCL at the SER#PARM statement.
Return Codes
COBOL batch subroutine client SERXMLCC generates the following return codes.
Return Code | General Description |
---|---|
**00 | Successful completion. |
**04 | Warning message generated by low-level service object on server. Nonfatal error. |
**08 | XML tag is missing a required name attribute. Fatal error. |
**12 | XML tag contains a value that is the wrong length. Fatal error. |
**16 | A mandatory XML tag is missing. Fatal error. |
Other reason codes and error messages are passed through from the low-level service objects in ChangeMan ZMF to your COBOL program in the STATUS-MESSAGES variables in the COBOL copybooks.