Was this helpful?
set_frs Statement--Set FRS Features
This statement sets a variety of FRS features.
Syntax
set_frs object_type {parent_name}[row_number]
    (frs_constant[(object_name)] = value
    {, frs_constant[(object_name)] = value})
Description
The set_frs statement provides a way to dynamically set various features of the FRS (FRS). Among these are display attributes for fields and table field columns, activation of field validations, timeout periods, and mappings for control, function, and arrow keys.
The object_type specifies the type of object for which features are being set. It must be expressed as a string, with or without quotes. The following are valid object types for the set_frs statement:
column
Sets attributres of a column in a table field
form
Sets attributres of a form
field
Sets attributres of a field in a form
frs
Sets attributres of the FRS
menu
Sets attributres of the menu for the current display loop
row
Sets attributres of a row in a table field
The parent_name identifies the form or table field that contains the specific object affected by the frs_constant. You can use a quoted or unquoted character string literal or a program variable to express the parent_names. The specific object is identified by the object_name. All object_names referenced in a single set_frs statement must belong to the same set of parents. That is, all specified fields must be on the same form and all columns must be part of the same table field. The parent name(s), combined with the object name, allow an frs_constant to reference a specific object. If a parent name is left as a quoted empty or blank string, the current parent is used.
The frs and form object types do not require any parent names.
The following table lists the valid parent_names for each object_type:
Object Type
Parent Name
column
formname tablename
field
formname
form
None
frs
None
menu
formname (Optional; always refers to the current display loop)
row
formname tablename
The frs_constant is the name of one of the FRS constants. These constants identify the type of feature being set. These are the valid constants:
activate
Turns field activation mechanisms on or off
active
Enables or disables a specified menu item
change
Sets the change variable of a form, field, or column
color
Sets color in terminals supporting color
display
Turns display attributes on or off. Display can have a value of reverse, blink, underline, intensity, normal, invisible, or displayonly.
editor
Enables or disables the FRS editor command
format
Changes the format of simple field or column of a table field
getmessages
Enables or suppresses error messages on field value retrieval
inputmasking
Enables or disables usage of a FRS format template for a field, column or form
label
Defines an alias for a control, function, or arrow key mapped to a menu item, FRS key, or FRS command
map
Sets mappings between control/function/arrow keys and FRS keys, FRS commands, and menu items
mapfile
Specifies the application's mapping file
menumap
Turns display of menu item/function key associations on or off
mode
Sets the display mode for a form or tablefield
outofdatamessage
Enables or disables the Out of Data message displayed by the FRS when a user attempts to scroll off the bottom or top of a table field
rename
Renames a specified menu item
shell
Enables or disables the FRS shell command
timeout
Establishes a timeout period of specified length for an application
validate
Turns field validation mechanisms on or off
Each of these constants is described in its own section following.
The object_name identifies the actual object to which each FRS constant refers. Use a quoted or unquoted string literal. If the object_name refers to a form object, you can also use a program variable. The object name can vary from FRS constant to FRS constant within a statement. When object type is frs, the object is an FRS object; otherwise, it is a form object. If object name is not specified where normally a form object is required, the current form object is used.
The object names for applicable object types are listed in the following table:
Constant
Object
column
columnname
field
fieldname
form
formname
frs
frs_object (varies, according to FRS constant)
row
columnname
The value must be a value permitted by its FRS constant, as described in the individual sections following.
A corresponding inquire_frs statement exists for each set_frs statement. Thus, dynamic querying and setting of features can be performed from within an application program.
Last modified date: 01/30/2023