Pathway/iTS SCREEN COBOL Reference Manual (G06.24+, H06.03+, Pathway/iTS 1.0+)

Procedure Division
Compaq NonStop™ Pathway/iTS SCREEN COBOL Reference Manual426750-001
6-52
PERFORM Statements
multiplier
is the identifier of an elementary numeric data item. The result of the multiply
operation is stored as the new value of multiplier. The sum of the number of
digits in value and multiplier must not exceed 18.
MULTIPLY GIVING Statement
The MULTIPLY GIVING statement multiplies two numeric data items and stores the
product in one or more other data items.
value
is the multiplicand, which is a numeric literal or an elementary numeric data item.
multiplier
is a numeric literal or the identifier of an elementary numeric data item. The sum of
the number of digits of value and multiplier must not exceed 18.
result
is the identifier of an elementary numeric data item into which the product is stored.
PERFORM Statements
The PERFORM statements execute one or more procedures in a program. When a
single paragraph or section name is specified, control passes to the first statement of the
paragraph or section; when execution of the paragraph or section completes, control
passes to the PERFORM statement. If a group of paragraphs or procedures is specified,
control passes to the first statement of the first paragraph or section; when execution of
the last paragraph or section completes, control returns to the PERFORM statement.
The forms of the PERFORM statement are:
PERFORM
PERFORM TIMES
PERFORM UNTIL
PERFORM VARYING
PERFORM ONE
In each of these forms, two parameters, proc-1 and proc-2, appear. Proc-1 and
proc-2 have no special relationship; they represent a consecutive sequence of
operations to be executed beginning at proc-1 and ending with the execution of
proc-2. GO TO and PERFORM statements can occur within the range of proc-1
and proc-2. If two or more logical paths lead to the return point, proc-2 could be a
paragraph consisting of an EXIT statement, to which all of these paths must lead.
If control passes to these procedures by a means other than a PERFORM statement,
control passes through the last statement of the procedure to the next executable
statement as if no PERFORM statement referred to these procedures.
MULTIPLY value BY multiplier GIVING { result } ,...