ENTER


The ENTER statement unconditionally passes control to another executable program.

 

COMMAND SYNTAX

ENTER program_name
ENTER @variable_name

 

SYNTAX ELEMENTS

program_name is the name of the program to be executed. The use of single or double quotes to surround program_name is optional.
@ specifies that the program name is contained in a named variable.
variable_name is the name of the variable which contains the program name.

 

NOTES

The jBC COMMON data area can be passed to another jBC program by specifying the "(I" option after the program name. Note that the program must be compiled with 'enter_keeps_common_data = true' set in the '$JBCRELEASEDIR/config/Config_EMULATE' file (under the appropriate emulation section).

The COMMON data area can only be passed to another jBC program.

ENTER can be used to execute any type of program.

If the program which contains the ENTER command (the current program) was called from a jCL program, and the program to be executed (the target program) is another jBC program, control will return to the original jCL program when the target program terminates. If the target program is a jCL program, control will return to the command shell when the jCL program terminates.

 

EXAMPLES

ENTER "menu (I" ;* COMMON is passed to program "menu"

ProgName = "UPDATE"
ENTER @ ProgName


jBC