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
Controls the display of lines in the Log and Output windows
UNIX specifics: valid arguments and default values
AUTOSCROLL < n >
n specifies the number of lines that the window should scroll when it receives a line of data that cannot fit.
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).
Causes characters to be translated to uppercase when you move the cursor off of the line or press ENTER
UNIX specifics: all
CAPS
Changes the color and highlighting of selected portions of a window
UNIX specifics: valid field types and attributes
COLOR field-type color NEXT < highlight >
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.
Online help for the Program Editor window
"Syntax of the COLOR Command" on page 85
Displays the About SAS dialog box
UNIX specifics: all
DLGABOUT
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
Invokes the Change Working Directory dialog box
UNIX specifics: all
DLGCDIR
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
Displays the Exit dialog box
UNIX specifics: all
DLGENDR
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
"Miscellaneous Resources in UNIX Environments" on page 96
Invokes the Find dialog box
UNIX specifics: all
DLGFIND
The Find dialog box enables you to search for text strings. To access this dialog box from the pull-down menus, select
Edit – Find
"DLGREPLACE Command" on page 207
Invokes the Font dialog box
UNIX specifics: all
DLGFONT
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
"Customizing Fonts in UNIX Environments" on page 80
"SETDMSFONT Command" on page 215
Invokes the Open or Import Image dialog box
UNIX specifics: all
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.
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
Information about image extensions in online documentation for SAS/GRAPH
Invokes the Preferences dialog box
UNIX specifics: all
DLGPREF
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
"Modifying X Resources through the Preferences Dialog Box" on page 57
Invokes the Change dialog box
UNIX specifics: all
DLGREPLACE
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
"DLGFIND Command" on page 205
Invokes the Save As or Export as Image dialog box
UNIX specifics: all
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.
To access this dialog box from the pull-down menus, select
File – Save as
or
File – Export as Image
Information about image extensions in online documentation for SAS/GRAPH
Saves the active GRAPH window as an image file using the filename and file type that you specify
UNIX specifics: all
DLGSCRDUMP <' filename.ext ' 'FORMAT= file-type '>
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.
Information about image extensions in online documentation for SAS/GRAPH
Invokes the Send Mail dialog box
UNIX specifics: all
DLGSMAIL
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
"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
Writes the contents of the current window to an external file
UNIX specifics: valid values for encoding-value and host-options
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.
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.
Specifies the fill character and fills the current field
UNIX specifics: default character
FILL < fill-character >
Under UNIX, the default fill character is an underscore (_).
Lists all of the fonts that are available in your operating environment
UNIX specifics: all
FONTLIST
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.
Submits the specified SAS statements or the SAS code stored in a paste buffer
UNIX specifics: valid buffer names
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.
Toggles cursor position between current position and command line
UNIX specifics: keyboard equivalent
HOME
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.
Online help for the Program Editor window
"Customizing Key Definitions in UNIX Environments" on page 73
Invokes the host editor on the contents of the current window
UNIX specifics: all
HOSTEDIT
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.
"Configuring SAS for Host Editor Support in UNIX Environments" on page 49
"EDITCMD System Option" on page 325
Copies the entire contents of an external file into the current window
UNIX specifics: valid values for encoding-value and portable-options
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. |
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.
Turns autosave on and off
UNIX specifics: all
SETAUTOSAVE <ONOFF>
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.
"Modifying the DMS Settings" on page 58
"Miscellaneous Resources in UNIX Environments" on page 96
Specifies a windowing environment font for the current session
UNIX specifics: all
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.
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.
"DLGFONT Command" on page 205
Closes the toolbox
UNIX specifics: all
TOOLCLOSE
The TOOLCLOSE command closes the toolbox.
"TOOLLOAD Command" on page 217
Invokes the Tool Editor on the specified toolbox
UNIX specifics: all
TOOLEDIT < library.catalog.entry >
If you do not specify an entry name, the Tool Editor edits the toolbox for the active window.
Sets the size of the buttons in the SAS ToolBox
UNIX specifics: all
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.
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.
Loads the specified toolbox
UNIX specifics: all
TOOLLOAD < library.catalog.entry >
If you do not specify an entry name, TOOLLOAD loads the toolbox for the active window.
"TOOLCLOSE Command" on page 216
Turns tool tips on and off
UNIX specifics: all
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.
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 .
"Changing an Existing Tool" on page 70
Invokes your World Wide Web (WWW) browser
UNIX specifics: all
WBROWSE <" url ">
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.
"Miscellaneous Resources in UNIX Environments" on page 96
Copies the marked contents of the active window to your default buffer
UNIX specifics: all
WCOPY
In Base SAS windows, this command executes the STORE command.
SAS Help and Documentation for information about the STORE command
Moves the marked contents of the active window to your default buffer
UNIX specifics: all
WCUT
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.
SAS Help and Documentation for information about the CUT and WCUT commands
Redefines the active window
UNIX specifics: behavior is controlled by the SAS.awsResizePolicy resource
WDEF starting-row starting-col nrows ncols
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.
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
Pastes the contents of your default buffer into the active window
UNIX specifics: all
WPASTE
In Base SAS windows, this command executes the PASTE command.
SAS Help and Documentation for information about the PASTE and WPASTE commands
Undoes one line of text entry
UNIX specifics: all
WUNDO
In Base SAS windows, this command executes the UNDO command. In SAS/GRAPH windows, WUNDO is invalid.
Enables you to enter UNIX commands without ending your SAS session
UNIX specifics: all
X UNIX-command
X' cmd1 ; cmd2 ....<; cmd- n>'
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.
"Executing Operating System Commands from Your SAS Session" on page 13
Changes X synchronization during a SAS session
UNIX specifics: all
XSYNC <ONOFF>
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.