PL/I provides a sample program DSNTIAR.PLI that you can use to translate an SQLCODE into a multi-line message for display purposes. This PL/I program provides the same function as the DSNTIAR program on mainframe DB2*.
You must compile DSNTIAR with the same DEFAULT and SYSTEM compile-time options that are used to compile the programs that use DSNTIAR.
The caller must declare the entry and conform to the interface as described in the mainframe DB2 publications. For your information, the declaration is of the following form:
dcl dsntiar entry options(asm inter retcode);
Three arguments are always passed:
dcl 1 Message,
2 Buffer_length fixed bin(15) init(n), /* input */
2 User_buffer char(n); /* output */ You must
fill in the appropriate value for n.