IBM Support What's New?

COBOL printed output is ignoring print control characters

Technote (FAQ)


Why are the print control characters loaded into print buffer position 1 not being used?


The compiler option NOADV influences this.


If the NOADV compile time option is used, printer control characters are moved into print position 1 by the program.

The output printed file from a COBOL program coded with WRITE REC-NAME without the ADVANCING clause anywhere in the program and compiled NOADV will ignore any program preloaded carriage control characters.
Under COBOL, if the NOADV compile time option is used and the printer control characters are loaded into print position 1 by the program, an AFTER ADVANCING clause must be used at least once in the program to trigger the access method to use the first position of each record as a printer control character. Otherwise, the output will be single spaced, the preloaded character will print as position 1 and the 132nd character will be shifted to the 133rd position and will be lost on a 132 character printer or
Add one WRITE REC-NAME AFTER ADVANCING statement to the program.
A second option is available under zOS (or OS390 or MVS/ESA).
The user may code RECFM=FA, FBA, VB, or VBA in the DCB of the output file (or SYSOUT) DD statement and the first character will be analyzed correctly.

Cross Reference information
Segment Product Component Platform Version Edition
Software Development COBOL for VSE/ESA Compile VSE/ESA 1.1
Software Development COBOL for OS/390 & VM Compile VM/ESA 2.2

Document information

More support for: Enterprise COBOL for z/OS

Software version: 3.4, 4.1, 4.2

Operating system(s): z/OS

Reference #: 1004561

Modified date: 2010-12-01