DM Statement


Submits SAS Program Editor, Log, Procedure Output or text editor commands as SAS statements

Valid: anywhere

Category: Program Control

Syntax

DM < window >' command(s) '< window > <CONTINUE>;

Arguments

window

  • specifies the active window. For more information, see 'Details' on page 1142.

  • Default: If you omit the window name , SAS uses the Program Editor window as the default.

' command '

  • can be any windowing command or text editor command and must be enclosed in single quotation marks. If you want to issue several commands, separate them with semicolons.

CONTINUE

  • causes SAS to execute any SAS statements that follow the DM statement in the Program Editor window and, if a windowing command in the DM statement called a window, makes that window active.

  • Tip: Any windows that are activated by the SAS statements (such as the Output window) appear before the window that is to be made active.

  • Note: If you specify Log as the active window, for example, and have other SAS statements that follow the DM statement (for example, in an autoexec file), those statements are not submitted to SAS until control returns to the SAS interface.

Details

Execution occurs when the DM statement is submitted to SAS. This statement is useful for

  • changing SAS interface features during a SAS session

  • changing SAS interface features at the beginning of each SAS session by placing the DM statement in an autoexec file

  • performing utility functions in windowing applications, such as saving a file with the FILE command or clearing a window with the CLEAR command.

    Window placement affects the outcome of the statement:

  • If you name a window before the commands, those commands apply to that window.

  • If you name a window after the commands, SAS executes the commands and then makes that window the active window. The active window is opened and contains the cursor.

Examples

Example 1: Using the DM Statement

  • dm 'color text cyan; color command red';

  • dm log 'clear; pgm; color numbers green'

    • output;

  • dm 'caps on';

  • dm log 'clear' output;

Example 2: Using the CONTINUE Option with SAS Statements That Do Not Activate a Window

This example causes SAS to display the first window of the SAS/AF application, executes the DATA step, moves the cursor to the first field of the SAS/AF application window, and makes that window active.

 dm 'af c=  your-program  ' continue;  data temp;  .  .  .  more SAS statements  .  .  .  run; 

Example 3: Using the CONTINUE Option with SAS Statements That Activate a Window

This example displays the first window of the SAS/AF application and executes the PROC PRINT step, which activates the OUTPUT window. Closing the OUTPUT window moves the cursor to the last active window..

 dm 'af c=  your-program  ' continue;  proc print data=temp;  run; 



SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 704

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net