SQL/MP Programming Manual for COBOL
SQL/MP System Procedures
HP NonStop SQL/MP Programming Manual for COBOL—529758-003
5-12
SQLCA_TOBUFFER2_
This procedure is similar to the SQLCA_DISPLAY2_ procedure, which writes error 
information to a file or terminal. 
sqlca required input
is the record name of the SQLCA.
The SQLCA is declared automatically when you give the INCLUDE SQLCA 
directive in the Working-Storage Section.
output-buffer required input/output
PIC X(length)
is the record name to which SQLCA_TOBUFFER2_ writes the error information.
output-buffer-length required input
PIC S9(4) COMP
is the length of output-buffer in bytes. The length must be:
An integer value from output-record-length through 600
A multiple of output-record-length. 
The minimum length recommended is 300 bytes.
first-record-number optional input
PIC S9(4) COMP
is the ordinal number of the first error record (line) to be moved to the output buffer. 
The procedure discards any error records with a lower number. The count of lines 
moved begins with 1. 
ENTER TAL "SQLCA_TOBUFFER2_" USING
 sqlca,
 output-buffer,
  output-buffer-length,
 [ first-record-number, ]
 [ output-records, ]
 [ more, ]
 [ output-record-length, ]
 [ sql-msg-file-number, ]
 [ errors, ]
 [ warnings, ]
 [ statistics, ]
 [ caller-error-loc ]
 [ internal-error-loc, ]
 [ prefix, ]
 [ prefix-length, ]
 [ suffix, ]
 [ suffix-length ].










