You are here: Development Standards > Routines > General Routines > GENSCROL.PUB

# GENSCROL.PUB

GENSCROL.PUB is a public program for dealing with terminal information, setup, and movement for output to the screen. It creates the windows used in the report programs for terminal output of a report. It also monitors the keyboard, once a page of the report has been printed, and handles user input. It can manage five pages in memory at one time on a FIFO basis. If the workstation default for screen pages is increased, the user can keep more than five pages in memory. Increasing this number too much may cause unexpected errors if insufficient memory is available.

`XXXX ENTER CHAN,WINDROW,EFLAG`

Variable | Description
CHAN | Channel number for the terminal
WINDROW | First detail line of report (for positioning the highlighted bar)
EFLAG | End-of-Page or Report flag: 1 = end of page 2 = end of report

Exit Points | Explanation
EXIT | GENSCROL.PUB normally exits with no error.
EXIT 127 | An Escape is returned if the user ESCAPEs (Ctrl+Break on PCs, or F7-Exit).

When the user presses Enter, the program creates a new window and returns to the CALLing program. Here is a list of acceptable keystrokes and the meaning of each:

Key | Movement
<Home> | First available page
<End> | Last available page
<PgUp> | Page backward in memory
<PgDn> | Page forward in memory
<Up> | Highlight row up
<Down> | Highlight row down
<Right> | Move screen right one column
<Left> | Move screen left one column
<Tab> | Move screen page right/left
<Enter> | Print next NEW page (if last available page is not displayed, works like <PgDn>)