SAS 9.1 Companion For Unix Enivronments
SAS Commands Under UNIX
This section describes commands that you can enter on the command line in the windowing environment of SAS. The commands that are described here have behavior or syntax that is specific to UNIX environments. Each command description includes a brief "UNIX specifics" section that explains which aspect of the command is specific to UNIX. If the information under the "UNIX specifics" says "all," then the command is described only in this document. Otherwise , the command is described in both this documentation and in SAS Language Reference: Dictionary .
The following commands are not supported in UNIX environments:
-
CASCADE
-
DCALC
-
ICON
-
PCLEAR
-
RESIZE
-
SCROLLBAR
-
SMARK
-
TILE
-
WGROW
-
WMOVE
-
WSHRINK
-
ZOOM
AUTOSCROLL Command
Controls the display of lines in the Log and Output windows
UNIX specifics: valid arguments and default values
Syntax
AUTOSCROLL < n >
n specifies the number of lines that the window should scroll when it receives a line of data that cannot fit.
Details
The AUTOSCROLL command controls the scrolling of lines as they are written to the Log and Output windows. The default value for AUTOSCROLL in the Log and Output windows is 1 . Processing is slower when AUTOSCROLL displays one line at a time. To expedite processing, you can specify a greater AUTOSCROLL value in your autoexec.sas file. Specifying a value of 0 optimizes processing and results in the fastest scrolling (similar to jump scrolling in xterm windows).
CAPS Command
Causes characters to be translated to uppercase when you move the cursor off of the line or press ENTER
UNIX specifics: all
Syntax
CAPS
COLOR Command
Changes the color and highlighting of selected portions of a window
UNIX specifics: valid field types and attributes
Syntax
COLOR field-type color NEXT < highlight >
Details
Under UNIX, you cannot use the COLOR command to change the colors in these field types: BORDER, MENU, MENUBORDER, SCROLLBAR, or TITLE. Also, the H (highlight) and B (blink) attributes are not supported. For more information about the COLOR command, refer to the online help for the Program Editor window.
See Also
-
Online help for the Program Editor window
-
"Syntax of the COLOR Command" on page 85
DLGABOUT Command
Displays the About SAS dialog box
UNIX specifics: all
Syntax
DLGABOUT
Details
The About SAS dialog box displays information such as the version of SAS that you are running, your site number, the operating system, the version of Motif that you are using, and the color information from your terminal.
To access this dialog box from the pull-down menus , select Help – About SAS System
DLGCDIR Command
Invokes the Change Working Directory dialog box
UNIX specifics: all
Syntax
DLGCDIR
Details
The Change Working Directory dialog box enables you to select a new working directory. To access this dialog box from the pull-down menus, select Tools – Options – Change Directory
DLGENDR Command
Displays the Exit dialog box
UNIX specifics: all
Syntax
DLGENDR
Details
The Exit dialog box prompts you to confirm that you want to exit SAS. If you choose OK , the SAS session ends. If you have set the SAS.confirmSASExit resource to False , this command becomes equivalent to the BYE command. To access this dialog box from the pull-down menus, select File – Exit
See Also
-
"Miscellaneous Resources in UNIX Environments" on page 96
DLGFIND Command
Invokes the Find dialog box
UNIX specifics: all
Syntax
DLGFIND
Details
The Find dialog box enables you to search for text strings. To access this dialog box from the pull-down menus, select Edit – Find
See Also
-
"DLGREPLACE Command" on page 207
DLGFONT Command
Invokes the Font dialog box
UNIX specifics: all
Syntax
DLGFONT
Details
The Font dialog box enables you to dynamically change the SAS windowing environment font. To access this dialog box from the pull-down menus, select Tools – Options – Fonts
See Also
-
"Customizing Fonts in UNIX Environments" on page 80
-
"SETDMSFONT Command" on page 215
DLGOPEN Command
Invokes the Open or Import Image dialog box
UNIX specifics: all
Syntax
DLGOPEN <FILTERS=' filters ' <IMPORT> <SUBMITNOSUBMIT> <VERIFY>>
FILTERS=' filters '
-
specifies one or more file filters to use as search criteria when displaying files. For example
DLGOPEN FILTERS="*.sas *.txt"
-
displays all files in the current directory that have a .sas extension and adds *.txt to the File type box in the dialog box. You can specify multiple filters; they all appear in the box. If you do not specify any filters, the dialog box displays a default list. See the description of the SAS.pattern resource in "Miscellaneous Resources in UNIX Environments" on page 96 for information about specifying a default file pattern.
IMPORT
-
invokes the Import Image dialog box, which enables you to import graphic files to SAS/GRAPH applications.
SUBMITNOSUBMIT
-
specifies whether the SUBMIT command is pushed after the file is opened.
VERIFY
-
checks whether the DLGOPEN command is appropriate for the active window.
Details
The Open and Import Image dialog boxes enable you to select a file to read into the active window. If the active window is a SAS/GRAPH window, then the Import Image dialog box is displayed; otherwise, the Open dialog box is displayed. To access these dialog boxes from the pull-down menus, select File – Open or File – Import Image
See Also
-
Information about image extensions in online documentation for SAS/GRAPH
DLGPREF Command
Invokes the Preferences dialog box
UNIX specifics: all
Syntax
DLGPREF
Details
The Preferences dialog box enables you to dynamically change certain resource settings. To access this dialog box from the pull-down menus, select Tools – Options – Preferences
See Also
-
"Modifying X Resources through the Preferences Dialog Box" on page 57
DLGREPLACE Command
Invokes the Change dialog box
UNIX specifics: all
Syntax
DLGREPLACE
Details
The Change dialog box enables you to search for and replace text strings. To access this dialog box from the pull-down menus, select Edit – Replace
See Also
-
"DLGFIND Command" on page 205
DLGSAVE Command
Invokes the Save As or Export as Image dialog box
UNIX specifics: all
Syntax
DLGSAVE <FILTERS=' filters ' <EXPORT> <VERIFY>>
FILTERS=' filters '
-
specifies one or more file filters to use as search criteria when displaying files. For example, the following command displays all files in the current directory that have a .sas extension and adds *.txt to the File type box in the dialog box:
DLGSAVE FILTERS="*.sas *.txt"
-
You can specify multiple filters; they all appear in the combo box. If you do not specify any filters, the dialog box displays a default list.
EXPORT
-
invokes the Export as Image dialog box, enabling you to export graphic files in your SAS session.
VERIFY
-
checks whether the DLGSAVE command is appropriate for the active window.
Details
To access this dialog box from the pull-down menus, select File – Save as or File – Export as Image
See Also
-
Information about image extensions in online documentation for SAS/GRAPH
DLGSCRDUMP Command
Saves the active GRAPH window as an image file using the filename and file type that you specify
UNIX specifics: all
Syntax
DLGSCRDUMP <' filename.ext ' 'FORMAT= file-type '>
Details
DLGSCRDUMP saves the active GRAPH window as an image file by using the filename and file type that you specify. If you do not specify arguments, DLGSCRDUMP opens the Export dialog box and enables you to choose a filename and file type. You can save screen captures in any image format supported by SAS/GRAPH with image extensions. If your site has not licensed SAS/GRAPH with image extensions, then screen captures can be saved only as XPM files.
See Also
-
Information about image extensions in online documentation for SAS/GRAPH
DLGSMAIL Command
Invokes the Send Mail dialog box
UNIX specifics: all
Syntax
DLGSMAIL
Details
The Send Mail dialog box lets you send electronic mail while working in SAS. To access this dialog box from the pull-down menus, select File – Send mail
See Also
-
"Sending Electronic Mail Using the FILENAME Statement (EMAIL)" on page 143 and "Sending Mail from within Your SAS Session in UNIX Environments" on page 47
-
"EMAILSYS System Option" on page 326
FILE Command
Writes the contents of the current window to an external file
UNIX specifics: valid values for encoding-value and host-options
Syntax
FILE < file-specification > <ENCODING=' encoding-value '>< portable-options > < host-options >
file-specification
-
can be any of the following:
-
a single filename. SAS writes the file in the current directory. If you enclose the filename in quotation marks, SAS uses the filename exactly as you specify it. If you do not enclose the filename in quotation marks and if you do not specify a filename extension, SAS uses .sas, .log, or .lst, depending on whether you issue the command from the Program Editor, Log, or Output window.
-
an entire pathname. SAS does not assume any filename extensions, even if you do not enclose the pathname in quotation marks.
-
a fileref.
-
ENCODING=' encoding-value '
-
specifies the encoding to use when writing to the output file. The value for ENCODING= indicates that the output file has a different encoding from the current session encoding.
When you write data to the output file, SAS transcodes the data from the session encoding to the specified encoding.
For valid encoding values, see "Encoding Values in SAS Language Elements" in SAS National Language Support (NLS): User's Guide .
portable-options
-
are options for the FILE command that are valid in all operating environments. See the SAS Language Reference: Dictionary for information about these options.
host-options
-
are specific to UNIX environments. These options can be any of the following:
-
BLKSIZE=
-
BLK=
-
specifies the number of bytes that are physically written in one I/O operation. The default is 8K. The maximum is 1G-1.
-
-
LRECL=
-
specifies the logical record length. Its meaning depends on the record format in effect (RECFM). The default is 256. The maximum length is 1G.
-
If RECFM=F, then the value for the LRECL= option determines the length of each output record. The output record is truncated or padded with blanks to fit the specified size .
-
If RECFM=N, then the value for the LRECL= option must be at least 256.
-
If RECFM=V, then the value for the LRECL= option determines the maximum record length. Records that are longer than the specified length are truncated.
-
-
-
NEWOLD
-
indicates that a new file is to be opened for output. If the file already exists, then it is deleted and re-created. This is the default action.
-
-
RECFM=
-
specifies the record format. Values for the RECFM= option are
D
default format (same as variable).
F
fixed format. That is, each record has the same length. Do not use RECFM=F for external files that contain carriage -control characters.
N
binary format. The file consists of a stream of bytes with no record boundaries.
P
print format. SAS writes carriage-control characters.
V
variable format. Each record ends with a newline character.
S370V
variable S370 record format (V).
S370VB
variable block S370 record format (VB).
S370VBS
variable block with spanned records S370 record format (VBS).
-
-
UNBUF
-
tells SAS not to perform buffered writes to the file on any subsequent FILE statement. This option applies especially when you are writing to a data collection device.
-
Details
If you do not enter a file specification, then SAS uses the filename from the previous FILE or INCLUDE command. In this case, SAS first asks if you want to overwrite the file. If you have not issued any FILE or INCLUDE commands, then you receive an error message that indicates that no default file exists.
FILL Command
Specifies the fill character and fills the current field
UNIX specifics: default character
Syntax
FILL < fill-character >
Details
Under UNIX, the default fill character is an underscore (_).
FONTLIST Command
Lists all of the fonts that are available in your operating environment
UNIX specifics: all
Syntax
FONTLIST
Details
The FONTLIST command opens windows that list all of the software fonts that are available in your operating environment. This feature is useful if you want to choose a font to use in a SAS program, typically with a FONT= or FTEXT= option.
Issuing the FONTLIST command from the SAS command line opens the Select Font window, which contains two buttons , Copy and System . Selecting System opens the Fonts window, from which you can select and preview all available system fonts. After you select the desired font and font attributes, select OK . The Select font window reopens with your selected font name displayed. Selecting Copy places the font name in the copy buffer so that you can paste the selected font name into your SAS program.
GSUBMIT Command
Submits the specified SAS statements or the SAS code stored in a paste buffer
UNIX specifics: valid buffer names
Syntax
GSUBMIT BUF= buffername " statement1 ; statementN ...;"
buffername
-
can be XPRIMARY, XSCNDARY, XCLIPBRD, XTERM, or XCUT n where 0<= n <=7. See "Customizing Cut-and-Paste in UNIX Environments" on page 91 for more information.
statementN
-
can be any SAS statement.
HOME Command
Toggles cursor position between current position and command line
UNIX specifics: keyboard equivalent
Syntax
HOME
Details
Keyboards vary among the different UNIX operating environments. To determine which key is assigned to the HOME command, look in the KEYS window. To open the KEYS window, issue the KEYS command.
See Also
-
Online help for the Program Editor window
-
"Customizing Key Definitions in UNIX Environments" on page 73
HOSTEDIT Command
Invokes the host editor on the contents of the current window
UNIX specifics: all
Syntax
HOSTEDIT
Details
When you issue the HOSTEDIT command from a SAS text editor window, the contents of the buffer for that window are written to a temporary file in the /tmp directory. A command invoking the host editor that was specified in the EDITCMD system option is passed to the SAS Session Manager. The session manager issues the command to the operating environment to invoke the editor for the temporary file.
The X display used with the HOSTEDIT command is the same one used with your SAS session.
HED is an alias for the HOSTEDIT command.
See Also
-
"Configuring SAS for Host Editor Support in UNIX Environments" on page 49
-
"EDITCMD System Option" on page 325
INCLUDE Command
Copies the entire contents of an external file into the current window
UNIX specifics: valid values for encoding-value and portable-options
Syntax
INCLUDE < file-specification > <ENCODING=' encoding-value '> < portable-options > < host-options >
file-specification
-
can be any of the following:
-
a single filename. SAS searches for the file in the current directory. If you enclose the filename in quotation marks, then SAS uses the filename exactly as you specify it. If you do not enclose the filename in quotation marks and if you do not specify a filename extension, then SAS searches for file-specification .sas.
-
an entire pathname. SAS does not assume any filename extensions, even if you do not enclose the pathname in quotation marks.
-
a fileref.
-
ENCODING= 'encoding-value'
-
specifies the encoding to use when reading from the external file. The value for ENCODING= indicates that the external file has a different encoding from the current session encoding.
When you read data from an external file, SAS transcodes the data from the specified encoding to the session encoding.
For valid encoding values, see "Encoding Values in SAS Language Elements" in SAS National Language Support (NLS): User's Guide .
portable-options
-
are options for the INCLUDE command that are valid in all operating environments. See the SAS Language Reference: Dictionary for information about these options.
host-options
-
are specific to UNIX environments. These options can be any of the following:
-
BLKSIZE=
-
BLK=
-
specifies the number of bytes that are physically read in one I/O operation. The default is 8K. The maximum is 1G-1.
-
-
LRECL=
-
specifies the logical record length. Its meaning depends on the record format in effect (RECFM). The default is 256. The maximum length is 1G.
-
If RECFM=F, then the value for the LRECL= option determines the number of bytes to be read as one record.
-
If RECFM=N, then the value for the LRECL= option must be at least 256.
-
If RECFM=V, then the value for the LRECL= option determines the maximum record length. Records that are longer than the specified length are truncated.
-
-
-
RECFM=
-
specifies the record format. Values for the RECFM= option are
D
default format (same as variable).
F
fixed format. That is, each record has the same length.
N
binary format. The file consists of a stream of bytes with no record boundaries.
P
print format.
V
variable format. Each record ends with a newline character.
-
Details
If you do not enter a file specification, then SAS uses the filename from the previous FILE or INCLUDE command. In this case, SAS first asks if you want to overwrite the file. If you have not issued any FILE or INCLUDE commands, then you receive an error message to indicate that no default file exists.
SETAUTOSAVE Command
Turns autosave on and off
UNIX specifics: all
Syntax
SETAUTOSAVE <ONOFF>
Details
The SETAUTOSAVE command turns autosave on or off for the Program Editor. However, the value set for autosave on the Preferences dialog box has precedence. To open the Preferences dialog box, select Tools – Options – Preferences Autosave is controlled by the Backup Documents check box on the DMS tab. On this tab, there is also a field in which you can specify the interval for these backups .
If you turn autosave on using the SETAUTOSAVE command and the Backup Documents check box is selected, then SAS automatically saves the contents of the Program Editor into a file named pgm.asv in your current directory at the interval specified on the DMS tab.
If you issue this command but do not specify ON or OFF, SAS displays the current autosave setting.
See Also
-
"Modifying the DMS Settings" on page 58
-
"Miscellaneous Resources in UNIX Environments" on page 96
SETDMSFONT Command
Specifies a windowing environment font for the current session
UNIX specifics: all
Syntax
SETDMSFONT " font-specification "
font-specification
-
specifies an XLFD (X Logical Font Description) pattern that you want SAS to use in order to determine the windowing environment font.
Details
Most fonts in the X Window System are associated with an XLFD, which contains a number of different fields that are delimited by a dash (-) character. The fields in the XLFD indicate properties such as the font family name, weight, size, resolution, and whether the font is proportional or monospaced . Refer to your X Window documentation for more information about the XLFD and font names that are used with X.
See Also
-
"DLGFONT Command" on page 205
TOOLCLOSE Command
Closes the toolbox
UNIX specifics: all
Syntax
TOOLCLOSE
Details
The TOOLCLOSE command closes the toolbox.
See Also
-
"TOOLLOAD Command" on page 217
TOOLEDIT Command
Invokes the Tool Editor on the specified toolbox
UNIX specifics: all
Syntax
TOOLEDIT < library.catalog.entry >
Details
If you do not specify an entry name, the Tool Editor edits the toolbox for the active window.
TOOLLARGE Command
Sets the size of the buttons in the SAS ToolBox
UNIX specifics: all
Syntax
TOOLLARGE <ONOFF>
ON
-
sets the size of the icons in the SAS ToolBox to 48x48.
OFF
-
sets the size of the icons in the SAS ToolBox to 24x24.
Details
If you do not specify ON or OFF, the TOOLLARGE command changes the size of the SAS ToolBox. The size of the SAS ToolBox changes for your current session only; the new size is not saved.
You can also use the pull-down menus to change the size of the SAS ToolBox through the Preferences dialog box. Tools – Options – Preferences Select the ToolBox tab, and then select Use large tools . If you change the size of the SAS ToolBox through the Preferences dialog box, the new size is saved, and SAS will display the large toolbox in subsequent sessions.
TOOLLOAD Command
Loads the specified toolbox
UNIX specifics: all
Syntax
TOOLLOAD < library.catalog.entry >
Details
If you do not specify an entry name, TOOLLOAD loads the toolbox for the active window.
See Also
-
"TOOLCLOSE Command" on page 216
TOOLTIPS Command
Turns tool tips on and off
UNIX specifics: all
Syntax
TOOLTIPS <ONOFF>
ON
-
specifies that tool tip text is displayed when you move the cursor over an icon in the toolbox.
OFF
-
specifies that tool tip text is not displayed.
Details
If you do not specify ON or OFF, the TOOLTIPS command turns the tip text on or off, depending on the current setting.
You can also use the Preferences dialog box to specify whether tip text is displayed. Tools – Options – Preferences Select the ToolBox tab, then select Use tip text .
See Also
-
"Changing an Existing Tool" on page 70
WBROWSE Command
Invokes your World Wide Web (WWW) browser
UNIX specifics: all
Syntax
WBROWSE <" url ">
Details
WBROWSE invokes the Web browser that is specified by the resource SAS.helpBrowser . If you specify a URL, the document that the URL identifies is automatically displayed. If you do not specify a URL, the SAS home page is displayed.
See Also
-
"Miscellaneous Resources in UNIX Environments" on page 96
WCOPY Command
Copies the marked contents of the active window to your default buffer
UNIX specifics: all
Syntax
WCOPY
Details
In Base SAS windows, this command executes the STORE command.
See Also
-
SAS Help and Documentation for information about the STORE command
WCUT Command
Moves the marked contents of the active window to your default buffer
UNIX specifics: all
Syntax
WCUT
Details
In Base SAS windows, this command executes the CUT command.
This command is valid only when the active window is a text editor window, such as Program Editor or Notepad.
See Also
-
SAS Help and Documentation for information about the CUT and WCUT commands
WDEF Command
Redefines the active window
UNIX specifics: behavior is controlled by the SAS.awsResizePolicy resource
Syntax
WDEF starting-row starting-col nrows ncols
Details
The WDEF command operates in the application workspace assigned to the SAS session. The WDEF command does not operate in the AWS container window, except when the container window needs to be enlarged so that you can view a SAS window contained in it. AWS resize behavior is controlled by the SAS.awsResizePolicy resource.
See Also
-
The description of the SAS.awsResizePolicy resource in "Miscellaneous Resources in UNIX Environments" on page 96
-
"X Window Managers" on page 31 or your window manager documentation for information about moving and resizing windows in the X environment
WPASTE Command
Pastes the contents of your default buffer into the active window
UNIX specifics: all
Syntax
WPASTE
Details
In Base SAS windows, this command executes the PASTE command.
See Also
-
SAS Help and Documentation for information about the PASTE and WPASTE commands
WUNDO Command
Undoes one line of text entry
UNIX specifics: all
Syntax
WUNDO
Details
In Base SAS windows, this command executes the UNDO command. In SAS/GRAPH windows, WUNDO is invalid.
X Command
Enables you to enter UNIX commands without ending your SAS session
UNIX specifics: all
Syntax
X UNIX-command
X' cmd1 ; cmd2 ....<; cmd- n>'
Details
When you enter the X command, SAS starts a shell to execute the commands that you specified. The commands that you enter are processed differently, depending on whether you enter one command or more than one command.
See Also
-
"Executing Operating System Commands from Your SAS Session" on page 13
XSYNC Command
Changes X synchronization during a SAS session
UNIX specifics: all
Syntax
XSYNC <ONOFF>
Details
This command turns off the buffering that is normally done by the X Window System. X synchronization is off by default. Turning it on is useful when you are debugging applications, although it drastically reduces performance.
If you do not specify ON or OFF, XSYNC toggles the synchronization. The XSYNC command is valid from any SAS window.