• Aucun résultat trouvé

DEFINING FIELDS

Dans le document Station 2624B (Page 53-56)

DISPLAY ENHANCEMENTS

DEFINING FIELDS

When format mode is enabled, all of display memory is

"protected" except those portions which have been ex-plicitly defined as "unprotected" or "transmit-only" fields.

Protected Data

The terminal operator cannot alter or delete any charac-ters that lie within a protected area. Protected characcharac-ters are NOT transmitted to the host computer. The line seg-ments and annotations that constitute the form's structure are typically designated as protected data.

Unprotected Fields

The operator enters data into unprotected fields. When the operator presses

a,

the data in unprotected fields is transmitted to the host computer. When a character is entered into the final position of an unprotected field, the cursor automatically advances to the start of the next unprotected field. The operator may use the

lID

and _ keys to move the cursor to the start of the previous or next unprotected field, respectively.

I II

The operator may use the cursor control keys to move the ( cursor to a transmit-only field and then alter or delete _ characters within the field. Note that the cursor NEVER automatically moves to a transmit-only field (the

lID

and _ keys skip over any transmit-only fields). When the operator presses

a,

the data in transmit-only fields is transmitted to the host computer. When a character is entered into the final position of a transmit-only field, the cursor automatically advances to the start of the next unprotected field.

Field Attributes

When defining an unprotected or transmit-only field, you must specify a field type (which has a set of implied at-tributes) and some explicit field attributes. Some of the attributes are checked as each data character is entered into the field, others are checked when the cursor is ready to leave the field, and still others are checked when the data in the form is to be transmitted to the host computer.

The implicit attributes are:

1. The set of characters which may be entered into the field.

2. The format restrictions, if any, for data items entered into the field.

3. Automatic editing, if any, that is performed when the cursor leaves the field.

Table 5-1 summarizes the implicit attributes associated with each field type.

The explicit attributes are:

1. Whether or not the terminal operator MUST enter a data item into the field (REGU I RED/OPTI ONAl).

2. Whether or not the data entry in the field is to be automatically justified when the cursor leaves the field

(JUSTI FY 11'10 JUSTI FY).

3. Whether or not every character position in the field must be filled by the terminal operator (TOTAL F I lLlNO TOTAL FIll).

Figure 5-5. Use of Shift-In and Shift-Out Codes 5-4

Table 5-1. Attributes by Field 1YPe

Field Valid Input Field Format Automatic

Type Characters Restrictions Field Editing

ALL CHARACTERS ALL None None

ALPHABETIC Upper/lowercase None None

alphabetic, space

AUTO-UPSHIFT ALL (lowercase None None

alphabetic changed to uppercase when they are entered into the field)

ALPHANUMERIC Upper/lowercase None None

alphabetic, digits, space, period, minus sign, plus sign, comma

INTEGER Digits, space No embedded spaces None

SIGNED Digits, minus sign, No embedded spaces; None

DECIMAL plus sign, decimal only one decimal

point, space point; plus sign

(if present) must immediately precede most significant digit; minus sign (if present) must immediately precede most significant digit or immediately follow least significant digit

IMPLIED Digits, plus or No embedded spaces; Right justified;

DECIMAL minus sign, only one decimal if there is no

decimal point, pOint; plus sign explicit decimal

space (if present) must point, the implied

immediately precede decimal point is

most significant inserted at the

digit; minus sign proper position

(if present) must immediately precede most significant digit or immediately follow least significant digit;

completed entry must leave at least one space for decimal point to be added during field edit;

if explicit decimal point is entered, the number of digits to the right of it must NOT exceed the number specified by the Implied Dec Digi t~

configuration field

CONSTANT None None None

Table 5-1. Attributes by Field 'JYpe (Continued)

Field Valid Input

Type Characters

INTEGER Digits, spaces

FILL

SIGNED Digits, minus sign,

DECIMAL plus sign, decimal

FILL point, space

IMPLIED Digits, plus or

DECIMAL minus sign,

FILL decimal point,

space

NUMERIC Digits, space,

period, comma, minus sign, plus sign

REQUIRED/OPTIONAL ATTRIBUTE. Fields may be designated as "required" or "optional". As shown in figure 5-6, this attribute is specified by way of the field definition menu. When the terminal operator presses either t h e . key or a user-defined function key that transmits a block of data to the host computer, the terminal checks all 5-6

Field Format Automatic

(

Restrictions Field Editing

No embedded spaces Right justified;

leading spaces changed to zeros No embedded spaces; Right justified;

only one decimal leading sign if

point; plus sign present) is left (if present) must justified; leading immediately precede spaces changed to

most significant zeros

digit; minus sign (if present) must immediately precede most significant digit or immediately follow least significant digit

No embedded spaces; Right justifed;

only one decimal if there is no point; plus sign explicit decimal (if present) must point, the implied immediately precede decimal point is

most significant inserted at the

digit; minus sign proper position;

(if present) must leading sign (if

ir,nmediately precede present) is left

(

most significant justified; leading digit or immediately spaces changed to

follow least zeros

significant digit;

completed entry must leave at least one space for decimal point to be added during field edit;

if explicit decimal point is entered, the number of digits to the right of it must NOT exceed the number specified by the Implied Dec Dig1 t5 configuration field

None None

"required" fields to be sure that they contain data. If one is ( -found to be empty, then the keyboard is "locked", the bell is sounded, the cursor moves to the offending field, and an error message appears at the bottom of the screen. To correct the situation, press _ and then enter suitable data into the field.

JUSTIFY INO JUSTIFY ATTRIBUTE. For those types of fj.elds which do not include automatic field editing (all characters, alphabetic, auto-upshift, alphanumeric, in-teger, signed decimal, and numeric), you may select the

"JUST! FY" attribute which causes any data within the field to be automatically justified whenever the cursor leaves the field. Like the optional/required attribute, this at-tribute is specified by way of the field definition menu. For all characters, alphabetic, auto-upshift, and alphanumeric fields, the data is left-justified. For integer, signed decimal, and numeric fields, the data is right-justified. The jus-tifylno justify attribute is ignored for implied decimal, con-stant, integer fill, signed decimal fill, and implied decimal fill fields.

TOTAL FILUNO TOTAL FILL ATTRIBUTE. For any type of field (except, of course, constant fields) you may specify "TOTAL FILL" attribute. This attribute signifies that, if any character position within the field contains a valid character, then every character position within the field must contain a valid character. Like the optional/required and justifylno justify attributes, this at-tribute is specified by way of the field definition menu. The

"TOTAL FILL" attribute is checked as the cursor is about to leave the field. If"TOTAL FILL" is in effect and all character positions of the field do not contain valid characters, then the keyboard is "locked", the bell is sounded, the cursor moves to the start of the field, and an error message ap-pears at the bottom of the screen. To correct the situation, press _ and then enter the data item ih a manner which ensures that all character positions contain a valid char-acter (right justify it and include leading zeros, for example, for the numeric field types).

PERMANENTIREGULAR MDT ATTRIBUTE. Data being entered into a field is checked by a modified data tag (MDT). An MDT indicates whether or not data has been entered into the field. There are two types: PERMANENT MDT and REGULAR MDT. If PERMANENT MDT is se-lected in the field definition menu, all fields in a form have their MDTs always set to "on". This means that all data

entered into the current field is recognized as data ready to be transmitted to the computer when the . . key is pressed or a user-defined function key. If REGULAR MDT is selected, only valid data entered into a selected field sets the MDT for that field to "on". Usually, all fields in the form are automatically set to "off".

Defining Fields From the Keyboard

From the keyboard, you specify the desired field type and explicit attributes using a menu which you access using the following keystroke sequence:

define

..

field. define

..

edit.

Figure 5-6 illustrates the field definition menu. While the menu is displayed on the screen, the terminal is implicitly in format mode. The menu contains four unprotected fields that you access using the _ and aD keys. While the cursor is positioned in any of these fields, you select the 'desired parameters by using the "NEXT CHO ICE" ( m ) and

"PREVIOUS CHOICE" ( . . ) function keys. T h e " func-tion key resets the fields in the menu to their default values.

When you have selected the desired field type and explicit attributes, you then save them by pressing the "save

The "define fields" function keys have the effects described in table 1T-2.

Figure 5-6. Field Definition Menu

6.IMPLIED DECIMAL

Dans le document Station 2624B (Page 53-56)