Calling COBOL Copies from other Applications
It is possible to call COBOL Copies from other AMT-COBOL applications.
To use this command, it is required that the other application uses the same repository as the calling application. The generation options for both applications are expected to be set equally.
Revision version
If the other application contains a generation set
with the same name as for the calling application, then the revision for that generation set will be used.
In all other cases, always the newest revision in the whole repository that is available will be used
(disregarding the generation sets).
Example:
Suppose that the application "AppA" contains an external call to the COBOL Copy "C1" in application "AppB". Both
applications use a generation set called "Prod". The details are as follows:
Application: | Generation set: | Revision for Copy"C1": | |
AppA | Prod | ||
AppA | Test | ||
AppB | Prod | 1.1 | |
AppB | Testing | 1.2 | |
AppB | Develop | 1.3 |
If AppA is generated through the generation set "Prod", then the revision 1.1 will be used for "C1" .
If AppA is generated through the generation set "Test", then the revision 1.3 will be used for '"C1".
Syntax
The syntax for this call is as follows:
CALL <Copy> OF <Application>.
Parameter | Description |
<Copy> | The name of the COBOL Copy. |
<Application> |
The name of the AMT-COBOL application where the COBOL Copy is located. |
Example:
DATA DIVISION.
WORKING-STORAGE SECTION.
COPY CUST_REC OF CUSTOMER_MANAGEMENT.
...