Previous Page  Next Page 
Working with Other SAS Products

Submitting SAS/INSIGHT Statements

If this analysis were a task you perform frequently, you could save time by automating the creation of the rotating plot. To do this, you can submit SAS/INSIGHT statements in the Program Editor.

You can submit statements when SAS/INSIGHT is executing either as a procedure or as a task. To submit statements to the procedure, do the following.

Choose File:End in the data window to exit SAS/INSIGHT.

In the Program Editor, enter the statements shown in Figure 30.11.

The DATA option opens the CAN_SCOR data set. The ROTATE statement creates the rotating plot.

wor11.gif (5314 bytes)

Figure 30.11: SAS/INSIGHT Statements in Program Editor

Choose Run:Submit to submit the SAS statements.

This opens the data set and creates the plot.

wor12.gif (16585 bytes)

Figure 30.12: Data Window and Rotating Plot

It is often preferable to invoke SAS/INSIGHT as a task instead of a procedure. It is sometimes preferable to open a data set without displaying it. To invoke SAS/INSIGHT as a task and display a rotating plot without a data window, follow these steps.

Store the following three statements in a text file called myfile.
   open sasuser.can$\_$scor / nodisplay;
   rotate can3 * can2 * can1;

In the Program Editor, enter the FILENAME statement shown in Figure 30.13.

The FILENAME statement assigns a fileref.

wor13.gif (4323 bytes)

Figure 30.13: Submitting a FILENAME statement

Choose Run:Submit to submit the statement

Invoke SAS/INSIGHT as a task with the INFILE= option.

You can invoke SAS/INSIGHT on the command line with the statement

   insight infile=test

This opens the data set SASUSER.CAN_SCOR without displaying it and then creates a rotating plot of CAN3 versus CAN2 versus CAN1.

wor14.gif (8825 bytes)

Figure 30.14: Rotating Plot

You can use grammar statements such as these to drive SAS/INSIGHT software from SAS/AF software. For portability, statements can be stored in catalog entries by using a FILENAME statement with the keyword LIBRARY. For example, if you stored statements in a catalog entry sasuser.insight.test.source, you could assign the fileref with the statement

   filename test library 'sasuser.insight.test.source';

For SAS/AF applications, you can improve the display of SAS/INSIGHT windows by suppressing the display of menus, buttons, and confirmation dialogs. You can also save options to configure your graphs and analyses. These techniques are described in Chapter 41, "SAS/INSIGHT Statements," and Chapter 29, "Configuring SAS/INSIGHT Software."

Previous Page  Next Page  Top of Page

Copyright © 2007 by SAS Institute Inc., Cary, NC, USA. All rights reserved.