You can create an orchestration
job that uses a
SAS Program node in the
Flow tab
to run SAS code in the context of an orchestration job. For example,
you could create a job that runs SAS code. The
SAS Program node
in the job is configured to retain its log and list output.
This sample orchestration
job is shown in the following display:
SAS Program Job Flow
The reference settings
for the
SAS Program node are shown in the
following display:
SAS Program Reference Settings
Select the server that
executes the SAS code that you need to run. These servers must be
registered in SAS Management Console. Then navigate to the file on
the selected server. The file in this job is named
sascoderetain.sas.
If you select a non-pooled
workspace server, then you or the user logged in to the Visual Process
Orchestration environment needs a password stored in metadata. You
can store the password in SAS Management Console’s User Manager.
Also note that you might need to change the SAS Logical Workspace
server component to SAS token authentication. In this case, refer
to the
Options tab step in the procedure
covered in the “How to Configure SAS Token Authentication”
section in the “Authentication Tasks” chapter in
SAS
Intelligence Platform: Security Administration Guide.
Note that you can use
the
Raise events for each step check box
to specify that events are fired at each step boundary when the SAS
program is running. You can also select the appropriate check box
if you need to retain the log or the SAS output for the SAS program.
Then, you can download the log or the output in the Run Status view.
The
SAS
Program node inputs are shown in the following display:
SAS Program Node Inputs
Note that the
SASCodeEcho_Input is
created. This is a newly created input string. The default value of
this input parameter (as well as all input parameters) is passed into
the SAS code that is submitted. The SAS code contains a SAS macro
with a name that is based on the input name. In this case, it is referenced
as &SASCodeEcho_Input. This default value must be resolved in
the SAS code macro at run time.
The SAS program used
in this job is contained in the SASCodeRetainSASOutput.txt file. The
file contains the following code:
data _null_;
set sashelp.class;
attrib Name length = $8;
attrib Sex length = $1;
attrib Age length = 8;
attrib Height length = 8;
attrib Weight length = 8;
quote='"';
file "&SASCodeEcho_Input" dlm=' ';
put
quote +(-1) Name +(-1) quote
quote +(-1) Sex +(-1) quote
quote +(-1) Age +(-1) quote
quote +(-1) Height +(-1) quote
quote +(-1) Weight +(-1) quote
;
run;
The outputs for the
SAS
Program node are shown in the following display:
SAS Program Node Outputs
Note that the unique
outputs for
SAS Program include XML output
of the list and log contents of the node and a completion status indicator.