Previous Page | Next Page

The FSEDIT Procedure

PROC FSEDIT Statement


Initiates the FSEDIT procedure.
Requirement: The FSEDIT procedure must have an input data set. By default, the procedure uses the most recently created data set as its input data set. You can use the DATA= option in the PROC FSEDIT statement to select a particular data set. If you do not specify a data set and none has previously been created in the current SAS session, the procedure terminates with an error message.
Tip: Use the SCREEN= option to identify a SCREEN entry in which to store custom features of the FSEDIT session.
Note: The LETTER= option is required if you want to generate letters and other documents using the FSLETTER procedure within the FSEDIT session.

PROC FSEDIT <DATA=data-set | NEW=data-set <LIKE=data-set>>
<KEYS=keys-entry>
<SCREEN=SAS-catalog<.screen-entry>> | <display-options>
<procedure-options>
<letter-options>;

where

display-options

provide control over the appearance of the FSEDIT window. All of the following options except NOBORDER and NR= are ignored if an existing SCREEN entry is specified with the SCREEN= option.

LABEL
NC=n
NOBORDER
NR=n
STCOL=n
STROW=n
TAB=n

procedure-options

can be one or more of the following:

ADD | NOADD
DEBUG
MODIFY | MOD
NODEL
OBS=n
PRINTALL

letter-options

enable you to generate letters, reports, and other documents during an FSEDIT session--things that you can also do independently with the FSLETTER procedure.

LETTER=SAS-catalog <.letter-entry>
PRINTFILE=fileref
SEND=letter-entry

Display and letter options are marked as such in the option descriptions that follow.


Options

Note:   Most of the options that are listed here for the FSEDIT procedure are also available for the FSBROWSE procedure. However, the FSEDIT options that relate to creating and editing data sets are not applicable to the FSBROWSE procedure.  [cautionend]

ADD

creates a new blank observation when the procedure is initiated. The new observation is displayed for editing when the FSEDIT window is opened.

DATA=data-set <(data-set-options)>

names an existing SAS data set to be edited. By default, the FSEDIT procedure uses the most recently created data set.

If you specify both the DATA= option and the NEW= option in the same PROC FSEDIT statement, the DATA= option is ignored.

You can add a list of data set options following the data set name. The list must be enclosed in parentheses. Refer to SAS Language Reference: Dictionary for a listing and descriptions of data set options.

Note:   The FSEDIT procedure ignores the data set options FIRSTOBS= and OBS=. All other data set options are valid.  [cautionend]

DEBUG

turns on the SAS Component Language (SCL) source-level debugger, which provides step-by-step assistance in resolving errors in SCL programs. This option is useful when you are creating or modifying an application that includes an SCL program.

See SAS Component Language: Reference for information about the SCL debugger.

KEYS=keys-entry

names the KEYS entry to be associated with the FSEDIT session. The KEYS entry contains function key assignments for the FSEDIT window.

Note:   The KEYS= option is ignored when the SCREEN= option is also used in the PROC FSEDIT statement, unless a new SCREEN entry is being created.  [cautionend]

If you specify an existing SCREEN entry with the SCREEN= option, the KEYS entry name that is recorded in the SCREEN entry takes precedence over the entry that is specified in the KEYS= option.

The keys-entry value must be a one-level name. The search sequence for the specified entry is as follows:

  1. If you also supply the SCREEN= option with the PROC FSEDIT statement, the procedure looks in the catalog named in that option for an entry that has the specified name and the type KEYS.

  2. If the KEYS entry is not found in the catalog that contains the SCREEN entry, or if the SCREEN= option is not supplied, the procedure looks for an entry that has the specified name and the type KEYS in the SASUSER.PROFILE catalog (or in WORK.PROFILE if the SASUSER library is not allocated).

  3. If the KEYS entry is not found in your personal PROFILE catalog, the procedure looks for an entry that has the specified name and the type KEYS in the SASHELP.FSP catalog.

  4. If the KEYS entry is not found in the SASHELP.FSP catalog, the procedure searches the same sequence of catalogs for the default entry, FSEDIT.KEYS.

LABEL

(display option; ignored when an existing SCREEN entry is specified with the SCREEN= option)

specifies that variable labels, rather than variable names, are used to identify variable fields in the FSEDIT window. If a variable has no associated label, the variable name is used to identify that variable's field.

