COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
means store A x B into C, D, and E. The values of A and B do not change.
• Operand Identification
For each result, operand identification occurs just prior to the storage operation. For
example, in the statement
MULTIPLY A BY B GIVING C D(C)
the subscript is not evaluated until C has been set to A x B. See Operand Identification
(page 242).
• Arithmetic Operations
See Arithmetic Operations (page 257) for information on data conversion and alignment,
intermediate results, multiple results (and subscript evaluation), and incompatible data.
• Precision
If you omit the SIZE ERROR phrase, arithmetic overflow can cause the run unit to terminate
abnormally. For information on precision of multiplication, see Arithmetic Precision (page 261).
• ROUNDED and SIZE ERROR Phrases
See ROUNDED Phrase (page 244) and SIZE ERROR Phrase (page 244) for information on these.
• Edited Result
The MULTIPLY GIVING statement can produce an edited result, as Example 116 shows.
Example 116 MULTIPLY GIVING Statement
03 UNIT-PRICE PICTURE S9(5)V999 COMPUTATIONAL.
03 ORDERED PICTURE S9(5) COMPUTATIONAL.
03 NET-PRICE PICTURE S9(10)V999 COMPUTATIONAL.
03 NET-PRICE-DSP PICTURE $$,$$$,$$$,$$$.99.
...
MULTIPLY UNIT-PRICE BY ORDERED
GIVING NET-PRICE-DSP ROUNDED
NET-PRICE
OPEN
OPEN makes a file accessible for input, output, or both. OPEN associates a COBOL file name
within the program with a file name known to the file system.
The NonStop operating system treats processes as files, so an HP COBOL program can open a
terminal or another process as a file. The mode in which such files are opened determines how
they are treated (see Table 18: File Open Modes (page 83)).
OPEN 375










