Previous Topic: PGM

Next Topic: *Return Code

*Program Mode

The *Program Mode field specifies the current mode of a program. This field can be used to provide an override to the default initial mode of CA 2E functions and to condition processing according to the current mode.

For example, when you first enter an Edit File or Edit Record function, the program is in *CHANGE Mode unless there are no records in the file to be edited. In this case the program is in *ADD Mode. If you want the end user to be in *ADD Mode regardless of the presence of records in the file, you can override the default in the User Initialization part of the action diagram for the Edit function using the built-in *MOVE function such as:

PGM. *Program mode = CND.*ADD <<<