Chapter Contents

Previous

Next
SAS/FSP Software Procedures Guide

Modifying Screens and Identifying Fields

Select option 2 from the FSEDIT Menu window to create a customized display for your application. Customization is a three-step process:

  1. Modifying the display. Redesign the display by moving fields, adding fields, or adding descriptive text.

  2. Defining fields. Specify the attributes of repeated fields, fields for values that are calculated in a SAS Component Language program, or both. This step is necessary only when you add repeated or computed fields, which are described in the next section.

  3. Identifying fields. Specify the location of the field for each data set variable or computed value.


Step 1: Modifying the Display

The first window that opens when you select option 2 from the FSEDIT Menu window is the FSEDIT Modify window. In this window you design a customized display for your application. Variable fields can be labeled more descriptively, rearranged, and even deleted. You can add comments to help users enter data in the proper format.

The FSEDIT Modify window initially contains the display format for the FSEDIT window (either the default format if a new SCREEN entry is being created, or the previous customized format if an existing SCREEN entry is used.) During this first step, the entire contents of the FSEDIT Modify window are unprotected, so you can type over any area in the display, including the variable names. You can move, delete, or insert any lines in the display. You can move variable fields and add any special comments or instructions that would make entering data easier.

If the modified display format that you create has more lines than the number of rows in the FSEDIT window, a multiscreen application is created. Users must scroll to view the fields and text that do not fit in the first screen. Option 5 in the FSEDIT Menu window enables you to specify the initial height of the FSEDIT window.


Creating Fields

There are three important requirements for variable fields in a customized display:

Note:   The restriction of using an underscore as the field pad character is applicable only when you are identifying fields to the FSEDIT procedure. This rule does not affect the final appearance of the display. If you want to use a pad character other than the default underscore to mark the location of a variable field, use option 4 from the FSEDIT Menu window to change the PAD attribute for the field.  [cautionend]

The default width of each variable field depends on how the variable is stored in the data set and on whether the variable has an associated output format:(footnote 1)

Variable Type Default Width
character the larger of

[bull] the width of the variable in the data set

[bull] the width of the variable's format or informat (whichever is longer), if one has been assigned.
numeric either

[bull] the width of the variable's format or informat (whichever is longer), if one has been assigned

[bull] the default width of 12 (because BEST12. is the default numeric format).

You can modify the default field widths when you create a customized display. For example, many numeric fields do not require the full default width of 12 positions. However, you should ensure that the width of the field is appropriate for the width of the corresponding variable. Otherwise, users of your application may be unable to enter the full range of valid variable values in the fields.


Creating Special Fields

In addition to variable fields, you can create two different types of special fields:

repeated fields
repeat the values from other variable fields or computed fields. Repeated fields effectively provide multiple fields for a single variable. Changes that are made in a variable field appear in any repeated fields for that variable, and changes that are made in a repeated field affect the variable field as well as any other repeated fields for that variable.

Repeated fields are useful in multiscreen applications when you want certain fields to appear on more than one screen.

computed fields
display temporary values that are calculated or defined when a SAS Component Language program executes. Although a computed field does not have an associated variable in the input data set, it can be referenced in an SCL program and used for calculations.

These special fields are defined in the same manner as variable fields, with a series of underscores that are preceded and followed either by a blank or by the edge of the window.


FSEDIT Modify Window Commands

When designing a display in the FSEDIT Modify window, you can use all of the SAS/AF global commands and all of the SAS text editor commands.

Note:   Because the Modify window uses the SAS text editor, you can use the editor's spell checking feature. To check the spelling of the descriptive text in the window, use the SPELL ALL command.  [cautionend]


Specifying Color and Highlighting

If your terminal or workstation supports color and highlighting, you can change the attributes of the text in your customized display. When your application is used, the color information is ignored if the user's device does not support color. If you have used a color that is not available on the user's device, the procedure substitutes the available color that most closely matches the specified color.

Use the global COLOR TEXT command to change the color and highlighting attributes of the text you enter. For example, the following command changes all of the text you type after the command is issued to high-intensity blue:

color text blue h
Once you enter a COLOR TEXT command, the specified attributes are used until you change them with another COLOR command. Refer to the description of the COLOR command in the online Help for base SAS software for additional details.

