Previous Topic Next topic Print topic


MF 

$DISPLAY Statement

The $DISPLAY statement displays a message on the standard output device during compilation or includes a version number in the object file.

General Format for Format 1


*

General Format for Format 2


*

Syntax Rules

  1. The whole $DISPLAY statement must appear on a single line.

General Rules for Format 1

  1. Text-data is displayed on the standard output device during compilation.

General Rules for Format 2

  1. Version-number is the content of the entire source line following the "=", excluding leading and trailing spaces.
  2. The character string formed by concatenating "@(#)", version-number and a null character (binary zero) is included in the object file, no matter which type of object file is created. If version-number begins with the characters "@(#)", the system does not concatenate these characters when forming the character string.
    Note:
    • Version-number can be any text string, however, it is intended to contain a version number for which a pattern matching tool can search the object file.
    • Unreachable procedural code is eliminated by the Compiler during the optimization phase and the literals used only in that code are discarded. The practice of including version numbers in Procedure Division statements by using the following technique does not work:
       filename-what section. move "@(#)filename %I%>" to what-string perform filename-what 
    • Since the $DISPLAY statement can be specified anywhere in the source code, each text-name (copybook) can have its own version number.
    • Older compilers treat a format 2 $DISPLAY statement as a format 1 $DISPLAY statement.
Previous Topic Next topic Print topic