Table Action Set: Syntax

Provides actions for accessing and managing data

alterTable Action

Rename tables, change labels and formats, drop columns.

See: Altering Tables
Modify Columns in a Table

CASL Syntax

table.alterTable <result=results> <status=rc> /
caslib="string",
columnOrder={"variable-name-1" <, "variable-name-2", ...>},
columns={{
binaryType="IMAGE" | "SOUND" | "UNKNOWN" | "VIDEO",
drop=TRUE | FALSE,
format="string",
label="string",
required parameter name="variable-name",
newType="VARBINARY" | "VARCHAR",
rename="string"
}, {...}},
drop={"variable-name-1" <, "variable-name-2", ...>},
keep={"variable-name-1" <, "variable-name-2", ...>},
label="string",
lifetime=64-bit-integer,
required parameter name="table-name",
rename="string"
;
indicates a required parameter

Parameter Descriptions

caslib="string"

specifies the caslib for the input table that you want to use with the action. By default, the active caslib is used. Specify a value only if you need to access a table from a different caslib.

columnOrder={"variable-name-1" <, "variable-name-2", ...>}

specifies the order of columns in table metadata.

Aliasorder

columns={{AlterTableColumn-1} <, {AlterTableColumn-2}, ...>}

specifies how to alter columns. After you specify the column name, you can drop a column or assign a new format, label, or name. Columns are renamed before the drop, keep, or columnOrder parameters are evaluated.

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

binaryType="IMAGE" | "NONE" | "SOUND" | "VIDEO"
drop=TRUE | FALSE
DefaultFALSE
format="string"
label="string"
* name="variable-name"
newType="VARBINARY" | "VARCHAR"
rename="string"

drop={"variable-name-1" <, "variable-name-2", ...>}

Columns to drop

keep={"variable-name-1" <, "variable-name-2", ...>}

Columns to keep

label="string"

specifies a new label for the table.

lifetime=64-bit-integer

specifies the number of seconds to keep the table in memory after it is last accessed. The table is dropped if it is not accessed for the specified number of seconds.

Minimum value0

* name="table-name"

specifies the table name.

Aliastable

rename="string"

specifies a new name for the table.

alterTable Action

Rename tables, change labels and formats, drop columns.

See: Altering Tables
Modify Columns in a Table

Lua Syntax

results, info = s:table_alterTable{
caslib="string",
columnOrder={"variable-name-1" <, "variable-name-2", ...>},
columns={{
binaryType="IMAGE" | "SOUND" | "UNKNOWN" | "VIDEO",
drop=true | false,
format="string",
label="string",
required parameter name="variable-name",
newType="VARBINARY" | "VARCHAR",
rename="string"
}, {...}},
drop={"variable-name-1" <, "variable-name-2", ...>},
keep={"variable-name-1" <, "variable-name-2", ...>},
label="string",
lifetime=64-bit-integer,
required parameter name="table-name",
rename="string"
}
indicates a required parameter

Parameter Descriptions

caslib="string"

specifies the caslib for the input table that you want to use with the action. By default, the active caslib is used. Specify a value only if you need to access a table from a different caslib.

columnOrder={"variable-name-1" <, "variable-name-2", ...>}

specifies the order of columns in table metadata.

Aliasorder

columns={{AlterTableColumn-1} <, {AlterTableColumn-2}, ...>}

specifies how to alter columns. After you specify the column name, you can drop a column or assign a new format, label, or name. Columns are renamed before the drop, keep, or columnOrder parameters are evaluated.

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

binaryType="IMAGE" | "NONE" | "SOUND" | "VIDEO"
drop=true | false
Defaultfalse
format="string"
label="string"
* name="variable-name"
newType="VARBINARY" | "VARCHAR"
rename="string"

drop={"variable-name-1" <, "variable-name-2", ...>}

Columns to drop

keep={"variable-name-1" <, "variable-name-2", ...>}

Columns to keep

label="string"

specifies a new label for the table.

lifetime=64-bit-integer

specifies the number of seconds to keep the table in memory after it is last accessed. The table is dropped if it is not accessed for the specified number of seconds.

Minimum value0

* name="table-name"

specifies the table name.

Aliastable

rename="string"

specifies a new name for the table.

alterTable Action

