Beruflich Dokumente
Kultur Dokumente
Dec-2008
Objectives
The participants will be able to execute PAI modules conditionally using the
following extensions:
ON INPUT
ON REQUEST
AT EXIT-COMMAND
AT CURSOR-SELECTION
Dec-2008
Overview
ON INPUT
Conditional
Execution Flow
Logic Additions
ON REQUEST
AT EXIT-COMMAND
AT CURSORSELECTION
Dec-2008
ON INPUT
Dec-2008
ON REQUEST
Dec-2008
AT EXIT-COMMAND
Dec-2008
Timing of AT EXIT-COMMAND
Type E
Function Code
SCREEN
NO
Module END
executed.
Automatic
Screen Field
Checks
OK?
Module CHECK
executed.
Dec-2008
YES
Go to PBO of
next screen
2005 IBM Corporation
AT EXIT-COMMAND Example
PROCESS AFTER INPUT.
FIELD YMOVIE-AAYEAR
Exit
Edit
Loop
Academy Awards
Year
1994
Category
PIC
If the user invokes the EXIT function code (e.g., clicking on Exit), we
will terminate the transaction. Because this function code is type E,
we can use AT EXIT-COMMAND to have the module END executed
immediately (even before the automatic field checks).
Dec-2008
AT CURSOR-SELECTION
Dec-2008
10
Dec-2008
11
Dec-2008
Demonstration
Demonstrating conditional execution of PAI module of an online program.
12
Dec-2008
Practice
Demonstrating conditional execution of PAI module of an online program.
13
Dec-2008
Summary
With the ON INPUT addition to the MODULE statement, a module will be
executed only if the specified fields value is not equal to the initial value
appropriate to its data type.
With the ON REQUEST addition to the MODULE statement, a module will be
executed only if a value has been entered in the specified field since the screen
was displayed.
With the AT EXIT-COMMAND addition to the MODULE statement, a module
will be executed only if the user invokes a function code with the E function type.
With the AT CURSOR-SELECTION addition to the MODULE statement,
a module will be executed only if the user invokes the function code CS
with the S function type.
14
Dec-2008
Questions
What is the use of the ON INPUT PAI extension ?
What is the use of the ON REQUEST PAI extension ?
What is the use of the AT EXIT-COMMAND PAI extension ?
What is the use of the AT CURSOR-SELECTION PAI extension ?
15
Dec-2008