Was this helpful?
The Describe Statement and Dynamic FRS
The describe statement returns data type, length, and name information about the fields of a form or the columns of a table field to the SQLDA. The application uses this information by means of the using clause extensions of some forms input and output statements. (For a full description of the use of the describe statement in Dynamic FRS, see The Using Clause in Dynamic FRS.)
The describe statement can be issued at any time after the form is initialized. It is valid to issue the describe statement from inside a display loop, even if the form described is the form being displayed.
exec frs describe form Statement--Describe a Form
This statement describes a form.
This statement has the following syntax:
exec frs describe form formname [mode]
into
descriptor_name;
formname
Specifies the name of an initialized form
mode
Determines what subset of fields is described. Mode must be one of the following:
update
Specifies that the FRS returns the description of all updatable fields in a form. Display-only or query-only field descriptions are not returned. This mode corresponds to a form displayed in update or fill mode.
query
Specifies that the FRS returns the description of updatable and query-only fields. This mode corresponds to a form displayed in query mode.
all
Specifies that the FRS returns a description of all fields in the form, including those that are display-only or query-only. You can use this mode to map complete database table descriptions to a form. This is the default mode.
Regardless of the mode selected, the FRS always returns the data type and name of any table field encountered in the form. For information about how to handle table fields, see How SQLDA Is Processed in Dynamic FRS.
After describing a form, the descriptor (SQLDA) contains the data type, length, and name descriptions of all the form fields corresponding to the specified mode.
exec frs describe table Statement--Describe a Table Field
This statement describes a table field.
This statement has the following syntax:
exec frs describe table formname tablename [mode]
  into descriptor_name;
formname
Specifies the name of an initialized form
tablename
Specifies a table field within the associated form (formname). You do not need to initialize a table field before describing it.
mode
Specifies which subset of columns is described. The mode values and the column subsets they specify are identical to those of the describe form statement. For example, if the query mode is specified when describing a table field, the descriptor contains the description of all updatable and query-only columns.
descriptor_name
Contains the data type, length, and name of all the columns in the table field corresponding to the specified mode. The FRS does not return hidden column names nor the internal row variables, _state and _record. If you want to use these variables in an application, the application must explicitly create a sqlvar element for each.
Last modified date: 04/03/2024