!SCREEN()

!SCREEN()

Top  Previous  Next

 

The !SCREEN() subroutine performs screen based input using a screen definition created using the SCRB command.

 

 

Format

 

CALL !SCREEN(scrn, data, step, status)

 

where

 

scrnis a dynamic array holding the screen definition.

 

datais the data record to be processed.

 

stepholds the step number at which screen execution is to commence. If this is a variable, it will be updated on exit to contain the step at which execution ended.

 

statusidentifies the termination cause on returning to the calling program.

 

 

The !SCREEN() subroutine executes the screen starting at step except for the special step values described below.

 

stepAction
0Clear the screen and paint text and data from all steps except those items with X in their mode value.

 

-1Paint text and data from all steps except those items with X in their mode value without clearing the screen.

 

-2Clear the screen without painting any data.

 

-3Return a single keystroke value.

 

 

On returning to the calling program, status contains

-3Illegal exit key code found in screen definition.
-2Illegal validation code found in screen definition.
-1Step number error.
0Normal exit (X action code)
1Exit key (escape) used with action code X
2Backstep key used with no step history.
nFunction key used. n is the key value as in KEYIN.H.

 

 

Example

 

READ SCRN FROM SCR.F, 'MY.SCREEN' ELSE ABORT 'Cannot read screen'

DATA = ''

CALL !SCREEN(SCRN, DATA, STEP, SCR.STATUS)

 

The above code fragment reads a screen definition and executes the screen driver to process the data record using this definition.