SAS.SubmitFile

Prototypes

static void SubmitFile( String sPathName )

Parameters

String sPathName
The name of the text file whose contents you want to submit to the SAS server for execution. Text files containing SAS programming statements usually have the filename extension ".sas".

Remarks

This method submits the statements contained in the text file to the SAS server for execution.

The file must be accessible to the client computer running IML Studio; it does not need to be accessible to the server computer running SAS. Only the contents of the file are transferred from the client computer to the server computer. Of course, if IML Studio and SAS are running on the same computer, this distinction is irrelevant.

It is not necessary for the text file to adhere to the Windows end-of-line convention. This method supports the following conventions:

A sequence of SAS language statements that is submitted to a SAS server by an IMLPlus program must contain zero or more complete DATA or PROC steps. IMLPlus does not support submitting partial DATA or PROC steps. One notable exception to this rule is that it is acceptable to use the RUN statement to execute a PROC step, although the QUIT statement is preferred. If IMLPlus detects that a sequence of SAS language statements has left SAS in a DATA or PROC step, IMLPlus forces SAS to exit the step.

Example

Assume the file UnivariateStatistics.sas exists in your My IML Studio Files directory and that it contains the following SAS language statements:

proc univariate data=&filespec noprint;
var &varname;
output out=results &statistic=outvar;
quit;

The following IMLPlus program makes use of the UnivariateStatistics.sas file:

run GetInstallationDirectory( path );
path = path + "Data Sets";
libname samples (path);

run GetPersonalFilesDirectory( path );
sasprogram = path + "UnivariateStatistics.sas";

submit;
%let filespec = samples.baseball;
%let varname = NO_HOME;
%let statistic = skewness;
endsubmit;

SAS.SubmitFile( sasprogram );

use results;
read all var {"outvar"} into skewness;
close results;
print skewness;
See Also

SAS.SubmitCatalogEntry
SAS.SubmitStatements