

Subprograms › Defining Non-Ideal Subprograms
Defining Non-Ideal Subprograms
To create, compile, and call a non-Ideal subprogram, complete the following steps:
- On the CA Ideal command line, issue a CREATE PGM command for the subprogram. Use the same name as the subprogram.
- On the IDENTIFICATION panel, change the language prompt from IDEAL to one of the following:
- On the PARAMETER panel, fill in all parameters passed to and from the non-Ideal subprogram.
- On the CA Ideal command line, issue an EDIT PGM programname command, where programname is the name of the calling program.
- Define the subprogram as a RESOURCE of the calling program.
- To call the subprogram, code an IDEAL CALL statement in the calling program. You can pass a maximum of 16 parameters.
- Compile the main program.
- Compile and link the subprogram. For instructions to compile, refer to the documentation for your compiler. For instructions to link, see Linkage Conventions for Non-Ideal Subprograms.
- Run the main program. When you run the calling program, CA Ideal calls the subprogram and passes the proper parameters to it. In addition, CA Ideal automatically performs any internal data-type conversions.
CA Ideal does not control the runtime environment of a non-Ideal subprogram; therefore, certain situations are handled with less flexibility than when both programs are CA Ideal.
Copyright © 2015 CA Technologies.
All rights reserved.
 
|
|