DATA Step Action Set: Syntax

Provides actions for running a SAS DATA step

runCode Action

Runs DATA step code.

Run a DATA Step Program
dataStep.runCode <result=results> <status=rc> /
required parameter code="string",
nThreads=64-bit-integer | "MAX",
whereTable
={
casLib="string",
dataSourceOptions={adls_noreq-parameters | bigquery-parameters | cas_noreq-parameters | clouddex-parameters | db2-parameters | dnfs-parameters | esp-parameters | fedsvr-parameters | gcs_noreq-parameters | greenplum-parameters | hadoop-parameters | hana-parameters | hdfs-parameters | impala-parameters | informix-parameters | jdbc-parameters | mongodb-parameters | mysql-parameters | netezza-parameters | odbc-parameters | oracle-parameters | path-parameters | postgres-parameters | redshift-parameters | s3-parameters | sapiq-parameters | sforce-parameters | singlestore_standard-parameters | snowflake-parameters | spark-parameters | spde-parameters | sqlserver-parameters | ss_noreq-parameters | teradata-parameters | vertica-parameters | yellowbrick-parameters},
importOptions={fileType="ANY" | "AUDIO" | "AUTO" | "BASESAS" | "CSV" | "DELIMITED" | "DOCUMENT" | "DTA" | "ESP" | "EXCEL" | "FMT" | "HDAT" | "IMAGE" | "JMP" | "LASR" | "PARQUET" | "SOUND" | "SPSS" | "VIDEO" | "XLS", fileType-specific-parameters},
required parameter name="table-name",
vars
={{
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
}, {...}},
where="where-expression"
}
;
indicates a required parameter

Summary: Input Tables

If a row includes a subparameter, you can specify the name, caslib, and so on in the subparameter. Otherwise, you can specify the name, caslib, and so on in the parameter.

Parameters for Reading Input Tables

Parameter

Subparameter

Description

 whereTable

—

specifies an input table that contains rows to use as a WHERE filter.

Parameter Descriptions

* code="string"

specifies the DATA step code to run.

nThreads=64-bit-integer | "MAX"

specifies the number of threads that are used to run the program. For distributed servers, this value specifies the number of threads on each worker to use for running the program.

single="NO" | "NOINPUT" | "YES"

specifies when to restrict execution to a single thread.

DefaultNO
NO

run the program in the number of threads specified by the nThreads parameter.

NOINPUT

run the program in one thread when there are no input data sets. When there are input data sets, the nThreads parameter specifies the number of threads to use. For distributed servers, if the program has no input data sets, the program runs in one thread on one worker. Otherwise, the nThreads parameter specifies the number of threads to use.

YES

override the nThreads parameter and run the program in one thread. For distributed servers, the program runs on one thread on one worker.

whereTable={groupbytable}

specifies an input table that contains rows to use as a WHERE filter.

Long formwhereTable={name="table-name"}
Shortcut formwhereTable="table-name"

The groupbytable value can be one or more of the following:

casLib="string"

specifies the caslib for the filter table. By default, the active caslib is used.

dataSourceOptions={adls_noreq-parameters | bigquery-parameters | cas_noreq-parameters | clouddex-parameters | db2-parameters | dnfs-parameters | esp-parameters | fedsvr-parameters | gcs_noreq-parameters | greenplum-parameters | hadoop-parameters | hana-parameters | hdfs-parameters | impala-parameters | informix-parameters | jdbc-parameters | mongodb-parameters | mysql-parameters | netezza-parameters | odbc-parameters | oracle-parameters | path-parameters | postgres-parameters | redshift-parameters | s3-parameters | sapiq-parameters | sforce-parameters | singlestore_standard-parameters | snowflake-parameters | spark-parameters | spde-parameters | sqlserver-parameters | ss_noreq-parameters | teradata-parameters | vertica-parameters | yellowbrick-parameters}

specifies data source options.

Aliasesoptions
dataSource

For more information about specifying the dataSourceOptions parameter, see the common dataSourceOptions parameter.

importOptions={fileType="ANY" | "AUDIO" | "AUTO" | "BASESAS" | "CSV" | "DOCUMENT" | "DTA" | "ESP" | "EXCEL" | "FMT" | "HDAT" | "IMAGE" | "JMP" | "LASR" | "PARQUET" | "SPSS" | "VIDEO" | "XLS", fileType-specific-parameters}

specifies the settings for reading a table from a data source.

Aliasimport

For more information about specifying the importOptions parameter, see the common importOptions parameter.

* name="table-name"

specifies the name of the filter table.

vars={{casinvardesc-1} <, {casinvardesc-2}, ...>}

specifies the variable names to use from the filter table.

For more information about specifying the vars parameter, see the common casinvardesc parameter.

where="where-expression"

specifies an expression for subsetting the data from the filter table.

runCode Action

