Previous Page | Next Page

Commands That Are Not Specific to UNIX

SPELL Command



Checks spelling and flags unrecognized words.
Category: Text editing, command-line command

Syntax
Without Arguments
Arguments
Details
Comparisons
See Also

Syntax

SPELL <ALL <SUGGEST>>
SPELL <NEXT | PREV | SUGGEST>
SPELL <REMEMBER <dictionary-name>>

Without Arguments

The SPELL command checks the first word if the cursor is positioned on the command line. Otherwise, the SPELL command checks the word on which the cursor is positioned. Assign a function key to the SPELL command by using the KEYS command. Use the function key to check the spelling of the word on which the cursor is positioned. If the word is recognized, the message "OK" appears. Otherwise, a message appears indicating that the word is unrecognized.


Arguments

ALL

checks the spelling of all words. If all words are recognized, a message indicates that no unrecognized words have been found.

If a word is unrecognized, the SPELL: Unrecognized Words window appears, listing the unrecognized words and their corresponding line numbers. The window initially displays a blank field for the dictionary that you want to specify. Enter a new dictionary name, or the name of an existing dictionary. Select Tools [arrow] Remember to add the unrecognized words to the dictionary.

Tip: Specify the SPELL ALL SUGGEST command to display the SPELL: Suggestions window for each unrecognized word that is found.
SUGGEST

invokes the SPELL: Suggestions window, which displays the last unrecognized word and its line number, and suggestions for changing the unrecognized word. In this window, you can select Tools [arrow] Remember to add the unrecognized word to a dictionary. The window will then close, you are returned to the previous window, and a message indicates that the word is now recognized.

You can change the unrecognized word by positioning your cursor on a suggestion, and then pressing ENTER. The suggested word is highlighted. Select Tools [arrow] Replace. When you return to the Program Editor window, you will see that the unrecognized word has been changed. If you want to replace all occurrences of the recognized word, first, position the cursor on the phrase ALL OCCURRENCES, and then press ENTER. The phrase ALL OCCURRENCES is highlighted. When you return to the Program Editor window, you will see that all occurrences of the unrecognized word have been changed.

Alias: ?
NEXT

finds the next unrecognized word, based on the current cursor position. If all words from the current cursor position to the end of the file are recognized, a message indicates that the end of the file was reached. Otherwise, a message indicates that a word is unrecognized, and the cursor is positioned on the unrecognized word.

PREV

finds the previous unrecognized word, based on the current cursor position. If all words from the current cursor position to the beginning of the file are recognized, a message indicates that the beginning of the file was reached. Otherwise, a message indicates that a word is unrecognized, and the cursor is positioned on the unrecognized word.

REMEMBER dictionary-name

adds the last unrecognized word to an auxiliary dictionary, where dictionary-name is the name of an auxiliary dictionary. A message indicates that the word has been added to an auxiliary dictionary. If you are using only one auxiliary dictionary, you can omit dictionary-name. If no auxiliary dictionary is specified, and dictionary-name is omitted, the unrecognized word is saved in a temporary dictionary in the current SAS session only.

You can highlight a word from the SPELL: Unrecognized Words window or from the SPELL: Suggestions window, and then select Tools [arrow] Remember. The word that you added is now recognized.

Alias: ADD

Details

The SPELL command checks spelling and flags unrecognized words. You can use the SPELL command to do the following tasks:

The SPELL command checks words with a default dictionary. However, you can specify one or more auxiliary dictionaries to use in addition to the default dictionary.

Any dictionary that you create is stored in your SASUSER.PROFILE catalog. If you update a dictionary using the SPELL REMEMBER command, updates are saved to a temporary dictionary in the current SAS session. The temporary dictionary is created if you do not specify a dictionary name. If you specify a dictionary from the SASHELP.BASE catalog, updates are saved in that dictionary.


Comparisons

The SPELL command checks spelling and flags unrecognized words, and the DICT command includes or creates an auxiliary dictionary. The SPELL command can also create and update auxiliary dictionaries. Use the SPELL command to create a permanent auxiliary dictionary. The word list that is used by the SPELL command acts as a record of the words that are contained in the auxiliary dictionary.


See Also

Commands:

DICT Command

Previous Page | Next Page | Top of Page