Note:   Some terminals or workstations provide special keys that control text color and highlighting. If your device has such keys, you can use them to set color and highlighting attributes as you enter the text.  [cautionend]


Exiting the FSEDIT Modify Window

Issue the END command to close the FSEDIT Modify window. Before the window is closed, the FSEDIT procedure displays the following question:

Did you create any computational or repeated fields (Y or N) ? _

Your response determines whether you go directly to the field identification step or enter the field definition step first.

If you have added any special (computed or repeated) fields, type a Y in the space provided. You then enter the field definition step (step 2), where you can define the fields you have added. Otherwise, type an N in the space provided. The procedure then takes you directly to the field identification step (step 3).


Step 2: Defining Fields

When you indicate in the FSEDIT Modify window that you have created special fields, the FSEDIT Names window is opened when the FSEDIT Modify window is closed. In the FSEDIT Names window you define the characteristics of special fields. The FSEDIT Names Window shows the initial FSEDIT Names window display.

The FSEDIT Names Window

[IMAGE]

All of the entries in the FSEDIT Names window are initially blank. Special fields that are added during customization are unknown to the FSEDIT procedure until they are defined in the FSEDIT Names window. Special fields are used to hold repeated values or computed values from the program. Do not confuse defining special fields with adding variables to an existing SAS data set.


Defining Special Fields

The rules for defining special fields are similar to the rules for defining SAS variables when you create a new data set:

Note:   For repeated fields, the first occurrence of the field in the display is treated as the original field, the next occurrence is treated as the first repeat, and so on.  [cautionend]


FSEDIT Names Window Commands

In addition to the global commands that are listed in SAS/FSP Software Global Commands, you can use the following commands in the FSEDIT Names window step to scroll through information, duplicate selected lines, and exit, going directly into the field identification step.
Scrolling

BACKWARD
BOTTOM
FORWARD
TOP

Duplicating

REPEAT
SELECT

Other

END
KEYS


Command Descriptions

Here are descriptions of the FSEDIT Names window commands:

BACKWARD
scrolls toward the top of the window.

BOTTOM
scrolls to the bottom of the window.

END
exits the field definition step and enters the field identification step.

FORWARD
scrolls toward the bottom of the window. You can scroll forward only if you have filled all lines that are currently displayed or if there are more special field names to be displayed.

KEYS
opens the KEYS window for browsing and editing function key definitions. See the description of the KEYS command in FSEDIT Window Commands for details.

Note:   FSEDIT procedure windows share the same KEYS entry. Changes that you make with this command from the FSEDIT Names window will affect the other windows also.  [cautionend]

REPEAT
specifies the target line on which you want a selected line to be repeated. After executing the SELECT command, type REPEAT on the command line, position the cursor on the desired line, and press ENTER. The selected line is then copied to the indicated target line. Unless the field type is R (repeated), you receive an error message warning you that the copy is the second occurrence of the field name. To cancel the error, change the name on the copied line.

SELECT
specifies a line whose contents you want to be repeated on another line. Type SELECT on the command line, position the cursor on the line you want to repeat, and press ENTER. The selected line is remembered; any REPEAT command that you issue subsequently will copy the selected line to the desired target line.

TOP
scrolls to the top of the window.


Exiting the FSEDIT Names Window

When you have defined all computational and repeated fields, issue the END command to leave the field definition step. Once all special fields are defined to the procedure, you enter the field identification step, where you identify the locations of all special fields and any variable fields that the FSEDIT procedure has lost track of.


Step 3: Identifying Fields

The FSEDIT Identify window is opened automatically when the FSEDIT Names window is closed, or when the FSEDIT Modify window is closed if no special fields were created during display modification. When the FSEDIT Identify window is opened, the status of each field, whether a data set variable field or a special field, is determined to be one of the following:

identified
The procedure knows the field's location in the display.

unidentified
The procedure does not know the field's location in the display and prompts you to specify the location.

unwanted
The procedure knows that the variable has been omitted from the display and does not prompt you for it. (For example, if you use a VAR statement to select variables to display when you invoke the FSEDIT procedure, all variables in the data set that are not specified in the VAR statement are deemed unwanted by the FSEDIT procedure.)

Before you can exit the field identification step, all fields must be either identified or defined as unwanted. When the FSEDIT procedure knows the location of all variable fields, the following message is displayed:

