HWTJTERM — Terminate a parser instance
Call the HWTJTERM service to clean up resources obtained by a previous HWTJINIT invocation.
Description
When the services of a z/OS® JSON parser instance are no longer needed, this service cleans up the resources in use by that parser instance. If this service is not invoked, the memory space allocated by the initialization and other parser services is allocated and ineligible for use by the application, and remains allocated until the job step task of the address space terminates.
Environment
The requirements for the caller are:
Requirement | Details |
---|---|
Minimum authorization: | Supervisor state or problem state, any PSW key. |
Dispatchable unit mode: | Task or SRB. |
Cross memory mode: | Any PASN, any HASN, any SASN. |
AMODE: | 31 bit. |
ASC mode: | Primary or access register (AR). |
Interrupt status: | Enabled for I/O and external interrupts. |
Locks: | No locks held. |
Control parameters: | Control parameters must be in the primary address space and addressable by the caller. |
Linkage: | Standard MVS™ linkage conventions are used. |
Programming requirements
See Syntax, linkage, and programming considerations for details about how to call the z/OS JSON parser services in the various supported programming languages.
REXX programming considerations for the HWTJTERM service
- ForceOption is not used
Syntax
Write the call as shown in the following syntax diagram. You must code all parameters in the order shown.
Non-REXX parameters | REXX parameters |
---|---|
CALL HWTJTERM( |
address hwtjson "hwtjterm", |
Parameters
The parameters are explained as follows:
- ReturnCode
- Returned parameter.
- Type: Integer (non-REXX), character representation of an integer (REXX)
- Length: 4 bytes (non-REXX)
- ParserHandle
- Returned parameter.
- Type: Character string
- Length: 12 bytes (non-REXX)
- ForceOption (non-REXX)
- Supplied parameter.
- Type: Integer
- Length: 4 bytes
- HWTJ_NOFORCE
- (Recommended) Terminates the parser instance and invalidates its parser handle only if the parser instance is not in an in-use state.
- HWTJ_FORCE
- Unconditionally terminates the parser instance and invalidates its
parser handle, regardless of the in-use status of the parser instance. Attention: Only use the HWTJ_FORCE option under the following conditions:
- No other threads in the address space are using this parser instance
- Multiple attempts to terminate the parser instance have resulted in a return code of HWTJ_PARSERHANDLE_INUSE.
- DiagArea (non-REXX)
- DiagArea. (REXX)
- Returned parameter.
- Type: Character string (non-REXX), stem variable (REXX)
- Length: 136 bytes (non-REXX)
ABEND codes
- yyyy
- Reason
- 0000
- The parameters passed by the caller are not in the primary address space.
- 0001
- The number of parameters passed by the caller is incorrect.
Return codes
When the service returns control to the caller, GPR 15 and the returnCode parameter contain a hexadecimal return code, as listed in Table 1.
Hexadecimal return code |
Meaning and action |
---|---|
0 |
Meaning: Successful
completion. Action: None. |
101 |
Meaning: Program error. The specified
parserHandle parameter is not a valid parser handle
(that is, one that was returned by the HWTJINIT
service). Action: Check for a probable coding error. |
102 |
Meaning: Program error. Two possible reasons can result
in this return code:
Action: Check for a probable coding error.
|
103 |
Meaning: Program error. The application passed an input
or output parameter which was inaccessible by the parser. See General programming considerations for
details about z/OS JSON parser
recovery processing. Action: Check for a probable coding error. Likely, the recovery of the caller detected this return code as a result of the parser abnormally ending with a X'0C4' system ABEND. Check the diagArea for an explanation as to which parameter was attempting to be accessed when the parser service calls abnormally ended. See General programming considerations for details about actions to consider for this return code. |
701 |
Meaning: System error. The Storage Release service
could not release the work area storage as requested by the z/OS JSON parser. Action: Consult the diagArea for the Storage Release failure return code and additional information found in the diagDesc section. If the problem persists, search problem reporting databases for a fix for the problem. If no fix exists, contact the IBM® Support Center. |
702 |
Meaning: Program error. The caller specified an invalid
forceOption value. Action: Check for a probable coding error. The caller should change the forceOption value to one of the valid values, as described in Parameters. |
F01 |
Meaning: Program error. The calling program is
disabled. The system rejects the service
request. Action: Check the calling program for a probable coding error. |
F02 |
Meaning: Program error. The calling program is holding
one or more locks. The system rejects the service
request. Action: Check the calling program for a probable coding error. |
F03 |
Meaning: The operating system level does not support
this service. The system rejects the service
request. Action: Remove the calling program from this system, install it on a system that supports z/OS JSON parser services, and run the calling program again. |
FFF |
Meaning: System error. The service encountered an
unexpected error. The system rejects the service
call. Action: Search problem reporting databases for a fix for the problem. If no fix exists, contact the IBM Support Center. |