SQL Programming Manual for TAL
System Procedures
HP NonStop SQL Programming Manual for TAL—527887-001
4-15
SQLCATOBUFFER
first^output^record input
INT
is the ordinal number of the first error record (line) to be written to the output buffer.
The procedure discards any error records with a lower number. The default is 1.
The count of lines begins with 1. To obtain more than one error record, you must
increment the value in first^output^record.
output^records output
INT
is the number of records (lines) written by SQLCATOBUFFER to output^buffer.
more output
.INT
returns a flag that indicates whether all the desired lines fit into the output^buffer.
The values SQLCATOBUFFER can return and their meanings are:
Y There were additional records; the buffer overflowed.
N There were no additional records.
output^record^length input
INT
defines the length of records to be written to the output^buffer; the length must be
an integer value from 60 through 600. The default is 79 bytes.
The procedure pads each line with blanks and adds the suffix and prefix strings if
the call specifies them.
sql^msg^file^number input/output
INT
contains the file number of the SQLMSG file. If you pass –1 on input, the system
opens the SQLMSG file and returns the resulting file number. If you pass a value
other than –1, the system uses that value as the file number of the SQLMSG file.
You can improve performance when your program makes multiple calls to the
SQLCATOBUFFER (or SQLCADISPLAY procedure) by specifying a variable
containing –1 on the first call and then including the returned file number on
subsequent call statements. By including the file number, the system opens the file
only for the first call and uses the file number for subsequent calls; otherwise, the
system must open the file for every call.