Chapter Contents

Previous

Next
SAS/FSP Software Procedures Guide

Assigning Special Attributes to Fields

Select option 4 from the FSEDIT Menu window to define the attributes of each field in the FSEDIT display. This option opens the FSEDIT Attribute window. Use the END command to close the FSEDIT Attribute window and return to the FSEDIT Menu window.


Field Attributes

Field attributes make it easier for users of your application to enter and edit data correctly. Each field has the following attributes:

INITIAL
specifies an initial value for the field.

MAXIMUM
specifies the maximum value for the field.

MINIMUM
specifies the minimum value for the field.

REQUIRED
specifies whether a value must be entered in the field when a new observation is added.

CAPS
specifies whether text in the field is converted to uppercase.

FCOLOR
specifies the text color of valid values.

ECOLOR
specifies the text color of invalid values.

FATTR
selects the text highlighting attribute of valid values.

EATTR
selects the text highlighting attribute of invalid values.

PAD
specifies the pad character for the field.

PROTECT
specifies whether the field value can be edited.

JUSTIFY
specifies the text alignment for the field.

NONDISPLAY
specifies whether text in the field is visible.

NOAUTOSKIP
specifies the cursor behavior for the field.

NOAUTOBLANK
specifies how values that are entered in numeric fields are processed.


FSEDIT Attribute Window Frames

The FSEDIT Attribute window is divided into a series of frames, one for each field attribute. Each frame of the FSEDIT Attribute window defines the status of a particular attribute for all of the fields in the customized display. Each frame uses the customized display format that was created for the application.


Scrolling in the FSEDIT Attribute Window

Field attribute frames are stored in the order shown in Field Attributes. You can move from one field attribute frame to another by using the BACKWARD and FORWARD commands. You can also display the frame for a particular attribute by typing its name on the command line and pressing ENTER.

For multiscreen applications, each field attribute frame is also divided into screens. Use the LEFT and RIGHT commands to display fields on successive screens. Use the END command to close the FSEDIT Attribute window and return to the FSEDIT Menu window.


Attribute Frame Descriptions

Here are descriptions the attribute frames:

INITIAL
assigns initial values to fields. The values that you enter in the fields of this frame are displayed instead of pad characters in the corresponding fields for all new observations that you add to the data set. Initial values that are assigned in this frame do not affect existing values in the data set.

MAXIMUM
assigns the maximum values that can be entered in fields. If a user enters a data value that is greater than the maximum value for that field, an error condition occurs.

This attribute is valid for character fields as well as for numeric fields. For character fields, the "greater than" comparison is based on the operating system's character collating sequence.

By default, users of your application can use the OVERRIDE command to override the error condition that is caused by entering a value greater than the specified maximum. This allows the value to be stored in the data set. You can prevent this by indicating in the Override on errors field of the FSEDIT Parms window that overriding is not allowed. See Modifying General Parameters for details.

MINIMUM
assigns the minimum values that can be entered in fields. If a user enters a data value that is less than the minimum value for that field, an error condition occurs.

This attribute is valid for character fields as well as for numeric fields. For character fields, the "less than" comparison is based on the operating system's character collating sequence.

By default, users of your application can use the OVERRIDE command to override the error condition that is caused by entering a value less than the specified minimum. This allows the value to be stored in the data set. You can prevent this by indicating in the Override on errors field of the FSEDIT Parms window that overriding is not allowed. See Modifying General Parameters for details.

REQUIRED
specifies required fields. When the FSEDIT application is used to add a new observation to the data set, values must be entered in all required fields before the user can leave the observation. A blank or missing value is not considered a valid value unless, in the case of numeric variables, it is a special missing value.

Type an R in the first position of a field to indicate a required field.

By default, users of your application can use the OVERRIDE command to override the error condition that is caused by attempting to leave an observation without providing a value for a required field. You can prevent this by indicating in the Override on required field of the FSEDIT Parms window that overriding is not allowed. See Modifying General Parameters for details.

CAUTION:
Do not assign this attribute to a field that is also assigned the PROTECTED attribute. Doing so would require users of your application to enter a value in a field that does not permit data entry.  [cautionend]

CAPS
specifies fields in which entered values are to be automatically capitalized (converted to all uppercase characters). This attribute has no effect on fields for numeric variables.

Type a C in the first position of a field to specify that the field value is to be automatically capitalized. By default, all fields initially have this attribute when you create a new custom display. To enable lowercase letters to remain lowercase in a field for which the CAPS attribute is currently specified, type an underscore or a blank space over the C in the field.

FCOLOR
specifies the text color for each field. If the user's device does not support extended color attributes, this information is ignored.