Runs DATA step code.

Run a DATA Step Program
results, info = s:dataStep_runCode{
required parameter code="string",
nThreads=64-bit-integer | "MAX",
whereTable
={
casLib="string",
dataSourceOptions={adls_noreq-parameters | bigquery-parameters | cas_noreq-parameters | clouddex-parameters | db2-parameters | dnfs-parameters | esp-parameters | fedsvr-parameters | gcs_noreq-parameters | greenplum-parameters | hadoop-parameters | hana-parameters | hdfs-parameters | impala-parameters | informix-parameters | jdbc-parameters | mongodb-parameters | mysql-parameters | netezza-parameters | odbc-parameters | oracle-parameters | path-parameters | postgres-parameters | redshift-parameters | s3-parameters | sapiq-parameters | sforce-parameters | singlestore_standard-parameters | snowflake-parameters | spark-parameters | spde-parameters | sqlserver-parameters | ss_noreq-parameters | teradata-parameters | vertica-parameters | yellowbrick-parameters},
importOptions={fileType="ANY" | "AUDIO" | "AUTO" | "BASESAS" | "CSV" | "DELIMITED" | "DOCUMENT" | "DTA" | "ESP" | "EXCEL" | "FMT" | "HDAT" | "IMAGE" | "JMP" | "LASR" | "PARQUET" | "SOUND" | "SPSS" | "VIDEO" | "XLS", fileType-specific-parameters},
required parameter name="table-name",
vars
={{
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
}, {...}},
where="where-expression"
}
}
indicates a required parameter

Summary: Input Tables

If a row includes a subparameter, you can specify the name, caslib, and so on in the subparameter. Otherwise, you can specify the name, caslib, and so on in the parameter.

Parameters for Reading Input Tables

Parameter

Subparameter

Description

 whereTable

—

specifies an input table that contains rows to use as a WHERE filter.

Parameter Descriptions

* code="string"

specifies the DATA step code to run.

nThreads=64-bit-integer | "MAX"

specifies the number of threads that are used to run the program. For distributed servers, this value specifies the number of threads on each worker to use for running the program.

single="NO" | "NOINPUT" | "YES"

specifies when to restrict execution to a single thread.

DefaultNO
NO

run the program in the number of threads specified by the nThreads parameter.

NOINPUT

run the program in one thread when there are no input data sets. When there are input data sets, the nThreads parameter specifies the number of threads to use. For distributed servers, if the program has no input data sets, the program runs in one thread on one worker. Otherwise, the nThreads parameter specifies the number of threads to use.

YES

override the nThreads parameter and run the program in one thread. For distributed servers, the program runs on one thread on one worker.

whereTable={groupbytable}

specifies an input table that contains rows to use as a WHERE filter.

Long formwhereTable={name="table-name"}
Shortcut formwhereTable="table-name"

The groupbytable value can be one or more of the following:

casLib="string"

specifies the caslib for the filter table. By default, the active caslib is used.

dataSourceOptions={adls_noreq-parameters | bigquery-parameters | cas_noreq-parameters | clouddex-parameters | db2-parameters | dnfs-parameters | esp-parameters | fedsvr-parameters | gcs_noreq-parameters | greenplum-parameters | hadoop-parameters | hana-parameters | hdfs-parameters | impala-parameters | informix-parameters | jdbc-parameters | mongodb-parameters | mysql-parameters | netezza-parameters | odbc-parameters | oracle-parameters | path-parameters | postgres-parameters | redshift-parameters | s3-parameters | sapiq-parameters | sforce-parameters | singlestore_standard-parameters | snowflake-parameters | spark-parameters | spde-parameters | sqlserver-parameters | ss_noreq-parameters | teradata-parameters | vertica-parameters | yellowbrick-parameters}

specifies data source options.

Aliasesoptions
dataSource

For more information about specifying the dataSourceOptions parameter, see the common dataSourceOptions parameter.

importOptions={fileType="ANY" | "AUDIO" | "AUTO" | "BASESAS" | "CSV" | "DOCUMENT" | "DTA" | "ESP" | "EXCEL" | "FMT" | "HDAT" | "IMAGE" | "JMP" | "LASR" | "PARQUET" | "SPSS" | "VIDEO" | "XLS", fileType-specific-parameters}

specifies the settings for reading a table from a data source.

Aliasimport

For more information about specifying the importOptions parameter, see the common importOptions parameter.

* name="table-name"

specifies the name of the filter table.

vars={{casinvardesc-1} <, {casinvardesc-2}, ...>}

specifies the variable names to use from the filter table.

For more information about specifying the vars parameter, see the common casinvardesc parameter.

where="where-expression"

specifies an expression for subsetting the data from the filter table.

runCode Action

Runs DATA step code.

