SQL/MP Programming Manual for COBOL

SQL/MP System Procedures
HP NonStop SQL/MP Programming Manual for COBOL529758-003
5-13
SQLCA_TOBUFFER2_
The default is 1.
To obtain more than one error record, you must increment the value in first-
record-number.
output-records optional output
PIC S9(4) COMP
is the number of records (lines) written by SQLCA_TOBUFFER2_ to
output-buffer.
more optional output
PIC X
is a flag that indicates whether all the desired lines fit into the output-buffer:
output-record-length optional input
PIC S9(4) COMP
defines the length of records to be written to the output-buffer. The length
must be an integer value from 60 to 600.
The default length is 79 bytes.
The procedure pads each line with spaces and adds the suffix and prefix strings if
the ENTER statement specifies them.
sql-msg-file-number optional input/output
PIC S9(4) COMP
is the file number of the SQL message file (SQLMSG is the default file). If you
specify -1 as an input value, the system opens the message file and returns the
resulting file number. If you specify a value other than -1, the system uses that
value as the file number of the message file.
To improve the performance of a program that makes multiple calls to the
SQLCA_TOBUFFER2_ procedure, specify -1 on the first call and then use the
returned file number for subsequent calls. By using the file number, the system
opens the file only once and uses the file number for subsequent calls. Otherwise,
the system opens the file for each call.
The SQLMSG file contains text in English. You can specify a different SQL
message file with the =_SQL_MSG_system DEFINE. For more information, see
SQL Message File
on page 5-2.
Y There were additional records; the buffer overflowed.
N There were no additional records.