space
Previous Page | Next Page

ACCESS Procedure Reference

RESET Statement



Resets DBMS columns to their default settings.
Optional statement
Applies to: access descriptor or view descriptor
Interacts with: ASSIGN, CONTENT, DROP, FORMAT, INFORMAT, KEY, MVF, RENAME, SELECT

Syntax
Details
Access Descriptors
View Descriptors

Syntax

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


Details

The RESET statement resets either the attributes of all the columns or the attributes of the specified 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.

If you use an editing statement, such as RESET, it must follow the CREATE statement and the database-description statements when you create a descriptor. See CREATE Statement for more information about the order of statements.


Access Descriptors

When you create an access descriptor, the default setting for a SAS variable name is a blank. However, if you have previously entered or modified any of the SAS variable names, the RESET statement resets the modified names to the default names that are generated by the ACCESS procedure. How the default SAS variable 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 DBMS column name.

The current SAS variable format and informat are reset to the default SAS format and informat, which was determined from the column's data type. The current DB content, occurrence range, and BY key are also reset to the default values. 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 SAS variable and then select it again within the same procedure execution, the SAS variable name, format, informat, database content, occurrence range, and BY key 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 has no effect on the view descriptor.

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 DBMS column 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 column 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.

space
Previous Page | Next Page | Top of Page