COBOL Manual for TNS/E Programs (H06.03+)

Procedure Division Verbs
HP COBOL Manual for TNS/E Programs520347-003
9-47
DIVIDE
°
Figurative constant values
A figurative constant is displayed as a single occurrence of the constant value
(even if the figurative constant includes the prefix ALL).
°
Multiple values
When you specify more than one value in a DISPLAY statement, DISPLAY
combines the values (in the order you specify them) into a single character-
string and displays the character-string. The size of the displayed item is the
sum of the sizes of all the values.
If the character-string exceeds the line capacity of the device, DISPLAY
displays the data as a sequence of lines. Every line except (perhaps) the last
one contains its maximum number of characters. The last line contains
whatever characters are left, up to the maximum.
Displaying Records and Large Amounts of Data
Use the WRITE statement to display records and character-strings longer than
several lines. The DISPLAY statement is not designed to deliver logical records or
large amounts of data to a device.
NO ADVANCING Phrase
If you include the NO ADVANCING phrase, the device is not changed after it
displays the final operand (for example, the device is not repositioned to the next
line). If the device is a printer or a spooler process, this causes the next line
displayed to overprint the current line (useful for underlining). If the device is a
terminal, the cursor appears after the last character displayed (useful for issuing a
prompt and accepting the response on the same line).
DIVIDE
Form Topic
DIVIDE a INTO b DIVIDE INTO
DIVIDE a INTO b GIVING c
DIVIDE b BY a GIVING c
DIVIDE GIVING
DIVIDE a INTO b GIVING c REMAINDER d
DIVIDE b BY a GIVING c REMAINDER d
DIVIDE GIVING REMAINDER