Using the SQL Editor |
When your SQL query is ready, you can run the query immediately or you can add a title, change its options, limit its output, and so on, to make the report look better. See Viewing the SQL Code, Running the Query, and Refining the Output for more information.
To run your report immediately, select Submit from the SQL Editor window's Run menu. Your output is displayed in the Report Output window (or in the output window that is defined for your system).
In some cases, you might want to edit your output to make your report look better or to correct minor errors, such as a mistyped name. It is more efficient to change the output for a report rather than to run the query again, especially if the tables used to create the report are very large.
To edit your output directly, select Report Output Manager from the View menu. The Report Output Manager window opens, as shown in the following display.
Report Output Manager Window
The Report Output Manager lists every run of your queries in a temporary catalog, WORK.CURSTAT (current status). Type E or S in the Cmd field next to the output that you want to edit. This opens a window with the same text editing capabilities and commands as the Enhanced Editor window. You can edit any of the data or text in the output.
To save your changes, you must save the edited output either to an external file or to a SAS catalog entry.
To save the edited output temporarily in the WORK.CURSTAT catalog, select Save from the File menu. When prompted, select R to overwrite the original OUTPUT entry in the WORK.CURSTAT catalog.
To save your edited output permanently, select Save As from the File menu. Specify a name, description, and catalog and select OK.
If you last saved from one of the three windows that has a different type than the one you are currently saving, you might not receive the warning prompt and your entry will be overwritten.
To save your output to an external file, select Save As File from the File menu. Specify an external file name in the Save As window and select OK.
From the Edit window, select Close from the File menu to return to the Report Output Manager window.
When you exit from the Report Output Manager and return to the Report Output window, you see that the changes you made are not shown in your output. The Report Output window does not automatically update to include your changes.
Note: If you do not save your changes to a permanent catalog or external file, the changes will be lost when you exit from SAS because WORK.CURSTAT is a temporary catalog.
Select Close from File to return to the SQL Editor window.
Copyright © 2012 by SAS Institute Inc., Cary, NC, USA. All rights reserved.