transfers to and from EGL-generated IMS™ MPPs In IMS/VS, one message processing
program (MPP) can invoke another in either of two ways:
- Immediate message switch
- In an immediate message switch, a program passes control directly to another
transaction without first responding to the originating terminal. Even if
the transferring program is conversational, the IMS scratch pad area (SPA) is not used during
transfer; instead, the program submits data to an alternate PSB whose destination
is set to the receiving transaction.
If the transferring program is generated
by EGL, the transfer is accomplished by one of the following language elements:
- The transfer statement of type transfer to transaction;
or
- The system function SysLib.startTransaction, which can start only
a non-conversational program.
- Deferred message switch
- In a deferred message switch, a program displays a text form on the terminal
so that, when the user submits the form, IMS starts another transaction. The mechanism
of transfer depends on whether the transferring program is conversational
or nonconversational:
- A transferring, conversational program modifies the SPA to include the
transaction name of the receiving program.
- A transferring, nonconversational program includes the new transaction
name on the text form so that the name is in the first eight bytes of the
message received by IMS when the user submits the form.
In either case, the modified data tag in the text form should be set
for all input fields on the form. Otherwise, the following consequences apply:
- If the user submits the form without changing the value in a given field,
the data in that field is not processed by the receiving program
- If the user who is reviewing the form requests presentation of a help
form and then re-displays the original form, the form-field values displayed
on the original form are from the defaults in that form rather than from the
sending program
If the transferring program is generated by EGL, the transfer
is accomplished by the show statement that includes a returning clause.
The use of the property
inputForm in a receiving, EGL-generated
MPP determines which type of message switch is valid:
- If inputFormis not specified, an immediate message switch is required.
- If inputForm is specified, either type of message switch is possible,
but use of a deferred switch is more efficient. If the immediate switch is
used, the form identified in inputFormis displayed automatically by
the transferred-to program, but the receiving program is processed twice —
once to display the form and once to read the user data.
When you transfer control from an EGL-generated IMS/VS program to an EGL-generated
IMS/VS program, the conversational status of the two programs must be the
same: either both must be conversational, or both must be non-conversational.
To specify that an EGL-generated program has reserved a SPA, assign a positive
value in the build descriptor option spaSize.