Field display and message broadcast

From m204wiki
Revision as of 03:47, 21 March 2013 by Alex (talk | contribs) (Automatically generated page update)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Overview

The Model 204 DISPLAY command and the IFDISP Host Language Interface function allow you to display:

  • Descriptions of a field or fields
  • File names, data sets, and (if you have the correct privileges) parameters
  • Preallocated fields in the file

You can also use DISPLAY to display information about file groups, procedures, and access rights. For a discussion of displaying access rights, see See Displaying user and procedure classes. The Model 204 Parameter and Command Reference contains a complete description of all DISPLAY capabilities.

The BROADCAST FILE command allows you to specify or change a message that is displayed whenever a user opens a file.

In this chapter, the DISPLAY command forms and the BROADCAST command are described in detail.

Displaying a field

The DISPLAY command can display the description of any field in the currently open file. Fields are listed with their attributes in the format specified by the display options (definitions, names only, or abbreviations). The command is issued in the form:

Syntax

DISPLAY FIELD [(display_option],display_option...])] {ALL | fieldname [,fieldname...]}

where:

display_option is one of the following terms:

Option Result
DEFINITIONS

Displays the description of each field in the form:

fieldname (field_description)

DEFN Equivalent to DEFINITIONS.
NAMES Lists only field names. Generally is used in conjunction with ALL.
ABBREV

Displays the field descriptions using abbreviations for the field attributes (for example, STR for STRING). If ABBREV is not specified, displays full attribute names.

Only applicable field attributes are displayed. For example, if a field is listed as either CODED or FRV, MANY-VALUED or FEW-VALUED also is listed. However, if the field is NON-CODED and NON-FRV, MANY-VALUED and FEW-VALUED do not apply, so neither is listed.

A complete list of field attributes and abbreviations is included in the description of the DEFINE command in Defining Fields Manually.

NOUSE Displays the information at your terminal even if a USE command preceded the DISPLAY command. The alternate output device is left open but is not used.

You must enclose options in parentheses. If you do not specify any options in the DISPLAY FIELD command, DEFINITIONS is the default.

If you specify ALL, the display options are applied to all the fields in the currently open file, and all the fields are listed in alphanumeric order. Without ALL, the fields are listed in the order in which the field definitions are stored in the internal file dictionary, Table A. This order is unrelated to the order in which the fields were defined or the order in which they appear in Table B records.

The list of field names can include names that do not currently appear in any records. Even if a field name has been deleted from every record in which it occurs, or if all of the records in which it occurs have been deleted, the name is retained in the list of field names.

Displaying a file

To display information about a file, use the DISPLAY FILE command. The DISPLAY FILE syntax is:

Syntax

DISPLAY FILE [(display_option[,display_option...])] {ALL | filename [,filename...]}

where:

display_option is one of the following terms:

Option Result
DEFINITIONS Displays the filename, the values of all the file parameters normally displayed by the FPARMS and TABLES options, and, if you have file manager privileges, the names of the data sets normally displayed by the DDNAMES options.
DEFN Equivalent to DEFINITIONS.
FPARMS Displays FPARMS (file characteristics) parameters (see File characteristics parameters (FPARMS)), as well as the names of the sort or hash key field, and, if you have file manager privileges, any record security field that has been defined. This option is only accessible to general users if you set the PRIVDEF parameter to permit display.
TABLES Displays TABLES (file table) parameters (see File table parameters (TABLES)).
ABBREV When used with the FPARMS, TABLES, or DEFINITIONS option, lists parameter values in an abbreviated form, without bit-string descriptions and descriptive text.
DDNAMES Lists the names of the data sets that make up the Model 204 file. This option requires file manager privileges.
NOUSE Displays the information at your terminal even if a USE command preceded the DISPLAY command. The alternate output device is left open but is not used.

ALL causes Model 204 to apply the display options to all open files; otherwise, the command is applied only to those files listed.

If no options are included in the DISPLAY FILE command, DEFINITIONS is the default. The files specified must be open when you issue the command or the information is not displayed.

All options, except DDNAMES and FPARMS (as noted), can be issued by an ordinary Model 204 user. Options must be enclosed in parentheses.

Displaying a record description

To list the preallocated fields in the currently open file, issue the following form of DISPLAY:

Syntax

DISPLAY RECORD [(NOUSE)]

where:

NOUSE causes information to be displayed at your terminal even if a USE command preceded the DISPLAY command. The alternate output device is left open but is not used.

Fields are listed in the same order in which they are allocated in each record in the file. The OCCURS, LENGTH, and PAD specifications for the fields also are included (see the description of the DEFINE command in Defining Fields Manually).

Broadcasting a file message

The BROADCAST command allows you to add, change, or remove a file message that is normally displayed whenever a user opens a file.

The file message displayed on the user's terminal is preceded by a header line in the form:

MSG FROM FILE filename

BROADCAST command

The format of the BROADCAST command is:

Syntax

BROADCAST FILE [URGENT] [text]

where:

text is the new file message.

URGENT displays the message almost immediately on the terminals of users who have the file open. See the following discussion of message timing.

Message timing for URGENT messages

The exact time at which an URGENT message is displayed on a user's terminal depends upon two factors:

  • What the receiver of the message is doing at the time (for example, waiting for input, running a request, and so on).
  • Type of Model 204 terminal handler used by the user (the IODEV number).

The following situations are most common:

If receiver is... Then the message is displayed...
Currently executing a command, such as a DISPLAY When the command completes
Running a request At the first backwards jump or bottom of a FOR loop
Entering input and is using a SNA Communications Server (formerly VTAM) terminal Immediately

For other terminal types, messages cannot be displayed while the receiver is entering input.

Changing or deleting a BROADCAST message

You can change a BROADCAST message by issuing a new BROADCAST FILE command.

If you change a file message when a user has the file open, Model 204 displays the new message the next time that the user is at command level outside a procedure.

A copy of the message is saved in the file until it is implicitly deleted by recreating or reinitializing the file, or until the text is explicitly deleted by issuing the following command with no text string:

BROADCAST FILE

Creating a multiline message

The text included in the BROADCAST FILE command can consist of multiple lines, specified in the following way:

line1/line2/ ...

where:

slash (/) is displayed as a new line or a carriage return/line feed sequence.

Two slashes without text between them creates a blank line in the file message.

If insufficient storage is available to hold a copy of the file's BROADCAST message during open processing, an informational message is displayed and open processing continues.