ADV

ADV affects WRITE ... ADVANCING statements, determining whether one byte is added to the record length for the printer control character.

Syntax

Read syntax diagramSkip visual syntax diagramADV=*YESNO
Default
ADV=YES
YES
Adds one byte to the record length for the printer control character. This option might be useful to programmers who use WRITE ... ADVANCING in their source files. The first character of the record does not have to be explicitly reserved by the programmer.
NO
Does not adjust the record length for WRITE ... ADVANCING. The compiler uses the first character of the specified record area to place the printer control character. The application programmer must ensure that the record description allows for this additional byte.
Note:
  • With ADV=YES, the record length on the physical device is one byte larger than the record description length in the source program.
  • If the record length for the output file is not defined in the source code, COBOL ensures that the DCB parameters are appropriately set.
  • If ADV=YES is specified, and the record length for the output file has been defined in the source code, the programmer must specify the record description length as one byte larger than the source program record description. The programmer must also specify the block size in correct multiples of the larger record size.
  • If the LINAGE clause is specified in a file description (FD), the compiler treats that file as if ADV=YES has been specified.