You can use the show statement
to send a text form to the user and to start a new transaction when
the user enters input on the form.
You specify the name of the next transaction and the text form
on the show statement; a record name is
optional. The generated program displays the form and identifies the
next transaction to the CICS® or IMS™ environment. The new transaction
is scheduled when input is received from the program user.
When you use a show statement, you must
specify the same form in the inputForm property
for the transferred-to program. The inputForm property
contains the name of the form that provides input to the program before
processing begins. The transferred-to program begins by reading the
same form displayed using the show statement
in the initial program. You can use the inputForm property
and show statement to create an IMS deferred program switch or a RETURN TRANSID
for CICS.
Note: For IMS/VS, when you use a show statement
and the inputForm property, the two programs
must share the same FormGroup. For other environments, the form can
be in different FormGroups, but it must be the same form.
When you specify the
inputForm property
for a program, the processing that occurs when that program is started
varies:
- If a form is not received, the generated program automatically
displays the form that was specified in the inputForm property.
- If a form is received, the generated program automatically performs
any validation edits that are required before beginning the normal
processing logic.
When you transfer program control using a
show statement,
you control the amount of data saved during user think time and the
location where it is saved:
For the IMS/VS environment, if you want to avoid saving a copy
of the form in the work database, you must do the following:
- Set the modified property to YES for
all variable fields on the form. You can do this when you define the
default attributes for the fields on the form or with the set statement.
- Ensure that all the other properties are set to their defined
values before the show statement.
- You can save data in a database using EGL add or replace statements
and then restore the data in the transferred-to program.
- You can also use a show statement to
transfer to the same program (program A can transfer to program A
by using a show statement).