FSLIST Procedure

Using the FSLIST Window

Overview of the FSLIST Window

The FSLIST window displays files for browsing only. You cannot edit files in the FSLIST window. However, you can copy text from the FSLIST window into a paste buffer by doing one of the following, depending on your operating environment:
  • Use a mouse to select text, and select Copy from the Edit menu.
  • Use the global MARK and STORE commands.
Depending on your operating environment, the text that you copy can then be pasted into any SAS window that uses the SAS text editor, including the FSLETTER window in SAS/FSP software, or into any other application that allows pasting of text.
You can use commands in the command window or command line to control the FSLIST window.

FSLIST Window Commands

Global Commands

In the FSLIST window, you can use any of the global commands that are described in the “Global Commands” chapter in the SAS/FSP Procedures Guide.

Scrolling Commands

n
scrolls the window so that line n of text is at the top of the window. Type the desired line number in the command window or on the command line and press ENTER. If n is greater than the number of lines in the file, then the last few lines of the file are displayed at the top of the window.
BACKWARD <n|HALF|PAGE|MAX>
scrolls vertically toward the first line of the file. The following scroll amounts can be specified:
n
scrolls upward by the specified number of lines.
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 of the file is displayed.
If the scroll amount is not explicitly specified, then the window is scrolled by the amount that was specified in the most recent VSCROLL command. The default VSCROLL amount is PAGE.
BOTTOM
scrolls downward until the last line of the file is displayed.
FORWARD <n|HALF|PAGE|MAX>
scrolls vertically toward the end of the file. The following scroll amounts can be specified:
n
scrolls downward by the specified number of lines.
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 first line of the file is displayed.
If the scroll amount is not explicitly specified, then the window is scrolled by the amount that was specified in the most recent VSCROLL command. The default VSCROLL amount is PAGE. Regardless of the scroll amount, this command does not scroll beyond the last line of the file.
HSCROLL <n|HALF|PAGE>
sets the default horizontal scrolling amount for the LEFT and RIGHT commands. The following scroll amounts can be specified:
n
sets the default scroll amount to the specified number of columns.
HALF
sets the default scroll amount to half the number of columns in the window.
PAGE
sets the default scroll amount to the number of columns in the window.
The default HSCROLL amount is HALF.
LEFT <n|HALF|PAGE|MAX>
scrolls horizontally toward the left margin of the text. This command is ignored unless the file width is greater than the window width. The following scroll amounts can be specified:
n
scrolls left by the specified number of columns.
HALF
scrolls left by half the number of columns in the window.
PAGE
scrolls left by the number of columns in the window.
MAX
scrolls left until the left margin of the text is displayed at the left edge of the window.
If the scroll amount is not explicitly specified, then the window is scrolled by the amount that was specified in the most recent HSCROLL command. The default HSCROLL amount is HALF. Regardless of the scroll amount, this command does not scroll beyond the left margin of the text.
RIGHT <n|HALF|PAGE|MAX>
scrolls horizontally toward the right margin of the text. This command is ignored unless the file width is greater than the window width. The following scroll amounts can be specified:
n
scrolls right by the specified number of columns.
HALF
scrolls right by half the number of columns in the window.
PAGE
scrolls right by the number of columns in the window.
MAX
scrolls right until the right margin of the text is displayed at the left edge of the window.
If the scroll amount is not explicitly specified, then the window is scrolled by the amount that was specified in the most recent HSCROLL command. The default HSCROLL amount is HALF. Regardless of the scroll amount, this command does not scroll beyond the right margin of the text.
TOP
scrolls upward until the first line of text from the file is displayed.
VSCROLL <n|HALF|PAGE>
sets the default vertical scrolling amount for the FORWARD and BACKWARD commands. The following scroll amounts can be specified:
n
sets the default scroll amount to the specified number of lines.
HALF
sets the default scroll amount to half the number of lines in the window.
PAGE
sets the default scroll amount to the number of lines in the window.
The default VSCROLL amount is PAGE.

Searching Commands