Run a DATA Step Program
results=s.dataStep.runCode(
required parameter code="string",
nThreads=64-bit-integer | "MAX",
whereTable
={
"casLib":"string",
"dataSourceOptions":{adls_noreq-parameters | bigquery-parameters | cas_noreq-parameters | clouddex-parameters | db2-parameters | dnfs-parameters | esp-parameters | fedsvr-parameters | gcs_noreq-parameters | greenplum-parameters | hadoop-parameters | hana-parameters | hdfs-parameters | impala-parameters | informix-parameters | jdbc-parameters | mongodb-parameters | mysql-parameters | netezza-parameters | odbc-parameters | oracle-parameters | path-parameters | postgres-parameters | redshift-parameters | s3-parameters | sapiq-parameters | sforce-parameters | singlestore_standard-parameters | snowflake-parameters | spark-parameters | spde-parameters | sqlserver-parameters | ss_noreq-parameters | teradata-parameters | vertica-parameters | yellowbrick-parameters},
"importOptions":{"fileType":"ANY" | "AUDIO" | "AUTO" | "BASESAS" | "CSV" | "DELIMITED" | "DOCUMENT" | "DTA" | "ESP" | "EXCEL" | "FMT" | "HDAT" | "IMAGE" | "JMP" | "LASR" | "PARQUET" | "SOUND" | "SPSS" | "VIDEO" | "XLS", fileType-specific-parameters},
required parameter "name":"table-name",
"vars"
:[{
"format":"string",
"formattedLength":integer,
"label":"string",
required parameter "name":"variable-name",
"nfd":integer,
"nfl":integer
}<, {...}>],
"where":"where-expression"
}
)
indicates a required parameter

Summary: Input Tables

If a row includes a subparameter, you can specify the name, caslib, and so on in the subparameter. Otherwise, you can specify the name, caslib, and so on in the parameter.

Parameters for Reading Input Tables

Parameter

Subparameter

Description

 whereTable

—

specifies an input table that contains rows to use as a WHERE filter.

Parameter Descriptions

* code="string"

specifies the DATA step code to run.

nThreads=64-bit-integer | "MAX"

specifies the number of threads that are used to run the program. For distributed servers, this value specifies the number of threads on each worker to use for running the program.

single="NO" | "NOINPUT" | "YES"

specifies when to restrict execution to a single thread.

DefaultNO
NO

run the program in the number of threads specified by the nThreads parameter.

NOINPUT

run the program in one thread when there are no input data sets. When there are input data sets, the nThreads parameter specifies the number of threads to use. For distributed servers, if the program has no input data sets, the program runs in one thread on one worker. Otherwise, the nThreads parameter specifies the number of threads to use.

YES

override the nThreads parameter and run the program in one thread. For distributed servers, the program runs on one thread on one worker.

whereTable={groupbytable}

specifies an input table that contains rows to use as a WHERE filter.

Long formwhereTable={"name":"table-name"}
Shortcut formwhereTable="table-name"

The groupbytable value can be one or more of the following:

"casLib":"string"

specifies the caslib for the filter table. By default, the active caslib is used.

"dataSourceOptions":{adls_noreq-parameters | bigquery-parameters | cas_noreq-parameters | clouddex-parameters | db2-parameters | dnfs-parameters | esp-parameters | fedsvr-parameters | gcs_noreq-parameters | greenplum-parameters | hadoop-parameters | hana-parameters | hdfs-parameters | impala-parameters | informix-parameters | jdbc-parameters | mongodb-parameters | mysql-parameters | netezza-parameters | odbc-parameters | oracle-parameters | path-parameters | postgres-parameters | redshift-parameters | s3-parameters | sapiq-parameters | sforce-parameters | singlestore_standard-parameters | snowflake-parameters | spark-parameters | spde-parameters | sqlserver-parameters | ss_noreq-parameters | teradata-parameters | vertica-parameters | yellowbrick-parameters}

specifies data source options.

Aliasesoptions
dataSource

For more information about specifying the dataSourceOptions parameter, see the common dataSourceOptions parameter.

"importOptions":{"fileType":"ANY" | "AUDIO" | "AUTO" | "BASESAS" | "CSV" | "DOCUMENT" | "DTA" | "ESP" | "EXCEL" | "FMT" | "HDAT" | "IMAGE" | "JMP" | "LASR" | "PARQUET" | "SPSS" | "VIDEO" | "XLS", fileType-specific-parameters}

specifies the settings for reading a table from a data source.

Aliasimport_

For more information about specifying the importOptions parameter, see the common importOptions parameter.

* "name":"table-name"

specifies the name of the filter table.

"vars":[{casinvardesc-1} <, {casinvardesc-2}, ...>]

specifies the variable names to use from the filter table.

For more information about specifying the vars parameter, see the common casinvardesc parameter.

"where":"where-expression"

specifies an expression for subsetting the data from the filter table.

