SHOW Command Processing [ HP ALLBASE/4GL Developer Reference Manual Vol. 1 ] MPE/iX 5.0 Documentation
HP ALLBASE/4GL Developer Reference Manual Vol. 1
SHOW Command Processing
The logic SHOW command displays the contents of a single screen field, or
a range of screen fields on the screen. Figures 6-5 and 6-6 show the
logic of the SHOW command.
Figure 6-5. SHOW Command Logic
Figure 6-5 shows the processing that takes place when HP ALLBASE/4GL
executes the SHOW command. The SHOW command operates on a field by field
basis over the range of fields specified in the command parameters.
(Refer to chapter 12, Logic Commands.)
For each field, HP ALLBASE/4GL checks that the field is specified as
included in SHOW on the field details screen. If the field is included
in SHOW, HP ALLBASE/4GL executes the logic shown in Figure 6-6. If the
field is not specified as a show field, processing continues at the next
field in the range.
Figure 6-6. SHOW Command Field Processing Logic
If you specify the *REFRESH option with the SHOW command, the system
moves data from the primary (or default) data movement field to the
screen field buffer. HP ALLBASE/4GL performs any necessary justification
and filling with the pad character and then sets the switch *SHOWING on.
If a SHOW function is specified for the field, HP ALLBASE/4GL executes
the function and then displays the contents of the screen buffer on the
screen.
If the *REFRESH argument is not specified, HP ALLBASE/4GL does not move
data from the primary or default data movement fields. HP ALLBASE/4GL
sets *SHOWING on, executes any show function for the field, and then
displays the existing contents of the screen buffer on the screen.
At the end of the field range, HP ALLBASE/4GL sets *SHOWING to the
condition that existed before the SHOW command was executed.
SHOW Functions
During a SHOW command, HP ALLBASE/4GL executes the function for a screen
field if the Perform on SHOW field on the screen field details screen is
set to Y. The function can test the status of the switch *SHOWING to
determine when it is being executed.
The show function cannot execute a SCREEN command. HP ALLBASE/4GL aborts
the application if it encounters a SCREEN command while a SHOW command is
active.
Be careful about using a SHOW command in a screen field function, and
also specifying that the function is performed on show. This can cause
the application to become locked in an infinite loop.
It is possible for a screen field function to change the number of fields
on the screen by executing a WINDOW command. If this occurs, the range
of fields for the SHOW command is truncated.
If the number of fields on the screen changes due to a WINDOW command
being executed by a function on a field on the main screen, SHOW
processing continues up to the last field on the main screen. If the
number of fields changes while HP ALLBASE/4GL is showing fields on a
window, SHOW processing terminates immediately.
MPE/iX 5.0 Documentation