LETTER=SAS-catalog<.letter-entry>

(letter option)

names a SAS catalog that contains LETTER entries, or produces copies of a specified document for all observations in the data set. If the specified catalog does not exist, it is created.

The behavior of the FSEDIT procedure depends on which form of the option you use:

  • If you specify only the catalog, the procedure does not automatically produce copies of a document (unless the SEND= option is also used). This form of the option makes the EDIT, LETTER, and SEND commands available during the FSEDIT session; these commands enable you to create and print copies of a document for individual observations.

    The general form of the SAS-catalog value is

    <libref.>catalog-name

    If you specify only a one-level name, it is treated as a catalog name in the default library, WORK. You must specify a two-level catalog name if you want to specify a letter name.

  • If you specify a letter name in addition to the catalog name, a copy of the specified document is produced for each observation in the input data set. (If a WHERE statement is used in conjunction with the PROC FSEDIT statement, then copies are produced only for observations that satisfy the specified criteria.) In this case, the procedure does not open an FSEDIT window. A pause occurs while the copies are produced; then the procedure terminates.

    The general form of the letter-entry value is

    entry-name<.LETTER>

    If you specify a two-level letter name with anything other than LETTER as the second level (entry type), the specified entry type is ignored; LETTER is used instead.

    You must specify an existing LETTER entry. The procedure terminates with an error message if the specified LETTER entry does not exist.

LIKE=data-set <(data-set-options)>

names an existing SAS data set whose structure is copied when a new SAS data set is created. (This option must be used in conjunction with the NEW= option.) When the FSEDIT NEW window is opened, the variable names and attributes of the data set that is specified in this option are displayed.

You can add a list of data set options following the data set name. The list must be enclosed in parentheses. Refer to SAS Language Reference: Dictionary for a list and descriptions of data set options.

MODIFY
MOD

opens the FSEDIT Menu window before opening the FSEDIT window. From the FSEDIT Menu window, you can perform tasks that modify the appearance and behavior of the FSEDIT window.

The MODIFY option is ignored (and a warning message is generated) if the PROC FSEDIT statement also includes the SCREEN= option specifying an existing SCREEN entry that is protected by a password.

NC=n

(display option; ignored when an existing SCREEN entry is specified with the SCREEN= option)

specifies the width in columns of the FSEDIT window. By default, the FSEDIT window occupies the maximum number of columns that is supported by the output device. The value of n must be at least 35. If you specify a value that exceeds the maximum number of columns available on your device, the procedure sets the window width to the maximum available width; no warning message is generated.

NEW=data-set <(data-set-options)>

creates a new SAS data set. The procedure terminates with an error message if a data set that has the specified name already exists.

When this option is used, the FSEDIT procedure begins by opening the FSEDIT NEW window, in which the names and attributes of the variables in the new data set are defined. Use the LIKE= option in conjunction with the NEW= option to initialize the FSEDIT NEW window that has the variable names and attributes of an existing data set. After the structure of the new data set is defined, the FSEDIT window is opened so that observations can be added. For details, see Creating a New Data Set.

You can add a list of data set options following the data set name. The list must be enclosed in parentheses. Refer to SAS Language Reference: Dictionary for a list and descriptions of data set options.

NOADD

prevents users from adding new observations to the data set. When you use the NOADD option, the ADD and DUP commands are disabled in the FSEDIT window, but users can still edit existing observations. When you use the NOADD option in conjunction with the SCREEN= option, the NOADD option takes precedence over the parameter setting that is specified in the SCREEN entry.

The FSEDIT procedure also provides a parameter that you can use to disable the ADD and DUP commands. Refer to Modifying General Parameters for details.

NOBORDER

suppresses the sides and bottom of the FSEDIT window's border in a character-based display environment.

Note:   This option is ignored in graphical windowing environments.  [cautionend]

When this option is used in a supported display environment, text and fields can appear in the columns and row that the border normally occupies.

When the NOBORDER option is used in conjunction with the SCREEN= option, the window size that is specified in the SCREEN entry is ignored. The FSEDIT window always occupies the maximum possible number of rows and columns when the NOBORDER option is specified.

NODEL

prevents users from deleting observations from the data set. When you use the NODEL option, the DELETE command is disabled in the FSEDIT window, but users can still edit existing observations. When you use the NODEL option in conjunction with the SCREEN= option, the NODEL option takes precedence over the parameter setting that is specified in the SCREEN entry.

