Calling the SAS Windowing Environment

The same strategy used for calling the operating system works for SAS global statements as well, including calling the SAS windowing environment by generating DM statements.

The following subroutine executes a SAS windowing environment command:

   start dm(command);
      call push(" dm '",command,"'; resume;");
      pause;
   finish;
   run dm('log; color source red');

The call generates and executes the following statements:

   dm 'log; color source red'; resume;

These statements take you to the Log window, where all source code is written in red.