You can
specify options for the results of SAS programs or tasks that are
run by SAS Enterprise Guide. If you are running these programs and
tasks on a grid, you must propagate these settings to all grid nodes
so that the output from the nodes is formatted properly. To apply
the result settings to all grid nodes, follow these steps:
Note: This procedure
requires either SAS Enterprise Guide Version 4.22 or Version 4.1 with
hotfix 11 (41EG11) applied.
-
In SAS
Enterprise Guide, select
ToolsOptionsResults to specify the result options.
-
In the
SAS Enterprise Guide Options window, select
ResultsResults General. Uncheck the
Link handcoded ODS results check box.
This option
enables the temporary files that are used by the grid sessions to
be copied to the local SAS Enterprise Guide project directories.
-
Close
the
Options window.
-
Edit the
SAS\Enterprise Guide 4\SEGuide.exe.config file and add this line:
<add key="OdsOptionsToMacro" value="true" />
This statement
causes SAS Enterprise Guide to generate macro statements for the results
options that you specified.
-
(Optional)
If all programs and tasks submitted from SAS Enterprise Guide will
run on the grid, you can add a statement to suppress the ODS statements
for the SAS Workspace Server. This statement eliminates all of the
default ODS result entries in the workspace and forces the programs
to use the settings that are in place on the grid nodes.
Add this
line to the SAS\Enterprise Guide 4\SEGuide.exe.config file:
<add key="SuppressODSStetements" value="true" />
-
Restart
SAS Enterprise Guide.
After
the change is applied, SAS Enterprise Guide applies the result option
settings to a set of macros. For example, if HTML is set as the only
result output, the macro statements will look like this:
/* BEGIN: SAS Enterprise Guide results options */
%LET _GOPT_DEVICE = ACTIVEX;
%LET _GOPT_XPIXELS = 0;
%LET _GOPT_YPIXELS = 0;
%LET _GOPT_GFOOTNOTE = NOGFOOTNOTE;
%LET _GOPT_GTITLE = NOGTITLE;
%LET _ODSOPTIONS_GRAPHCODEBASE = ATTRIBUTES=("CODEBASE"="http://www2.sas.com/
codebase/graph/v91/sasgraph.exe");
%LET _ODSDEST_LISTING = ;
%LET _ODSDEST_HTML = HTML;
%LET _ENCODING_HTML = utf-8;
%LET _ODSSTYLE_HTML = Analysis;
%LET _ODSSTYLESHEET_HTML = (URL="http://support.sas.com/styles/analysis.css");
%LET _ODSDEST_RTF = ;
%LET _ODSDEST_PDF = ;
%LET _ODSDEST_SRX = ;
/* END: SAS Enterprise Guide results options */
You can
then add macros to the grid wrapper code to evaluate the active preferences
and propagate the appropriate settings to the grid session. The
wrapper code for the macros listed previously looks like the following:
options metaserver='server1.domain.com';
options metaport=8561;
%let rc=%sysfunc(grdsvc_enable(_all_,resource=SASMain));
signon task1;
%include "c:\htmllocal.sas" ;
%include "c:\rtflocal.sas" ;
%include "c:\pdflocal.sas" ;
%include "c:\srxlocal.sas" ;
rsubmit;
ODS _ALL_ CLOSE;
%inc "c:\htmlremote.sas" ;
%inc "c:\rtfremote.sas" ;
%inc "c:\pdfremote.sas" ;
%inc "c:\srxremote.sas" ;
The settings
for each type of output are contained in a set of *local.sas macro
files (such as htmllocal.sas). The files use the %SYSRPUT macro to
propagate the settings to the grid session.
The ODS
option statements are submitted through a set of *remote.sas macro
files (such as htmlremote.sas).