FSEDIT Procedure Windows |
You can use the FSEDIT procedure to create a SAS data set. You name the variables and specify their attributes in fields in the FSEDIT NEW window. After you exit the FSEDIT NEW window, the data set is created and the FSEDIT window is opened so that you can enter values in the new data set.
Opening the FSEDIT NEW Window |
To open the FSEDIT NEW window, invoke the FSEDIT procedure, using the NEW= option in the PROC FSEDIT statement. For example, to create a data set that is named CUSTOMER in the SAS data library that has the libref MASTER, submit the following statements:
proc fsedit new=master.customer; run;
The FSEDIT NEW Window shows the FSEDIT NEW window that is opened when these statements are submitted.
Defining Variables |
The following rules apply to defining variables in the FSEDIT NEW window:
You must give each variable a name. The name must follow SAS naming conventions. See SAS Language Reference: Concepts for details.
You can identify the type for each variable. Use N for numeric or $ (or C) for character. If you leave the Type field blank, the default type is numeric.
You can specify the length of each variable. If you leave the Length field blank, the default length is 8.
You can assign a label, a format, and an informat for each variable. See SAS Language Reference: Concepts for a complete discussion of SAS variable attributes.
If you want to create a data set whose variable names and attributes are identical or similar to those of an existing data set, use the LIKE= option in conjunction with the NEW= option. The LIKE= option initializes the fields of the FSEDIT NEW window with the names and attributes of the variables in the specified data set. You can edit any of the variable names and attributes, and you can define additional variables before creating the data set.
Closing the FSEDIT NEW Window |
Use the END command to close the FSEDIT NEW window. This command also creates the data set and opens the FSEDIT window for adding observations to the newly created data set. After you issue the END command, you cannot return to the FSEDIT NEW window to make structural changes to the data set.
FSEDIT NEW Window Commands |
In addition to the global commands that are discussed in SAS/FSP Software Global Commands, you can use the following commands in the FSEDIT NEW window to scroll through information, to duplicate selected lines, or to exit with the choice of creating a data set or canceling it.
Scrolling
| |||||||
Other
|
Command Descriptions |
Here are descriptions of the FSEDIT New window commands:
scrolls vertically toward the top of the window. The following scroll amounts can be specified:
HALF |
scrolls upward by half the number of lines in the window. |
PAGE |
scrolls upward by the number of lines in the window. |
MAX |
scrolls upward until the first line is displayed. |
n |
scrolls upward by the specified number of lines. |
scrolls downward until the last line that contains a variable definition is displayed.
closes the FSEDIT NEW window and ends the FSEDIT session. The new data set is not created.
closes the FSEDIT NEW window, creates the SAS data set that is defined in the window, and opens an FSEDIT window for adding observations to the newly created data set.
scrolls vertically toward the bottom of the window.
Note: You can scroll forward only if you have filled the last blank variable-definition line that is currently displayed, or if there are more variables to be displayed.
The following scroll amounts can be specified:
HALF |
scrolls downward by half the number of lines in the window. |
PAGE |
scrolls downward by the number of lines in the window. |
MAX |
scrolls downward until the last line that contains a variable definition is displayed. |
n |
scrolls downward by the specified number of lines. |
opens the KEYS window for browsing and editing function key definitions.
Unlike the other FSEDIT windows, the FSEDIT NEW window uses the default SAS windowing environment KEYS entry rather than the FSEDIT.KEYS entry or the entry that is specified in the KEYS= option if that option is used with the PROC FSEDIT statement.
displays the FORMAT column when the INFORMAT column is displayed or vice versa. The RIGHT command has the same effect.
displays the FORMAT column when the INFORMAT column is displayed or vice versa. The LEFT command has the same effect.
scrolls upward until the first variable-definition line is displayed.
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.