| SAS Companion for the OpenVMS Environment |
In
SAS interactive line mode, you enter SAS statements line by line
in response to line prompts that are issued by the SAS System. The SAS session
retains exclusive use of the terminal.
To
invoke SAS in interactive line mode, enter the following command at the DCL
prompt:
$ SAS7/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.
Under OpenVMS you
can recall SAS statements by using the CTRL-B key
combination and your up arrow and down 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.
Interactive
line mode is most effective when you use the %INCLUDE statement
to bring in most of your SAS statements. Using this method, the programs that
you enter are not long, and you do not need to save your SAS statements. However,
if you want to save your program, the best method is to write your SAS log
to an OpenVMS file.
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;
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 (;).
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.