RESET Statement

Resets DBMS columns to their default settings.

Type: Optional statement
Applies to: access descriptor or view descriptor

Syntax

RESET <ALL | <"> column-identifier-1<"> <...<"> column-identifier-n<"> > > ;

Details

Restore Defaults

The RESET statement resets either the attributes of all the DBMS columns or the attributes of the specified DBMS columns to their default values. The RESET statement can be used when creating an access descriptor or a view descriptor. However, this statement has different effects on access and view descriptors, as described below.

Access Descriptors

When you create an access descriptor, the default setting for a SAS column name is a blank. However, if you have previously entered or modified any of the SAS column names, the RESET statement resets the modified names to the default names that are generated by the ACCESS procedure. How the default SAS column names are set depends on whether you included the ASSIGN statement. If you omitted ASSIGN or set it to NO, the default names are blank. If you set ASSIGN=YES, the default names are the first eight characters of each CA-Datacom/DB field name.
The current SAS column format and informat are reset to the default SAS format and informat, which was determined from the DBMS column's data type. The current DB content is also reset to the default value. Any columns that were previously dropped, that are specified in the RESET command, become available; they can be selected in view descriptors that are based on this access descriptor.

View Descriptors

When you create a view descriptor, the RESET statement clears any columns that were included in the SELECT statement (that is, it "de-selects" the columns).
When creating the view descriptor, if you reset a column and then select it again within the same procedure execution, the SAS column name, format, informat, and database content are reset to their default values (the SAS name is generated from the DBMS column name, and the format and informat values are generated from the data type). This applies only if you have omitted the ASSIGN statement or set the value to NO when you created the access descriptor on which the view descriptor is based. If you specified ASSIGN=YES when you created the access descriptor, the RESET statement cannot be used to restore the default column names and formats in the view descriptor, but it affects the SELECT statement for the view.
The RESET statement can take one of the following arguments:
ALL
for access descriptors, resets all the DBMS columns that have been defined to their default names and format settings and reselects any dropped columns.
For view descriptors, ALL resets all the columns that have been selected, so that no columns are selected for the view; you can then use the SELECT statement to select new columns.
column-identifier
can be either the CA-Datacom/DB field name or the positional equivalent from the LIST statement, which is the number that represents the column's place in the access descriptor. For example, to reset the third column, submit the following statement:
reset 3;
If the CA-Datacom/DB field name contains special characters or national characters, enclose the name in quotation marks. You can reset as many columns as you want in one RESET statement, or use the ALL option to reset all the columns.