SCREENSTATUS is used in Special Procedures only. It functions like VERIFY in that its purpose is to leave information for you in the command answers. You use this to determine various things about your screen interaction with the user such as whether this record has changed, which row you are on, the name of the field that the cursor is on, and so forth.
Syntax:
Form 1: SCREENSTATUS Form 2: SCREENSTATUS ROW
Form 3: SCREENSTATUS LEVEL
Form 4: SCREENSTATUS SIGNATURE
Form 5: SCREENSTATUS CHANGED
Form 6: SCREENSTATUS WRITE
Form 1: SCREENSTATUS
Ctl.Ans1= String1 String2 (see below)
Ctl.Ans2= Numerator of the screen fraction
Ctl.Ans3= Denominator of the screen fraction
The screen fraction is the fraction that appears in the message area
when a screen is up. The numerator is which record you are on, and
the denominator tells how many records are in the subset being
displayed.
String2 is the current operational command, i.e., APPEND, UPDATE,
READ, or LOOK. If the command is SCROLL String2 still says UPDATE.
String1 is one of these three words: LAST, BACKUP-, BACKUP+
depending on the status of the current record. The current record
is the one the cursor is on. Current record is abbreviated crin the
lines immediately below:
LAST if cris the last record.
BACKUP- if cr was arrived at because the user backed up.
BACKUP+ if crwas arrived at because the user backed up, but is now
coming forward toward LAST.
Form 2: SCREENSTATUS ROW
Ctl.Ans1= The row number you are on. For example, if you are on
the third record of an n-record display, %answer is 3.
Ctl.Ans2= The words BOLD or UNBOLD. BOLD if the current record
is currently bold, or UNBOLD if the current record is
currently plain. See note below.
Ctl.Ans3= The hierarchical level number of the current row. This
applies when you are doing multi-table hierarchical
appends, updates or reads.
The user can select records via a shift-click on any screen. When the
user shift-clicks, that record is bolded so it is distinguished from the
unselected records. You can use the SELECT
command to select all the
bolded records into another collection for further operations. Another
way records can be bolded is via the BOLD
command.
Form 3: SCREENSTATUS LEVEL
Ctl.Ans1= The nesting level. 1 is the primary screen, 2 or 3 etc.,
are nested screens.
Ctl.Ans2= The name of the current screen.
Form 4: SCREENSTATUS SIGNATURE
Ctl.Ans1= The fieldname that the cursor is on. This form applies
only to procedures that are attached to fields or to
buttons on the screen. This form does not apply to
beginning-of-record or end-of-record Special Procedures.
Form 5: SCREENSTATUS CHANGED
Ctl.Ans1= YES if any field on this screen has changed, NO if not.
Form 6: SCREENSTATUS WRITE
Ctl.Ans1= 1 if a FUNCTION WRITE
is currently in progress, 0 if not.
Ctl.Ans3= The number of times FUNCTION WRITE has been done on
this record. Zero if no FUNCTION WRITE has occurred.