This
section provides information on how to invoke the z/OS XML System Services assembler API.
Callers written in assembler can invoke the
z/OS XML System Services assembler API
by binding the
z/OS XML parser's
callable service stubs to their module. The callable service stubs
can be found in SYS1.CSSLIB. Alternatively, the addresses of the APIs
can be obtained from system control blocks. The following is a list
of offsets for the callable services first and second tables (all
offsets are in hex):
- +10 — Pointer to CVT (field FLCCVT in IHAPSA)
- +220 — Pointer to the callable services first table (field CVTCSRT
in CVT)
- +48 — Pointer to the z/OS XML parser callable services
second table (entry 19)
Note: Prior to z/OS® V1R7,
this field will point to the address of an undefined callable service.
In z/OS V1R7 and later releases,
this field is zero until the z/OS XML parser initialization
routine fills it in. To avoid calling z/OS XML System Services when it is
not present, the caller first needs to verify that it is running on
V1R7 or later, and that this field in the callable services first
table is non-zero.
- +nn — The offset for each callable service in hex is listed below.
The following stubs are provided for 31- and 64-bit mode callers:
Table 1. Caller stubs and associated offsetsStub |
Second Table offset (hex) |
GXL1INI — 31-bit parser initialization |
10 |
GXL1PRS — 31-bit parse |
14 |
GXL1TRM — 31-bit parser termination |
18 |
GXL1CTL — 31-bit parser control operation |
1C |
GXL1QXD — 31-bit query XML document |
20 |
GXL1LOD — 31-bit load a function |
24 |
GXL4INI — 64-bit parser initialization |
28 |
GXL4PRS — 64-bit parse |
30 |
GXL4TRM — 64-bit parser termination |
38 |
GXL4CTL — 64-bit parser control operation |
40 |
GXL4QXD — 64-bit query XML document |
48 |
GXL4LOD — 64-bit load a function |
50 |
Note: The
64-bit stubs are defined with 8 byte pointers.
Following the offsets to the caller stubs, at
offset 78 (hex) from the start of the second table, is an 8 byte field
of bits. These bits indicate the presence of a particular z/OS XML capability.
Callers may reference these bits to determine if the function or feature
that they intend to use is supported by the installed version of z/OS XML.
The following table lists the bits that are defined,
along with their descriptions:
Table 2. Capability bitsCapability bit |
Description |
'0000000000000001'X |
XDBX validation is available |
The following assembler code is an example of how to call a
z/OS XML parser service. The
example assumes the caller uses the CVT field names instead of hard
coding those offsets.
LLGT 15,CVTPTR R15L -> CVT, R15H = 0
L 15,CVTCSRT-CVT(15) Get the CSRTABLE
L 15,72(15) Get CSR slot 19 (zero based) for XML parser
L 15,16(15) Get address of GXL1INI from XML second table.
BALR 14,15 Branch to XML service.