SQL/MP Programming Manual for COBOL

SQL/MP System Procedures
HP NonStop SQL/MP Programming Manual for COBOL529758-003
5-38
SQLCATOBUFFER
suffix optional input
PIC X(length)
is a string to be appended to each output line. The default is a null string.
suffix-length optional input
PIC S9(4) COMP
is the length of the suffix string for each output line. This length must be an
integer value from 1 to 15. If you include suffix, suffix-length is required.
This example uses a 75-character output record and declares a buffer
SQLMSG-BUFFER as 375 characters. The ENTER statement specifies the SQLMSG
file number with data item SQLMSG-FILENUM set to -1. The statement returns the file
number so that subsequent calls retain the number.
WORKING-STORAGE SECTION.
01 SQLMSG-BUFFER PIC X(375).
01 SQLMSG-FILENUM PIC S9(4) COMP VALUE -1.
PROCEDURE DIVISION.
...
ENTER TAL "SQLCATOBUFFER" USING
SQLCA,
SQLMSG-BUFFER,
375,
OMITTED,
OMITTED,
OMITTED,
75,
SQLMSG-FILENUM.
...