DISPLAY Screen-Name Statement COBOL

The DISPLAY Screen-Name statement moves data onto the terminal screen from literals or from data items defined in the Data Division.The organization, placement and visual attributes of the fields on the screen are defined in the Screen Section of the Data Division.

Format 3:Display Screen-Name

Display Screen-Name

COL is a synonym for COLUMN.

A DISPLAY statement that specifies multiple screen names is equivalent to a series of DISPLAY statements, one for each of the specified screen names.

Each screen-name-1 must be defined as an elementary or group entry in the Screen Section of the Data Division.If screen-name-1 is an elementary item, it is treated as if it were a group consisting of the single elementary item to which it refers. identifier-1 and identifier-2, when used, must refer to elementary numeric integer data items.

If the LINE phrase is specified, the value of integer-1 or the current value of the data item referred to by identifier-1 is used as an increment to each of the explicit or implicit LINE specifications within screen-name, thus shifting the screen downward the specified number of lines.

A similar rule applies if the COLUMN phrase is specified:the value of integer-2 or the current value of the data item referred to by identifier-2 is used as an increment to each of the explicit or implicit COLUMN specifications within screen-name-1, thus shifting the screen to the right the specified number of columns.

Each elementary item subordinate to screen-name-1 is acted on in response to a DISPLAY statement.Areas of the screen not specifically changed by fields within screen-name-1 remain unchanged.All the attributes meaningful for output operations are effective.This excludes AUTO, FULL, REQUIRED and SECURE.For fields defined with a VALUE clause, the literal is moved to the screen field.For fields defined with a PICTURE clause that has a FROM or USING option, the value of the associated item is moved to the screen field item and to the retained value.For fields defined with a PICTURE clause that has the TO option and no FROM option, the screen field and the retained value are filled with underline characters. Numeric data items are always displayed with output conversion.

The appearance of the screen is undefined and unpredictable when LINE or COLUMN values are specified such that screen fields extend beyond the boundaries of the physical screen, either horizontally or vertically.

DISPLAY Screen-Name Statement Examples


Face Book Twitter Google Plus Instagram Youtube Linkedin Myspace Pinterest Soundcloud Wikipedia

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

COBOL Topics