Controlling initialization of QSAM buffer (IGZ4OPT)

The first character in a QSAM file can be used as a control character (CC) for printer spacing control. In some cases, a blank record with just the control character is outputted, depending on semantic requirements of the LINAGE clause or WRITE AFTER...LINE(S) statement.

The bytes after the CC are called the slack bytes. In Enterprise COBOL V5.1 and earlier versions, the value of these slack bytes is undefined. It might be either EBCDIC SPACE or BINARY ZERO, but no explicit initialization is done during the COBOL processing routine. These slack bytes are technically irrelevant because the printer would have moved to a different line when processing the CC. However, some printers might misbehave with a certain value.

To control what the QSAM buffer is initialized with during COBOL processing and ensure that the value of slack bytes is consistent, apply the COBOL runtime LE PTF for APAR PH25917 and take the following steps:
  1. In the Language Environment® sample data set .SCEESAMP, copy and customize the sample JCL IGZ4OPT. Specify the QSAMBUFFINITCHAR option as needed. Change the JOB card and load library name, and run this JCL to generate IGZUOPT.
  2. Put this module in a data set in the STEPLIB concatenation when running the application.
When using the sample JCL IGZ4OPT to create IGZUOPT, JOB STEP1 of the JCL assembles an assembler program that invokes a MACRO called IGZXOPT. This macro is used to specify special COBOL runtime options. Specify the QSAMBUFFINITCHAR option with the following syntax:
IGZXOPT QSAMBUFFINITCHAR=DEFAULT | SPACE | BINZERO
The setting of QSAMBUFFINITCHAR can be DEFAULT, SPACE, or BINZERO, and the default value is DEFAULT. The QSAM buffer is initialized based on the value that you specify:
  • If DEFAULT is specified, the QSAM buffer used for the LINAGE clause or WRITE AFTER...LINE(S) statement is using the same behavior as in Enterprise COBOL V5.1 or earlier versions.
  • If SPACE is specified, the QSAM buffer used for the LINAGE clause WRITE AFTER...LINE(S) statement is initialized with EBCDIC SPACE (X'40').
  • If BINZERO is specified, the QSAM buffer used for the LINAGE clause or WRITE AFTER...LINE(S) statement is initialized with BINARY ZERO (X'00').