Type the character that corresponds to the desired color in each field of this frame. (See Codes for Color and Highlighting Attributes.) The initial color code for all fields is Y (yellow).

ECOLOR
specifies the text color that will be used for each field when an error condition involving the field is detected. You can use this attribute to draw attention to data entry errors. If the user's device does not support extended color attributes, this information is ignored.

Type the character that corresponds to the desired color in each field of this frame. (See Codes for Color and Highlighting Attributes.) The initial color code for all fields is R (red).

FATTR
specifies the text highlighting attribute of each field.

Type the character that corresponds to the desired highlighting attribute in each field of this frame. (See Codes for Color and Highlighting Attributes.) There is no default highlighting attribute.

EATTR
specifies the text highlighting attribute that will be used for each field when an error condition involving the field is detected. You can use highlighting to draw attention to data entry errors. If the user's device does not support extended highlighting attributes, this information is ignored.

Type the character that corresponds to the desired highlighting attribute in each field of this frame. (See Codes for Color and Highlighting Attributes.) The initial highlighting attribute code for all fields is H (high intensity).

PAD
specifies which character is used to display fields in which no value has been entered.

Type the desired pad character in the first position of each field of this frame. (After you press ENTER, all positions in the field are filled with the specified pad character.) The initial pad character for all fields is the underscore (_).

When the FSEDIT procedure processes a value that is entered in a padded field, it converts any pad characters that remain in the field to blanks. Therefore, it is best to choose a pad character that is not likely to be contained in a value for that field.

Note:   To include pad characters in field values, you can edit the field value after initial data entry. For example, if you enter an underscore character in a field that is padded with underscores, the entered underscore is converted to a blank when the value is processed. However, padding is not used after a value is entered in the field, so you can then immediately edit the field value to restore the desired underscore.  [cautionend]

PROTECT
specifies whether fields are protected. Values in protected fields in existing observations cannot be changed. When new observations are added, values cannot be entered in protected fields.

Type a P in the first position of a field to protect the field.

CAUTION:
Do not assign this attribute to a field that is also assigned the REQUIRED attribute. Doing so would require users of your application to enter a value in a field that does not permit data entry.  [cautionend]

JUSTIFY
specifies the alignment of values in fields.

Type one of the following values in each field:
L aligns values against the left side of the field.
R aligns values against the right side of the field.
C centers values in the field.

If you leave a field in this frame blank, the corresponding field in the application display is right-aligned if it is a numeric field or left-aligned if it is a character field (unless the $CHAR. format is used).

NONDISPLAY
specifies fields in which values are not to be visible. This attribute does not prevent values from being entered in a field; it prevents values that are typed in a field from appearing on the display. This attribute is useful for protecting fields that contain passwords or other sensitive information.

Type an N in the first position of a field to prevent values from being displayed in the corresponding field of the application display.

NOAUTOSKIP
specifies fields that the cursor does not leave unless it is explicitly moved. By default, when the user types a character in the last position of a field, the cursor jumps to the first position in the next field. When this attribute is specified, the cursor does not automatically jump to the next field.

Type an N in the first position of a field of this frame to prevent the cursor from automatically jumping from that field to the next field of the application display.

NOAUTOBLANK
specifies which numeric fields are not automatically blanked. This attribute is ignored for character fields.

Type an N in the first position of a field to prevent the automatic blanking of characters following the first blank in corresponding numeric fields in the FSEDIT window.

By default, when the FSEDIT procedure processes the values that users enter in numeric fields, it automatically clears all character positions following the first blank that is encountered in the fields. This is a useful feature in most fields because it enables users to enter numeric values left-justified in the field without having to manually blank out the remainder of the field. (Values in numeric fields are right-justified by default.) However, some numeric informats allow values that contain embedded blanks. Examples include date informats such as DATEw. and MMDDYYw., as well as the BZw.d informat. For fields that use these informats, you can specify the NOAUTOBLANK attribute to suppress the automatic blanking feature so that users can enter values that contain blanks.


Codes for Color and Highlighting Attributes

The following codes are valid for the FCOLOR and ECOLOR field attributes:

B blue G green W white A gray
R red C cyan K black N brown
P pink Y yellow M magenta O orange

When your application is used, the color attributes are ignored if the user's device does not support color. If you specify a color that is not available on the user's device, the procedure substitutes the available color that most closely matches the specified color.

The following codes are valid for the FATTR and EATTR field attributes:
H high intensity
U underlining
R reverse video
B blinking

Most monochrome devices support only high intensity and underlining. If a user's device does not support the highlighting attributes that you specify, the highlighting attribute assignments are simply ignored. Therefore, you can assign these field attributes even though the application may not always be used on a device that enables users to take advantage of color and highlighting.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.