The External Action Block can function as an interface to the external subroutine. Place a CALL statement in the External Action Block stub to access the external subroutine.
The following illustration shows this scenario in more detail. The diagram applies to both online and batch procedure steps.

In the example, the calling procedure step ADD_CUSTOMER needs to access the customer history database using an external subroutine, DBRD1001. The External Action Block READ_HISTORY defines the views of the CA Gen data needed by DBRD1001 and matches them with the views from ADD_CUSTOMER.
The generated source for the procedure step is called ADDCUST in the example. It contains a statement that calls READHIST.
The External Action Block READHIST is the stub generated by CA Gen and modified by an application developer. READHIST uses the data passed from ADDCUST to call DBRD1001. READHIST reformats the data division components created from the CA Gen views to the structure needed by DBRD1001.
Note: The EXTERNAL statement identifies READ_HISTORY as an External Action Block from which CA Gen generates a stub. The modified stub uses the first eight characters of the External Action Block name, READHIST, as the default member name. The READHIST stub uses the import and export view defined for the READ_HISTORY External Action Block as its input and output parameters. The information in these parameters is used to create the calling interface to the DBRD1001 subroutine.
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|