Interactive Line Mode in UNIX Environments

Introduction to Interactive Line Mode

If you are not using an X display, you can invoke SAS in interactive line mode by using the NODMS system option.
You enter SAS statements line by line in response to prompts issued by SAS. SAS reads the source statements from the terminal as you enter them. DATA and PROC steps execute when one of the following occurs:
  • a RUN, QUIT, or DATALINES statement is entered
  • another DATA or PROC statement is entered
  • the ENDSAS statement is entered
To use interactive line mode, you must run SAS in the foreground.

Invoking SAS in Interactive Line Mode

To start an interactive line mode session, invoke SAS with the NODMS or NODMSEXP system option:
sas -nodms
sas -nodmsexp
By default, SAS log and procedure output (if any) appear on your display as each step executes.
You can also invoke SAS in interactive line mode and pass parameters to it:
sas -sysparm 'A B C'
The value A B C is assigned to the SYSPARM macro variable. You can include a program name, such as progparm.sas in the program editor or from the SAS command prompt if you invoked SAS in line mode by using the –nodms option.
After you invoke SAS, the 1? prompt appears, and you can begin entering SAS statements. After you enter each statement, a line number prompt appears.

Exiting SAS in Interactive Line Mode

You can end the session by pressing the EOF key, usually CTRL-D (see Using Control Keys) or by issuing the ENDSAS statement:
endsas;
The session ends after all SAS statements have executed.