NOTE: All fields are identified.

If the FSEDIT procedure does not know the location of a variable field, or if you have added any special fields, you are asked to identify the location of the unidentified fields.


Unidentified Fields

Fields in a customized display can become unidentified in several ways:

For each unidentified field, you receive a prompt like the following:

Please put cursor on field: name and press ENTER ... or UNWANTED

To indicate that you are not using a particular variable in the application, issue the UNWANTED command. To identify the location of a variable field or a special field that is being used in the application, position the cursor on any underscore in the appropriate field and press ENTER. Continue to identify fields until a message tells you that all fields are identified.

For example, if you receive the prompt

Please put cursor on field: ADDR1 and press ENTER ... or UNWANTED
you can do one of the following:
  1. Issue the UNWANTED command. (The command can be assigned to a function key.) The FSEDIT procedure then knows that the variable ADDR1 has been purposely excluded from the display, so it does not prompt you again to identify the ADDR1 field's location.

  2. Position the cursor on one of the underscores for the appropriate variable field (ADDR1 in this example), and press ENTER. The variable ADDR1 changes from unidentified to identified. The FSEDIT procedure then knows the ADDR1 field's location.


Changing a Field from Unwanted to Identified

If you change your mind about making a variable unwanted, you can use the DEFINE command. Follow DEFINE with the variable name; then position the cursor on the variable field and press ENTER.

If you want to change the status of several variables, you can use the WANTED command. When you issue the WANTED command without specifying any variable names, all unwanted variables become unidentified. The FSEDIT procedure then prompts you to identify the location of all unidentified variable fields.

Notice the difference between these two commands: DEFINE changes a single variable directly from unwanted to identified. WANTED changes one or all variables from unwanted to unidentified. You must then identify the location of each variable's field or define the variable as unwanted again.


FSEDIT Identify Window Commands

In addition to the global commands that are listed in SAS/FSP Software Global Commands, you can use the following commands in the FSEDIT Identify window:
Identifying Fields

DEFINE variable
UNWANTED
WANTED <variable>

Scrolling

=variable
LEFT
RIGHT

Other

END
KEYS


Command Descriptions

Here are descriptions of the FSEDIT Identify window commands:

=variable
locates identified variables. To determine the location of a variable field in the display, type an equal sign on the command line, followed by the variable name, and press ENTER. If the specified variable is an identified variable in the customized display, the cursor then moves to the field for the variable.

DEFINE variable
changes the status of a variable from unwanted to identified. Follow DEFINE with the name of the variable, position the cursor on any underscore of the field for that variable, and press ENTER. Remember to use the actual name of the variable instead of a label that you may have assigned to the variable in the customized display.

END
ends the field identification step, closes the FSEDIT Identify window, and returns to the FSEDIT Menu window. This command is not valid until all fields have been either identified or defined as unwanted. If any fields are not currently identified, the FSEDIT procedure prompts you to identify their locations before ending the field identification step.

KEYS
opens the KEYS window for browsing and editing function key definitions. See the description of the KEYS command in FSEDIT Window Commands for details.

Note:   FSEDIT procedure windows share the same KEYS entry. Changes that you make with this command from the FSEDIT Identify window also affect the other windows.  [cautionend]

LEFT
moves to the previous screen of an observation (in multiscreen applications).

RIGHT
moves to the next screen of an observation (in multiscreen applications).

UNWANTED
specifies that a variable field is unwanted and will not be used in this application. To indicate an unwanted variable, issue the UNWANTED command when you are prompted for the location of the variable field.

WANTED <variable>
changes the status of a specified variable from unwanted to unidentified. If you do not specify a particular variable, all unwanted variables are changed to unidentified variables. Once a variable becomes unidentified (rather than unwanted), the FSEDIT procedure prompts you to identify its location.


Exiting the FSEDIT Identify Window

You cannot exit the field identification step until you have identified the locations of the fields for all wanted variables and have received the following message:

NOTE: All fields are identified.
After receiving this message, you can issue the END command to close the FSEDIT Identify window and return to the FSEDIT Menu window.
FOOTNOTE 1:  See SAS Language Reference: Concepts for a complete discussion of SAS variable attributes. [arrow]


Chapter Contents

Previous

Next

Top of Page

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