runCode Action

Runs DATA step code.

Run a DATA Step Program
results <– cas.dataStep.runCode(s,
required parameter code="string",
nThreads=64-bit-integer | "MAX",
whereTable
=list(
casLib="string",
dataSourceOptions=list(adls_noreq-parameters | bigquery-parameters | cas_noreq-parameters | clouddex-parameters | db2-parameters | dnfs-parameters | esp-parameters | fedsvr-parameters | gcs_noreq-parameters | greenplum-parameters | hadoop-parameters | hana-parameters | hdfs-parameters | impala-parameters | informix-parameters | jdbc-parameters | mongodb-parameters | mysql-parameters | netezza-parameters | odbc-parameters | oracle-parameters | path-parameters | postgres-parameters | redshift-parameters | s3-parameters | sapiq-parameters | sforce-parameters | singlestore_standard-parameters | snowflake-parameters | spark-parameters | spde-parameters | sqlserver-parameters | ss_noreq-parameters | teradata-parameters | vertica-parameters | yellowbrick-parameters),
importOptions=list(fileType="ANY" | "AUDIO" | "AUTO" | "BASESAS" | "CSV" | "DELIMITED" | "DOCUMENT" | "DTA" | "ESP" | "EXCEL" | "FMT" | "HDAT" | "IMAGE" | "JMP" | "LASR" | "PARQUET" | "SOUND" | "SPSS" | "VIDEO" | "XLS", fileType-specific-parameters),
required parameter name="table-name",
vars
=list( list(
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
) <, list(...)>),
where="where-expression"
)
)
indicates a required parameter

Summary: Input Tables

If a row includes a subparameter, you can specify the name, caslib, and so on in the subparameter. Otherwise, you can specify the name, caslib, and so on in the parameter.

Parameters for Reading Input Tables

Parameter

Subparameter

Description

 whereTable

—

specifies an input table that contains rows to use as a WHERE filter.

Parameter Descriptions

* code="string"

specifies the DATA step code to run.

nThreads=64-bit-integer | "MAX"

specifies the number of threads that are used to run the program. For distributed servers, this value specifies the number of threads on each worker to use for running the program.

single="NO" | "NOINPUT" | "YES"

specifies when to restrict execution to a single thread.

DefaultNO
NO

run the program in the number of threads specified by the nThreads parameter.

NOINPUT

run the program in one thread when there are no input data sets. When there are input data sets, the nThreads parameter specifies the number of threads to use. For distributed servers, if the program has no input data sets, the program runs in one thread on one worker. Otherwise, the nThreads parameter specifies the number of threads to use.

YES

override the nThreads parameter and run the program in one thread. For distributed servers, the program runs on one thread on one worker.

whereTable=list(groupbytable)

specifies an input table that contains rows to use as a WHERE filter.

Long formwhereTable=list(name="table-name")
Shortcut formwhereTable="table-name"

The groupbytable value can be one or more of the following:

casLib="string"

specifies the caslib for the filter table. By default, the active caslib is used.

dataSourceOptions=list(adls_noreq-parameters | bigquery-parameters | cas_noreq-parameters | clouddex-parameters | db2-parameters | dnfs-parameters | esp-parameters | fedsvr-parameters | gcs_noreq-parameters | greenplum-parameters | hadoop-parameters | hana-parameters | hdfs-parameters | impala-parameters | informix-parameters | jdbc-parameters | mongodb-parameters | mysql-parameters | netezza-parameters | odbc-parameters | oracle-parameters | path-parameters | postgres-parameters | redshift-parameters | s3-parameters | sapiq-parameters | sforce-parameters | singlestore_standard-parameters | snowflake-parameters | spark-parameters | spde-parameters | sqlserver-parameters | ss_noreq-parameters | teradata-parameters | vertica-parameters | yellowbrick-parameters)

specifies data source options.

Aliasesoptions
dataSource

For more information about specifying the dataSourceOptions parameter, see the common dataSourceOptions parameter.

importOptions=list(fileType="ANY" | "AUDIO" | "AUTO" | "BASESAS" | "CSV" | "DOCUMENT" | "DTA" | "ESP" | "EXCEL" | "FMT" | "HDAT" | "IMAGE" | "JMP" | "LASR" | "PARQUET" | "SPSS" | "VIDEO" | "XLS", fileType-specific-parameters)

specifies the settings for reading a table from a data source.

Aliasimport

For more information about specifying the importOptions parameter, see the common importOptions parameter.

* name="table-name"

specifies the name of the filter table.

vars=list( list(casinvardesc-1) <, list(casinvardesc-2), ...>)

specifies the variable names to use from the filter table.

For more information about specifying the vars parameter, see the common casinvardesc parameter.

where="where-expression"

specifies an expression for subsetting the data from the filter table.

Last updated: March 19, 2025