Chapter Contents |
Previous |
Next |
SAS Companion for the OpenVMS Operating Environment |
Invoking SAS in Interactive Line Mode |
To invoke SAS in interactive line mode, enter the following command at the DCL prompt:
$ SAS8/NODMS(If your system manager has set up the SAS environment so that the NODMS system option is the default, you can omit the NODMS option.)
As explained in Starting a SAS Session, you can also specify other system options when you invoke SAS in this manner.
When SAS prompts you with the 1? prompt, enter your SAS statements. By default, both the SAS log and the procedure output files (if any) appear on your display as each step executes.
Recalling SAS Statements with CTRL-B and the Arrow Keys |
Both CTRL-B and the up arrow key move you backward through SAS statements that you entered previously. For example, if you have entered four lines of code and want to recall the first line, press CTRL-B or the up arrow key four times. Each time you press CTRL-B or the up arrow key, the previous line appears after the SAS prompt. When the correct line appears, press RETURN to submit the code.
If you accidentally miss the line that you wanted, then use the down arrow key to move forward through the list of previously entered commands. Each time you press the down arrow key, the next statement appears after the SAS prompt.
Saving SAS Statements |
One easy way to save your SAS statements is to use the PRINTTO procedure followed by the %LIST statement after you have entered your program statements. For example:
. . . program statements . . . 14? filename mylog '[sasdemo]program.log'; 15? proc printto log=mylog; 16? run; 17? %list;
This program gives you a listing of every line you have entered during your current SAS session. The lines are saved in an OpenVMS file that is referred to by the fileref MYLOG, which was assigned in the FILENAME statement in line 14.
Note: To redirect the log to your display, enter the following PROC PRINTTO statement with no options:
proc printto; run;
Ending Your SAS Session |
The ENDSAS statement terminates SAS interactive line mode:
endsas;Then OpenVMS prompts you for a DCL command.
Note: Like all SAS statements, the ENDSAS statement
must be followed by a semicolon (;).
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.