ASSIGN Statement

Specifies whether view descriptors that are created from an access descriptor inherit or select their own SAS column names and formats.

Type: Optional statement
Applies to: access descriptor

Syntax

ASSIGN | AN <=> YES | NO | Y | N;

Details

The ASSIGN statement specifies whether view descriptors inherit the SAS column names and formats that were assigned in the parent access descriptor when the access descriptor was created, or whether the column names and formats can be selected in the view descriptor.
If you specify ASSIGN=YES, then default SAS column names and formats are generated for all CA-Datacom/DB field names. These names and formats are used in all derived view descriptors. You can edit the default column names and formats in the access descriptor with the RENAME, FORMAT, INFORMAT, and CONTENT statements, but you cannot edit them in the view descriptor.
If ASSIGN=NO, which is the default value, default names are not generated and any SAS column names assigned in the access descriptor can be edited in the view descriptor. If you do not specify any column names in the access descriptor, then fields selected in the view descriptor use default SAS column names and formats, unless you edit them with the RENAME, FORMAT, INFORMAT, and CONTENT statements.
Default SAS column names follow these rules:
  • If the CA-Datacom/DB field name is longer than eight characters, SAS uses only the first eight characters. If truncating would result in duplicate names, numbers are appended to the end of the name. For example, the CA-Datacom/DB field names CUSTOMERNAME and CUSTOMERNUMBER would become the SAS column names CUSTOMER and CUSTOME1.
  • If the CA-Datacom/DB field name contains invalid SAS name characters, such as a hyphen (-), SAS replaces them with underscores (_). For example, the CA-Datacom/DB field name FUNC-INT becomes the SAS name FUNC_INT.
  • For a key, the five-character Datacom-NAME is used, if there is one. If that is missing, the first eight nonblank characters of the entity-occurrence name are used.
  • For repeating fields, SAS generates unique SAS names by suffixing or overlaying the occurrence number on the last position(s) of the SAS name. For example, the third occurrence of PHONE is PHONE3, the ninth occurrence of LASTNAME is LASTNAM9, and the eleventh occurrence of ADDRESS is ADDRES11. In some cases, this feature causes different fields to have SAS names that differ only in the suffixed number. For example, if you select BRANCH-NUMBER, BRANCH-PHONE, and BRANCH-ADDRESS and each repeats four times, the SAS names generated by default would be: BRANCH_1, BRANCH_2, BRANCH_3, BRANCH_4, BRANCH_5, BRANCH_6, BRANCH_7, BRANCH_8, BRANCH_9, BRANCH10, BRANCH11, and BRANCH12.
    The generated names are not listed in the LIST statement output.
  • The SAS name for a compound field contains *GROUP*. To see the fully expanded repeating structure, use the LISTOCC statement. To see the field composition, use the LISTINFO statement.
  • You can set different default names with a user exit, which is described in User Exits from CA-Datacom/DB.