FSEDIT Procedure Windows |
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. See Attribute Frame Descriptions for more information about each attribute's frame. Each field has the following attributes:
specifies an initial value for the field.
specifies the maximum value for the field.
specifies the minimum value for the field.
specifies whether a value must be entered in the field when a new observation is added.
specifies whether text in the field is converted to uppercase.
specifies the text color of valid values.
specifies the text color of invalid values.
selects the text highlighting attribute of valid values.
selects the text highlighting attribute of invalid values.
specifies the pad character for the field.
specifies whether the field value can be edited.
specifies the text alignment for the field.
specifies whether text in the field is visible.
specifies the cursor behavior for the field.
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 of the attribute frames:
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.
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.
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.
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.
Doing so would require users of your application to enter a value in a field that does not permit data entry.
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. 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.
The CAPS attribute is set for all fields if you create a new data set using the NEW= option on PROC FSEDIT. If the data set already exists and you are just creating a new custom screen, FSEDIT looks in the first observation to determine whether to set the CAPS attribute.
If a custom screen is not specified in the procedure, or has been specified but has not been saved yet, the default setting for the CAPS attribute for each variable is determined by the value of the corresponding variable in the first observation of the data set. If a variable's value in the first observation contains lowercase characters, then capitalization is turned off for that variable's field; otherwise, capitalization is left on. Although the CAPS attribute is on by default for all numeric variables, this attribute has no effect on numeric variables.
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).
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).
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.
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).
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.
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.
Doing so would require users of your application to enter a value in a field that does not permit data entry.
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).
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.
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.
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.
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.