CALL 'DSNTIAR' USING comm-area error-message error-rec-length
or, for CICS applications:
CALL 'DSNTIAC' USING comm-area error-message error-rec-length
comm-area | The program's Commarea, usually SQLCA. At run time, the SQLCODE field in the SQLCA structure should contain the code from which DSNTIAR/DSNTIAC generates the character-string message. |
error-message | An array of records of size
error-rec-length used to store error message output. The two components of the
error-message array are:
error-length Containing an integer greater than or equal to 240, indicating the length of the second element, error-text. error-text Containing the text of the message. Generally this message is defined as an array of strings, each having a length of error-rec-length, and occurring n times so that error-length is the larger of 240 and error-rec-length * n. |
error-rec-length | An integer between 71 and 241, indicating the logical record length of output messages. If the error-message length exceeds the length defined for error-rec-length, the message is stored in several logical records. |
The following table shows the return codes that result from calling the DSNTIAR or DSNTIAC utility.
Code | Description |
---|---|
0 | Successful execution. |
4 | More data is available than can fit into the provided message area. |
8 |
The error record length is not within acceptable limits, i.e., 72 <= error-rec-length <= 240. |
12 | The message area was not large enough. Message length was >= 240. |
16 | Error in message routine. |
01 ERROR-MESSAGE. 02 ERROR-LENGTH PIC S9(4) COMP VALUE +288. 02 ERROR-TEXT PIC X(72) OCCURS 4 TIMES. 77 ERROR-REC-LENGTH PIC S9(9) COMP VALUE +72. ... CALL 'DSNTIAR' USING SQLCA ERROR-MESSAGE ERROR-REC-LENGTH