This section describes how
to update existing descriptor files. You update access descriptor
and view descriptor files with the UPDATE statement. You can edit
your information and field information in the descriptor files.
When you update an access
descriptor, the view descriptors that are based on this access descriptor
are not updated automatically. You must re-create or update any view
descriptors that you want to reflect the changes made to the access
descriptor. That is, for some updates (such as dropping a field),
the view descriptors are still valid, but they do not reflect the
changes made in the access descriptor. In other situations (for example,
if you edited the access descriptor to use a different user ID or
to add a password), the view descriptors would no longer be valid.
A valid descriptor file can also be made useless by an update. For
example, if an update to an access descriptor drops two of the four
fields defined in a view descriptor, you might want to update or delete
the view descriptor.
The following example
updates access descriptor MYLIB.CUSTS to drop additional fields. The
VLIB.USACUSTS and VLIB.CUSTADD view descriptors remain valid. However,
you might want to update them to select new fields to replace those
dropped as a result of the update.
proc access dbms=Datacom;
drop 3 7;
The statements are described
proc access dbms=Datacom;
invokes the ACCESS
procedure for the SAS/ACCESS interface to CA-Datacom/DB.
identifies the access
descriptor, MYLIB.CUSTS, that you want to update. The MYLIB libref
must be associated with a SAS library before you can specify this
marks the CA-Datacom/DB fields associated with position
3 (STATEZIP) and position 7 (TELEPHONE) as non-display. STATEZIP is
a compound (*GROUP*) field consisting of STATE and ZIPCODE. Dropping
a group effectively drops the members of the group, so the STATE and
ZIPCODE fields (which are selected in VLIB.USACUST and VLIB.CUSTADD)
are marked as non-display as well.
lists updated SAS information
for the fields in the access descriptor. Fields that were dropped
have *NON-DISPLAY* next to the SAS column description. The list is
written to the SAS log.
writes the updated
access descriptor when the RUN statement is processed.
Altering a CA-Datacom
table that has descriptor files defined can also cause these files
to be out of date or invalid. If you add a field to a table, an access
descriptor is still valid. However, if you delete a field or change
its characteristics and that field is used in a view descriptor, the
view fails when executed. For more information, see How Changing the CA-DATADICTIONARY Database Affects Descriptor Files.