In addition, the effect of build descriptors is also discussed in detail.
For more information on how to interact with IMS control blocks, see EGL support for runtime PSBs and PCBs.
The next two sections provide information particular to each of the two program types.
If you code a main program that accepts or displays a text form, EGL handles the details of I/O PCB access. You must set the segmented program property to YES.
You can interact with the terminal by using the converse statement, which presents a text form and responds to the user's input by processing the statement that follows the converse statement. For an overview of the runtime behavior, refer to the EGL Language Reference.
Although use of a converse statement is relatively simple, you get better performance by using a show statement. You can use the show statement to return to the beginning of the same program or to another program. The show statement must specify the same form that the receiving program specifies as its inputForm. Use of the show statement limits the data that is saved to just the information in the form and record that are specified on the show statement. However, you must be sure to code your program so the form and record provide all the necessary information to continue the interaction with the program user.
Your program can run as an IMS conversational or nonconversational program, can transfer to or call another program, and can issue a show statement with a returning clause. For restrictions that apply to a particular type of statement, see the topic that describes the statement syntax.
If you code a main program that neither accepts nor displays a text form, input is available from the IMS message queue. To retrieve that input, you code a loop that reads one message after another into a serial record that is associated with the I/O PCB. For input from a message queue, the file type associated with the serial record may be SMSGQ or MMSGQ. For details, see Using serial and print files in IMS.
In most environments, when a main basic program is started, the program's input record is initialized from the record that was passed by the transferring program. This is not true of a main basic program that is generated for the IMS BMP environment. Instead the target program must read the transferred record from the message queue.
An EGL-generated called basic program can be called from EGL-generated Java™ code on another platform.
Your program can run as an IMS nonconversational program and can transfer to a program or call another program in the same IMS/VS system. For restrictions that apply to a particular type of statement, see the topic that describes the statement syntax.
On IMS, an EGL-generated called program cannot read from a message queue. A basic program cannot use the transfer to transaction statement.
You can generate both Text UI and basic programs to run in an IMS FastPath (IFP) region, in which case the situation is the same as described for an MPP region, except that (in keeping with IMS requirements) the program must be nonconversational. In addition, use of multi-segment input message queues (including the use of converse statements) is not recommended for IMS fast path programs for performance reasons.
You can generate a basic program that runs in an IMS BMP region.
To create a transaction-oriented IMS BMP program, you must retrieve input from the IMS message queue by coding a loop that reads one message after another into a serial record that is associated with the I/O PCB. The use of single-segment and multi-segment message queues is as described earlier for IMS MPP programs. To create a batch-oriented IMS BMP program, do not read input from the IMS message queue. For details, see Using serial and print files in IMS.
Your code can transfer to or call another IMS BMP program. A called program cannot read from a message queue.
You enforce some decisions outside of your code, by setting options in the build descriptor that is used at generation time.