The FSEDIT procedure also provides a parameter that you can use to disable the DELETE command. Refer to Modifying General Parameters for details.

NR=n

(display option)

specifies the height in rows of the FSEDIT window. By default, the FSEDIT window occupies the maximum number of rows that is supported by the output device. The value of n must be at least 10. If you specify a value that exceeds the maximum number of rows available on your device, the procedure sets the window height to the maximum available height; no warning message is generated.

Note:   When the NR= option is used in conjunction with the SCREEN= option, the window size that is specified in the NR= option overrides the number of rows that is specified in the SCREEN entry.  [cautionend]

OBS=n

specifies the number of the observation that is displayed when the FSEDIT window is opened. By default, the first observation in the data set (observation 1) is initially displayed. If the n value is greater than the number of observations in the input data set, then the last observation in the data set is displayed when the FSEDIT window is opened.

This option is not valid if a WHERE statement is used with the PROC FSEDIT statement.

PRINTALL

prints a copy of the FSEDIT display for each observation in the data set. (If a WHERE statement is used in conjunction with the PROC FSEDIT statement, then only observations that meet the specified criteria are printed.) If the SCREEN= option is also specified, the custom display format is used.

The procedure output is written to the location that has been designated for SAS System output. If you are using the SAS windowing environment, the output is written to the OUTPUT window.

When you use the PRINTALL option, the procedure does not open an FSEDIT window. A pause occurs while the output is created; then the procedure terminates.

PRINTFILE=fileref
PRTFILE=fileref
PRINT=fileref
DDNAME=fileref

(letter option)

names an external file to which documents that are produced during the FSEDIT session are written. By default, output is sent to the output destination that is specified in the FORM entry that is associated with the LETTER entry. When this option is used, output is written to the specified file instead.

You must use a FILENAME statement to assign the fileref to an external file before submitting a PROC FSEDIT statement that contains this option.

SCREEN=SAS-catalog<.screen-entry>

names a catalog or a specific SCREEN entry that contains information for a custom FSEDIT application, or in which the procedure can store custom features that are defined during the current session. If the specified catalog does not already exist, it is created.

The general form of the SAS-catalog value is

<libref.>catalog-name

If you specify only a one-level name, it is treated as a catalog name in the default library, WORK. You must use a two-level catalog name if you want to specify a SCREEN entry name.

The general form of the screen-entry value is

entry-name<.SCREEN>

If you specify a two-level screen name that has anything other than SCREEN as the second level (entry type), the specified entry type is ignored; SCREEN is used instead.

When the SCREEN= option is used, the procedure attempts to load a SCREEN entry when the FSEDIT session is initiated:

  • If only the catalog name is provided, the procedure attempts to load an entry that is named FSEDIT.SCREEN.

  • If both the catalog name and the entry name are provided, the procedure attempts to load the specified entry.

If the entry is not found, the FSEDIT session is initiated that has default FSEDIT window characteristics.

If you do not supply the SCREEN= option, any changes that you make to the display format are available only during the current FSEDIT session.

SEND=letter-entry

(letter option)

generates a copy of the specified document for each observation in the input data set. (If a WHERE statement is used in conjunction with the PROC FSEDIT statement, then letters are generated only for observations that meet the specified criteria.) This option is valid only when the LETTER= option is also used.

The letter-entry value must be the name of an existing LETTER entry in the catalog that is identified in the LETTER= option. The value should be a one-level name; the entry type LETTER is assumed. The procedure terminates with an error message if the specified entry does not exist.

When you specify the SEND= option, the procedure does not open an FSEDIT window. A pause occurs while the copies of the document are produced; then the procedure terminates.

STCOL=n

(display option; ignored when an existing SCREEN entry is specified with the SCREEN= option)

specifies the display column in which the leftmost column of the FSEDIT window is positioned. By default, the FSEDIT window begins at the leftmost column of the display (STCOL=1).

STROW=n

(display option; ignored when an existing SCREEN entry is specified with the SCREEN= option)

specifies the display row in which the top row of the FSEDIT window is positioned. By default, the window begins at the top row of the display (STROW=1).

TAB=n

(display option; ignored when an existing SCREEN entry is specified with the SCREEN= option)

specifies the interval that is used for column spacing when more than one column is necessary to display variables in the default screen format.

Previous Page | Next Page | Top of Page