CA IDMS/DB allows alternative identification of records and elements in the dictionary. Synonyms are added to the dictionary by using DDDL statements. The DML precompiler automatically copies these language dependent synonyms in place of the primary names whenever an @COPY IDMS statement appears in the application program.
Note: ASSEMBLER H USERS—The DML precompiler supports32-character field names and conversion of hyphens to underscores, in accordance with the new features of Assembler H. CA IDMS/DB record names remain restricted to 16 characters and CA IDMS/DB element names to 32 characters. Synonyms are therefore not required for user supplied names and for fields containing hyphens in Assembler H programs using the DML precompiler.
IDD record names can be up to 16 characters long, and IDD element names can be up to 32 characters long. Because Assembler versions F and G restrict names to 8 characters, alternative and unique 8 character names for use in Assembler F and Assembler G programs should be defined in the dictionary. Use of synonyms is recommended if @COPY IDMS and @INVOKE statements are to be included in Assembler programs.
Synonyms cannot be defined for logical record names. Assembler programs that access logical records must use a separate subschema in which logical records are defined according to Assembler restrictions.
How the Precompiler Copies Synonyms
When the DML precompiler copies record descriptions from the dictionary into program variable storage, it copies synonyms according to the following rules:
For example, assume that the following record is defined in the dictionary with three synonyms:
RECORD JOB RECORD NAME SYNONYM JOBSYN1 LANGUAGE ASSEMBLER RECORD NAME SYNONYM JOB-SYN2 RECORD NAME SYNONYM JOBSYN3 LANGUAGE ASSEMBLER
Since the dictionary defines JOBSYN1 as the first synonym for Assembler, the DML precompiler copies it into the program. The DML precompiler would copy the primary record name (JOB) if it were defined for Assembler.
These rules apply regardless of the record name or synonym that appears in the schema and subschema invoked by the program.
Synonyms are Recognized as Primary Records
The DML precompiler treats a synonym as if it were the primary record. The expansion of a DML statement will include the record name of the primary record name, even if the synonym is copied into program variable storage.
For example, an @COPY IDMS,SUBSCHEMA-BINDS statement used in an Assembler program generates the following @BIND REC statement for the employee record:
@BIND REC='EMPLOYEE',IOAREA=EMPLOYE
This statement lists both the primary record name (EMPLOYEE) and the Assembler synonym (EMPLOYE).
Note: For more information about synonym facilities, see the IDD DDDL Reference Guide.
|
Copyright © 2014 CA.
All rights reserved.
|
|