BFIND <search-string <PREFIX|SUFFIX|WORD>>
locates the previous occurrence of the specified string in the file, starting at the current cursor position and proceeding backward toward the beginning of the file. The search-string value must be enclosed in quotation marks if it contains embedded blanks.
If a FIND command has previously been issued, then you can use the BFIND command without arguments to repeat the search in the opposite direction.
The CAPS option in the PROC FSLIST statement and the CAPS ON command cause search strings to be converted to uppercase for the purposes of the search, unless the strings are enclosed in quotation marks. See the discussion of the FIND command for details.
By default, the BFIND command locates any occurrence of the specified string, even where the string is embedded in other strings. You can use any one of the following options to alter the command's behavior:
PREFIX
causes the search string to match the text string only when the text string occurs at the beginning of a word.
SUFFIX
causes the search string to match the text string only when the text string occurs at the end of a word.
WORD
causes the search string to match the text string only when the text string is a distinct word.
You can use the RFIND command to repeat the most recent BFIND command.
CAPS <ON|OFF>
controls how the FIND, BFIND, and RFIND commands locate matches for a search string. By default, the FIND, BFIND, and RFIND commands locate only those text strings that exactly match the search string as it was entered. When you issue the CAPS command, the FIND, BFIND, and RFIND commands convert search strings into uppercase for the purposes of searching (displayed text is not affected), unless the strings are enclosed in quotation marks. Strings in quotation marks are not affected.
For example, after you issue a CAPS ON command, both of the following commands locate occurrences of NC but not occurrences of nc: find NC find ncIf you omit the ON or OFF argument, then the CAPS command acts as a toggle, turning the attribute on if it was off or off if it was on.
FIND search-string <NEXT|FIRST|LAST|PREV|ALL> <PREFIX|SUFFIX|WORD>
locates an occurrence of the specified search-string in the file. The search-string must be enclosed in quotation marks if it contains embedded blanks.
The text in the search-string must match the text in the file in terms of both characters and case. For example, the command find raleighwill locate not the text Raleigh in the file. You must instead use find Raleigh.
When the CAPS option is used with the PROC FSLIST statement or when a CAPS ON command is issued in the window, the search string is converted to uppercase for the purposes of the search, unless the string is enclosed in quotation marks. In that case, the command find raleighwill locate only the text RALEIGH in the file. You must instead use the command find 'Raleigh' to locate the text Raleigh.
You can modify the behavior of the FIND command by adding any one of the following options:
ALL
reports the total number of occurrences of the string in the file in the window's message line and moves the cursor to the first occurrence.
FIRST
moves the cursor to the first occurrence of the string in the file.
LAST
moves the cursor to the last occurrence of the string in the file.
NEXT
moves the cursor to the next occurrence of the string in the file.
PREV
moves the cursor to the previous occurrence of the string in the file.
The default option is NEXT.
By default, the FIND command locates any occurrence of the specified string, even where the string is embedded in other strings. You can use any one of the following options to alter the command's behavior:
PREFIX
causes the search string to match the text string only when the text string occurs at the beginning of a word.
SUFFIX
causes the search string to match the text string only when the text string occurs at the end of a word.
WORD
causes the search string to match the text string only when the text string is a distinct word.
After you issue a FIND command, you can use the RFIND command to repeat the search for the next occurrence of the string, or you can use the BFIND command to repeat the search for the previous occurrence.
RFIND
repeats the most recent FIND command, starting at the current cursor position and proceeding forward toward the end of the file.

Display Commands

COLUMN <ON|OFF>
displays a column ruler below the message line in the FSLIST window. The ruler is helpful when you need to determine the column in which a particular character is located. If you omit the ON or OFF specification, then the COLUMN command acts as a toggle, turning the ruler on if it was off and off if it was on.
HEX <ON|OFF>
controls the special hexadecimal display format of the FSLIST window. When the hexadecimal format is turned on, each line of characters from the file occupies three lines of the display. The first is the line displayed as characters; the next two lines of the display show the hexadecimal value of the operating environment's character codes for the characters in the line of text. The hexadecimal values are displayed vertically, with the most significant byte on top. If you omit the ON or OFF specification, then the HEX command acts as a toggle, turning the hexadecimal format on if it was off and off if it was on.
NUMS <ON|OFF>
controls whether line numbers are shown at the left side of the window. By default, line numbers are not displayed. If line numbers are turned on, then they remain at the left side of the display when text in the window is scrolled right and left. If you omit the ON or OFF argument, then the NUMS command acts as a toggle, turning line numbering on if it was off or off if it was on.

Other Commands

BROWSE fileref|'actual-filename' <CC|FORTCC|NOCC <OVP|NOOVP>>
closes the current file and displays the specified file in the FSVIEW window. You can specify either a fileref previously associated with a file or an actual filename enclosed in quotation marks. The BROWSE command also accepts the same carriage-control options as the FSLIST command. See Optional Arguments for details.
END
closes the FSLIST window and ends the FSLIST session.
HELP <command>
opens a Help window that provides information about the FSLIST procedure and about the commands available in the FSLIST window. To get information about a specific FSLIST window command, follow the HELP command with the name of the desired command.
KEYS
opens the KEYS window for browsing and editing function key definitions for the FSLIST window. The default key definitions for the FSLIST window are stored in the FSLIST.KEYS entry in the SASHELP.FSP catalog.
If you change any key definitions in the KEYS window, then a new FSLIST.KEYS entry is created in your personal PROFILE catalog (SASUSER.PROFILE, or WORK.PROFILE if the SASUSER library is not allocated).
When the FSLIST procedure is initiated, it looks for function key definitions first in the FSLIST.KEYS entry in your personal PROFILE catalog. If that entry does not exist, then the default entry in the SASHELP.FSP catalog is used.