Rename tables, change labels and formats, drop columns.

See: Altering Tables
Modify Columns in a Table

Python Syntax

results= s.table.alterTable(
caslib="string",
columnOrder=["variable-name-1" <, "variable-name-2", ...>],
columns=[{
"binaryType":"IMAGE" | "SOUND" | "UNKNOWN" | "VIDEO",
"drop":True | False,
"format":"string",
"label":"string",
required parameter "name":"variable-name",
"newType":"VARBINARY" | "VARCHAR",
"rename":"string"
}<, {...}>],
drop=["variable-name-1" <, "variable-name-2", ...>],
keep=["variable-name-1" <, "variable-name-2", ...>],
label="string",
lifetime=64-bit-integer,
required parameter name="table-name",
rename="string"
)
indicates a required parameter

Parameter Descriptions

caslib="string"

specifies the caslib for the input table that you want to use with the action. By default, the active caslib is used. Specify a value only if you need to access a table from a different caslib.

columnOrder=["variable-name-1" <, "variable-name-2", ...>]

specifies the order of columns in table metadata.

Aliasorder

columns=[{AlterTableColumn-1} <, {AlterTableColumn-2}, ...>]

specifies how to alter columns. After you specify the column name, you can drop a column or assign a new format, label, or name. Columns are renamed before the drop, keep, or columnOrder parameters are evaluated.

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

"binaryType":"IMAGE" | "NONE" | "SOUND" | "VIDEO"
"drop":True | False
DefaultFalse
"format":"string"
"label":"string"
* "name":"variable-name"
"newType":"VARBINARY" | "VARCHAR"
"rename":"string"

drop=["variable-name-1" <, "variable-name-2", ...>]

Columns to drop

keep=["variable-name-1" <, "variable-name-2", ...>]

Columns to keep

label="string"

specifies a new label for the table.

lifetime=64-bit-integer

specifies the number of seconds to keep the table in memory after it is last accessed. The table is dropped if it is not accessed for the specified number of seconds.

Minimum value0

* name="table-name"

specifies the table name.

Aliastable

rename="string"

specifies a new name for the table.

alterTable Action

Rename tables, change labels and formats, drop columns.

See: Altering Tables
Modify Columns in a Table

R Syntax

results <– cas.table.alterTable(s,
caslib="string",
columnOrder=list("variable-name-1" <, "variable-name-2", ...>),
columns=list( list(
binaryType="IMAGE" | "SOUND" | "UNKNOWN" | "VIDEO",
drop=TRUE | FALSE,
format="string",
label="string",
required parameter name="variable-name",
newType="VARBINARY" | "VARCHAR",
rename="string"
) <, list(...)>),
drop=list("variable-name-1" <, "variable-name-2", ...>),
keep=list("variable-name-1" <, "variable-name-2", ...>),
label="string",
lifetime=64-bit-integer,
required parameter name="table-name",
rename="string"
)
indicates a required parameter

Parameter Descriptions

caslib="string"

specifies the caslib for the input table that you want to use with the action. By default, the active caslib is used. Specify a value only if you need to access a table from a different caslib.

columnOrder=list("variable-name-1" <, "variable-name-2", ...>)

specifies the order of columns in table metadata.

Aliasorder

columns=list( list(AlterTableColumn-1) <, list(AlterTableColumn-2), ...>)

specifies how to alter columns. After you specify the column name, you can drop a column or assign a new format, label, or name. Columns are renamed before the drop, keep, or columnOrder parameters are evaluated.

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

binaryType="IMAGE" | "NONE" | "SOUND" | "VIDEO"
drop=TRUE | FALSE
DefaultFALSE
format="string"
label="string"
* name="variable-name"
newType="VARBINARY" | "VARCHAR"
rename="string"

drop=list("variable-name-1" <, "variable-name-2", ...>)

Columns to drop

keep=list("variable-name-1" <, "variable-name-2", ...>)

Columns to keep

label="string"

specifies a new label for the table.

lifetime=64-bit-integer

specifies the number of seconds to keep the table in memory after it is last accessed. The table is dropped if it is not accessed for the specified number of seconds.

Minimum value0

* name="table-name"

specifies the table name.

Aliastable

rename="string"

specifies a new name for the table.

Last updated: October 18, 2022