

Implementing Your Application › Calling a Program
Calling a Program
You can execute a compiled program using:
- Toolkit menus.
- The CA 2E Call a Program (Y2CALL) command. This command determines the parameters required by an external function directly from details contained in the model. You can provide values for all input-capable fields and you can re-use these values for subsequent calls.
- This command is useful especially when the parameter interface is complex or if it has changed.
- The ‘Call function’ option on the Action Diagram Services panel.
- The i OS CALL command:
CALL program ' '
where:
- Program—Is the name of the source member for the function's program.
- ' ' (single quoted space)—Is a required dummy parameter that represents the standard return code parameter.
Note: Other parameters may be required. How these are passed depends on how they are defined in the function.
For more information:
- On modifying function parameters, refer to Building Applications.
- On calling functions from the Action Diagram Services panel, see the Using Action Diagram Services section of the "Modifying Action Diagrams" chapter in Building Applications.
- On the Y2CALL command, refer to the Working with Versions of Functions and Messages in the "Managing Model Objects" chapter in this guide, and the Command Reference Guide.
To find the name of the program you want to execute, use one of the following methods:
- For the CALL and Y2CALL commands, go to the Display Services Menu and use the option, Display all functions. Note the source member name of the program you plan to execute.
- From the Toolkit Work with Menu Options panel, enter the following values:
|
Option
|
Value
|
|
Option type
|
PGM
|
|
Option to be executed
|
?
|
|
Library
|
*MDL
|
A selection list of functions displays. Note the source member name (DDS name) of the function you want to execute.
Note: All CA 2E generated external functions have at least one parameter, a return code. In the following logic, checking is being done to show the program ended normally:

Copyright © 2014 CA.
All rights reserved.
 
|
|