(Areas 1, 2A, 2B, 3, 4A, 4B)
The CALL command enables you to dynamically include prestored input statements from the Reporting Facility call library at compilation time. This makes it unnecessary to recode long and complex groups of command sequences that are common to more than one Reporting Facility program. The Reporting Facility compiler fully edits each command within the library member each time it is included in the program.
The format of the CALL command is as follows:
►►─ CALL ─ membername ─┬─────────────────────────┬────────────────────────────►◄ │ ┌─────────────┐ │ └─ USING ─▼─ argumentn ─┴─┘
Specifies the name of the member contained in the Reporting Facility library to be included at the current point in the Reporting Facility source program.
Specifies from 1 to 30 arguments to be passed to the library member and substituted during inclusion. Each argument must be an alphanumeric literal, a numeric constant, or a valid field name. Terminate individual arguments with a blank.
Note the following:
Example
Assume that the following member was cataloged to the call library prior to its use in a Reporting Facility program:
LOAD PCALC
DECODE :01 INTO :02 'A' EQ 1.72
'B' EQ 1.22
'C' EQ 1.63
'D' EQ 2.01
'E' EQ 2.43
OTHERWISE 2.00
COMPUTE :03 EQ ((:02 + :04)/100)
The following CALL command, CALL PCALC USING CLASS RATE DISCOUNT 18.7, would result as if the following statements were coded:
DECODE CLASS INTO RATE 'A' EQ 1.72
'B' EQ 1.22
'C' EQ 1.63
'D' EQ 2.01
'E' EQ 2.43
OTHERWISE 2.00
COMPUTE DISCOUNT EQ ((RATE + 18.7)/100)
|
Copyright © 2014 CA.
All rights reserved.
|
|