%ì Librarian I01-42&(BvšxŠ-BvšĆžÆMMM 5GŒƒșALIGNEDˆ ARRAYflBASEiBITzvbit_field_size‹lBLANK_WHEN_ZEROˆ‚boundary_optionszæBYTE‹Ú COLUMN_MAJORŒàCOMPUTED_BY_DATATRIEVECONDITION_NAME)Ź COPY_FIELDM8DATATYPENdatatype_optionshXDATE˜ș DEFAULT_VALUEH€ DESCRIPTIONN D_FLOATINGđD_FLOATING_COMPLEX›Ò EDIT_CODEš EDIT_STRING â EDIT_WORDđELEMENTARY_FIELD‚vfield_attribute_statementxed_pointlűFloating_pointô F_FLOATINGTAWORDEDH#STRUCTURE_FIELDjVTEXTkJtext_field_sizejò text_string|\UNSIGNED_NUMERICj8 UNSPECIFIEDižunspecified_field_sizeŠ~ upper_boundĂ&VALID_FOR_DATATRIEVE_IF/BVARIANTS_field5,VARIANTS_OF_fieldkÂVARYING_STRINGhÌ VIRTUAL_FIELDkÈ vs_field_sizezŠWORD|ì ZONED_NUMERIC_ÿÿfield_attribute_statementÿÿ F_FLOATINGÿÿOCTAWORDÿÿSIZEÿÿ ZONED_NUMERIC|ŹPACKED_DECIMAL< path_nameșêPICTURElDPOINTER{QUADWORDœB QUERY_HEADERÀ\ QUERY_NAMEhșradixRecord_definition~TRIGHT_OVERPUNCHED_NUMERIC~pRIGHT_SEPARATE_NUMERIC‹J ROW_MAJORdSCALEgr scale_factorfæSIZE6€ F_FLOATING_COMPLEX€Î G_FLOATING‚G_FLOATING_COMPLEXHELP‚V H_FLOATINGą, INITIAL_VALUEš JUSTIFIED_RIGHT}‚LEFT_OVERPUNCHED_NUMERIC}ąLEFT_SEPARATE_NUMERIC{ZLONGWORDŠæ lower_boundŹ*NAMEgF no_digitsgÈ no_fractsČòOCCURS_DEPENDING{âOCTAWORDŠBXFIELD_DESCRIPTION_CLAUSEArfield_description_statementAH field_namenL Fixed_pointlűFloating_pointô F_FLOATING ­™*Bvš1 HELPF VAX Common Data Dictionary Data Definition Language (CDDL) containsF statements and clauses you use in a source file. When you haveF created and debugged the CDDL source file, you store it in the CDD) using the CDDL compiler. CDDL contains:8 o DEFINE and END statements, which define CDD recordsF o Field description statements, which describe the general structure of recordsF o Field attribute clauses, which describe characteristics of fields within CDD recordsww­™*Bvš 1 path_nameF The location of the record definition in the CDD directory hierarchy.F The full dictionary path name of a directory, subdictionary, orF object consists of the concatenation of the given names of all itsF ancestors, beginning with CDD$TOP and ending with its given name.6 Separate each given name from the next with a period.? An example of a path_name is CDD$TOP.CORPORATE.ADDRESS_RECORD.ww­™*Bvš1 Record_definitionF The DEFINE RECORD statement begins each record definition in the source file.2 Syntax RulesF o You must terminate the DEFINE statement and the END statement with periods.F o The path name can be a full or a relative path specification.F The last given name in the path name is the name you assign toF the new record definition. You can specify an absolute version number with the path name.F o T he given name of the new record definition is a string of up toF 31 characters from the set A-Z, 0-9, _, and $. The firstF character must be a letter from A-Z, and the last character mustF not be _ or $. You can use 8-bit alphabetic characters in path names.F o Use the optional DESCRIPTION clause to include text in the CDD toF document the record definition. You must use the keywordF DESCRIPTION and the text delimiters /* and */ to insert o ne orF more lines of text describing the record into the DEFINE statement.F o The field description statement defines the whole record. YouF can use an elementary, STRUCTURE, COPY, VARIANTS, or VARIANTS_OFF field description statement, but you can use only one field. description statement to define a record.F STRUCTURE, COPY, and VARIANT field description statements areF themselves subdivided and defined by subordinate field description statements.F o If you specify a path name in the END clause, it must match the2 path name in the corresponding DEFINE clause.F o If you specify a given name in the END clause, it must be theF given name of the new data definition and match the final givenF name in the path specification of the corresponding DEFINE clause. 2 Usage NotesF o If the path name contains dictionary directories that do not/ exist, the CDD automatically creates them.F o It is not recommended that you include passwords in the DEFINEF statement path name, because passwords included in the source canF be displayed with the DMU LIST/ITEM=SOURCE command. Instead, useF the /PATH qualifier with the compile command if passwords are required in the path name.F o The only way to assign a password to a record definition is toF use the DMU SET PROTECTION or DMU SET PROTECTION/EDIT commandF a fter you compile the source file. You cannot assign a passwordD to a record definition by including it in the DEFINE statement. 2 ExampleF The following record description defines the dictionary objectF SALARY_RECORD in the sample CDD hierarchy. The field description. statement for the record is SALARY STRUCTURE.7 DEFINE RECORD CDD$TOP.PERSONNEL.SERVICE.SALARY_RECORD. SALARY STRUCTURE.: EMPLOYEE_ID DATATYPE IS UNSIGNED NUMERIC/  SIZE IS 9 DIGITS. PAY STRUCTURE.: JOB_CLASS DATATYPE IS UNSIGNED NUMERIC/ SIZE IS 3 DIGITS.: INCR_LEVEL DATATYPE IS UNSIGNED NUMERIC. SIZE IS 1 DIGIT.: WEEKLY_SALARY DATATYPE IS UNSIGNED NUMERIC; SIZE IS 6 DIGITS 2 FRACTIONS. END PAY STRUCTURE. END SALARY STRUCTURE. END SALARY_RECORD RECORD.ww­™*Bv!š1 ELEMENTARY_FIELDF An elementary field description statement defines the characteristics5 of a field that is not subdivided into other fields.2 Syntax RulesF o The field name you assign can be up to 31 characters from the setF A-Z, 0-9, _, and $. The first character must be a letter fromF A-Z, and the last character can not be _ or $. You can use 8-bit* alphabetic characters in field names.F o If you use an asterisk (*) instead of a field name, you create an" unnamed field.F o You must include the DATATYPE clause among the selected field attributes.F o You must terminate the elementary field description statement with a period. 2 Usage NotesF o Unnamed fields are similar to FILLER fields in COBOL. You canF use them to format print records or to reserve space in a record for future additions.F o All fields, except BIT fields, begin on the first byte followingF the preceding field#. BIT fields begin on the bit immediatelyF following the preceding field. You can modify this starting& position with the ALIGNED clause. 2 ExampleD NAME and ACCOUNT_NUMBER in the example below are elementary fields. CUSTOMER STRUCTURE.+ NAME DATATYPE IS TEXT 0 SIZE IS 30 CHARACTERS.7 ACCOUNT_NUMBER DATATYPE IS UNSIGNED NUMERIC / SIZE IS 7 CHARACTERS. END CUSTOMER STRUCTURE.ww$­"À*Bvš1 STRUCTURE_FIELDF A STRUCTURE field description statement defines a field that is- divided into one or more subordinate fields.2 Syntax RulesF o The field name you assign can be up to 31 characters from the setF A-Z, 0-9, _, and $. The first character must be a letter fromF A-Z, and the last character can not be _ or $. You can use 8-bit* alphabetic characters in field names.F o If you use an asterisk (*) instead of a field-name, you c%reate an unnamed field.F o If you do not specify a data type for the STRUCTURE, the CDDL* assigns it the UNSPECIFIED data type.F o Subordinate field description statements describe contiguous6 portions of the field described by the STRUCTURE.F o There must be at least one subordinate field descriptionF statement. A subordinate field can be an elementary, a, STRUCTURE, a COPY, or a VARIANTS field.F o CDDL accepts the keyword GR&OUP as a synonym for STRUCTURE, but6 the compiler issues a warning when you use GROUP.F o You must terminate the STRUCTURE and the END statements with periods. 2 Usage NotesF o Unnamed fields are similar to FILLER fields in VAX COBOL. YouF can use them to format print records or to reserve space in a! record for future additions.F o In a STRUCTURE field, you can use any field attribute clausesF allowed in an elementary field. Howeve 'r, if you use the DATATYPEF field description statement, you cannot create subordinate fields3 that exceed the length of the structure field.A o A STRUCTURE field cannot contain the VIRTUAL FIELD datatype.F o Although the CDDL compiler accepts data type specifications forF STRUCTURE fields, the feature can not be supported by theF language or language processor you use with the CDD. Make sureF the definitions you store in the dictionary are valid f(or the" processor that will use them.F o All fields, except BIT fields, begin on the first byte followingF the preceding field. BIT fields begin on the bit immediatelyF following the preceding field. You can modify this starting& position with the ALIGNED clause. 2 ExampleF You can nest STRUCTURE field description statements. The STRUCTUREF field ADDRESS, for example, has a subordinate STRUCTURE field, ZIP_CODE. ADDRESS STRUCTURE.0 S )TREET DATATYPE IS TEXT 5 SIZE IS 30 CHARACTERS.0 CITY DATATYPE IS TEXT 5 SIZE IS 30 CHARACTERS.0 STATE DATATYPE IS TEXT 4 SIZE IS 2 CHARACTERS. ZIP_CODE STRUCTURE.< NEW DATATYPE IS UNSIGNED NUMERIC / SIZE IS 4 DIGITS/ BLANK WHEN ZERO.< * OLD DATATYPE IS UNSIGNED NUMERIC 0 SIZE IS 5 DIGITS. END ZIP_CODE STRUCTURE. END ADDRESS STRUCTURE.ww­"À*Bvš 1 COPY_FIELDF The COPY field description statement copies an existing recordF description (a template record) into the description of a new field (a COPY field).2 Syntax RulesF o You must assign a field name to a COPY field. This field nameF can be up to 31 characters from the set A-Z,+ 0-9, _, and $. TheF first character must be a letter from A-Z, and the last characterF can not be _ or $. You can use alphabetic 8-bit characters in field names.F o The path name can be a full or a relative path name, and it mustF be the path name of an existing CDD record description. You can; specify an absolute version number with the path name.F o The COPY field description statement must terminate with a period. 2 Usage NotesF ,o The copy operation takes place when the new record is compiled,F not when it is copied into a program. When you modify a templateF record, you should recompile any record definitions that containB COPY field descriptions copying the modified template record.F o The COPY field description statement copies a complete record, a* template record, into a single field.F o The COPY field description statement copies the description ofF the template record as the -description of the COPY field. If theF first subordinate field of the template record is a BIT field,F the first subordinate field of the COPY field begins on the firstF bit immediately following the preceding field. Otherwise, theF COPY field begins on the first byte immediately following theF preceding field. You can modify this starting position with the ALIGNED clauseF o If you specify an absolute version number in the path nameF param .eter, CDDL copies the version of the template record withF that version number each time you compile the record descriptionF containing the COPY field. If you do not specify a versionF number, CDDL copies the highest version of the template record2 each time you compile the record description.F o In the COPY field, the field name you assign replaces the fieldF name copied from the field description statement of the template record.F o When the /CDDL compiler compiles a record definition containing aF COPY field description, it automatically makes an entryF documenting the copy operation in the history list of theB template record, whether or not you use the /AUDIT qualifier. 2 ExampleF CDD$TOP.CORPORATE.ADDRESS_RECORD defines the standard format forF addresses. You can copy this field description into any new record requiring an address field." ADDRESS COPY FROM: 0 CDD$TOP.CORPORATE.ADDRESS_RECORD.ww­"À*Bvš1 VARIANTS_fieldF Defines two or more logical views of the same portion of a recordF definition. The VARIANTS statement functions like the REDEFINES( clause in VAX COBOL and VAX DATATRIEVE. 2 Parameter variantF A definition of the field characteristics for each subordinate field of each VARIANT. 2 Syntax RuleE The VARIANTS, VARIANT, and END statements all must end with perio1ds. 2 Usage NotesF o Each VARIANT begins on the same byte in the record, subject toF individual alignment options. The length of the longest VARIANTF in the collection determines the overall length of the VARIANTS field description.F o Be sure that the VARIANTS collection you define conforms to theF requirements of the language or language processor that will" access the record definition.F o VAX DATATRIEVE requires each VARIANT to contain a2 STRUCTURE field5 description statement at the top of the VARIANT. 2 ExampleF The following example contains three VARIANT logical views of theF same record. In an application program, you can refer to the logicalF view IN_STOCK, BACK_ORDER, or OUT_OF_STOCK depending on how you want to interpret the STOCK field. STOCK STRUCTURE. VARIANTS. VARIANT. IN_STOCK STRUCTURE.0 PRODUCT_NO DATATYPE IS TEXT5 3 SIZE IS 8 CHARACTERS.1 DATE_ORDERED DATATYPE IS DATE.1 STATUS_CODE DATATYPE IS BYTE.4 QUANTITY DATATYPE IS LONGWORD4 ALIGNED ON LONGWORD.) LOCATION ARRAY 1:41 DATATYPE IS TEXT 6 SIZE IS 30 CHARACTERS.> UNIT_PRICE DATATYPE IS LONGWORD SCALE -2.$ END IN_STOCK STRUCTURE. 4 END VARIANT. VARIANT." BACK_ORDER STRUCTURE.0 PRODUCT_NO DATATYPE IS TEXT5 SIZE IS 8 CHARACTERS.1 DATE_ORDERED DATATYPE IS DATE.1 STATUS_CODE DATATYPE IS BYTE.4 QUANTITY DATATYPE IS LONGWORD4 ALIGNED ON LONGWORD.* SUPPLIER ARRAY 1:4 1 DATATYPE IS TEXT 6 5 SIZE IS 30 CHARACTERS.5 UNIT_PRICE DATATYPE IS LONGWORD ) SCALE -2.& END BACK_ORDER STRUCTURE. END VARIANT. VARIANT.$ OUT_OF_STOCK STRUCTURE.4 PRODUCT_NO DATATYPE IS TEXT9 SIZE IS 8 CHARACTERS.5 DATE_LAST_SOLD DATATYPE IS DATE.( END OUT_OF_STOCK STRUCTURE. END VARIANT. END VAR6IANTS. END STOCK STRUCTURE.ww­4ç*Bvš1 VARIANTS_OF_fieldF Names a tag variable whose value at run time determines which of the' VARIANT fields is the current VARIANT. 2 Parameters var_field_nameF The tag variable field, whose value determines the selection of& the current VARIANT at run time. low_value, high_valueF Values to be compared to the value of the tag variable at run+ time to determine the current VARIANT. field d7escription statementF A definition of the field characteristics for the subordinate fields of each VARIANT.2 Syntax Rules9 o The VARIANT field description block can be repeated.F o The tag variable must be an elementary field fixed in the recordF and not part of an array, and it must precede the VARIANTS field; description statement. It cannot be an unnamed field.F o You must fully qualify the tag variable's field name if it is notF unique wit 8hin the record. A fully qualified field name consistsF of an elementary field name preceded by the field names of asF many of its direct ancestors as you need to specify theF elementary field uniquely. You must separate each element of a< fully qualified field name from the next with a period.F Once the elementary field name is identified uniquely, you canF omit any remaining ancestors' field names. Furthermore, if theF tag variable's name i 9s not unique within the record, none of theA ancestors in its fully qualified name can be unnamed fields.5 o You must include a tag value clause for VARIANT.F o At run time, the values (low_value and high_value...) you specifyF are compared to the value of the tag variable to determine the current VARIANT.F o Tag value specifications must conform to the following conditions:F - The tag values low_value, high_value... must be legal values :F as defined by the tag variable's data type. For example, ifF the tag variable is a TEXT field, the tag values must be quoted literals.F - The values of high_value must be greater than or equal to theF values of low_value in the collating sequence of the data type.F - The range of values in one VARIANT must not overlap the range( of values in any other VARIANT.F o The compiler ignores commas, but you can use ; them to make tag) value specifications easier to read.F o The CDDL compiler does not check that the tag values you specifyF are legal. If you specify invalid values, you will receive errorD messages when you refer to the VARIANT field in an application. 2 Usage NotesF o The tag value clause specifies a value or set of values for theF tag variable in each VARIANT of a VARIANTS field collection. TheF tag variable can then be used at run time to find <the current VARIANT.F o Languages that do not support tag variables ignore the tag valueF clause. For more information on language support of CDD recordF definitions, refer to the documentation for the language you are using.F o Each variant begins on the same byte in the record, subject toF individual alignment options. The length of the longest VARIANTF in the collection determines the overall length of the VARIANTS field description.=F o Be sure that the VARIANT collection you define conforms to theF requirements of the language or language processor that will" access the record definition.F o VAX DATATRIEVE requires each VARIANT to contain a STRUCTURE field5 description statement at the top of the VARIANT. 2 ExampleF In the following example, RECORD_IDENTIFIER is the tag variable. TheF value of RECORD_IDENTIFIER at run time determines which VARIANT isD current according to the transl>ation table in the descriptive text. STOCK STRUCTURE.0 /* RECORD_IDENTIFIER determines field type: S --> In-stock record." B --> Back-order record.' O --> Out-of-stock record. */1 RECORD_IDENTIFIER DATATYPE IS TEXT 4 SIZE IS 1 CHARACTER.# VARIANTS OF RECORD_IDENTIFIER. VARIANT VALUE IS "S". IN_STOCK STRUCTURE.0 PRODUCT_NO DATATYPE IS TEXT5 ? SIZE IS 8 CHARACTERS.1 DATE_ORDERED DATATYPE IS DATE.1 STATUS_CODE DATATYPE IS BYTE.4 QUANTITY DATATYPE IS LONGWORD4 ALIGNED ON LONGWORD.) LOCATION ARRAY 1:41 DATATYPE IS TEXT 6 SIZE IS 30 CHARACTERS.> UNIT_PRICE DATATYPE IS LONGWORD SCALE -2.$ END IN_STOCK STRUCTURE. @ END VARIANT. VARIANT VALUE IS "B"." BACK_ORDER STRUCTURE.0 PRODUCT_NO DATATYPE IS TEXT5 SIZE IS 8 CHARACTERS.1 DATE_ORDERED DATATYPE IS DATE.1 STATUS_CODE DATATYPE IS BYTE.4 QUANTITY DATATYPE IS LONGWORD4 ALIGNED ON LONGWORD.* SUPPLIER ARRAY 1:4 1 DATATYPE IS TEXT 6 A SIZE IS 30 CHARACTERS.5 UNIT_PRICE DATATYPE IS LONGWORD ) SCALE -2.& END BACK_ORDER STRUCTURE. END VARIANT.  VARIANT VALUE IS "O".$ OUT_OF_STOCK STRUCTURE.4 PRODUCT_NO DATATYPE IS TEXT9 SIZE IS 8 CHARACTERS.5 DATE_LAST_SOLD DATATYPE IS DATE.( END OUT_OF_STOCK STRUCTURE. B END VARIANT. END VARIANTS. END STOCK STRUCTURE.ww­4ç*Bvš 1 field_nameF The field name you assign can be up to 31 characters from the setF A-Z, 0-9, _, and $. The first character must be a letter from A-Z,F and the last character can not be _ or $. You can use 8-bit& alphabetic characters in field names.ww­4ç*Bvš1 field_description_statementF CDDL contains five types of field description statements. You canF use an elemenCtary, STRUCTURE, COPY, VARIANTS, or VARIANTS_OF fieldF description statement, but you can use only one field description statement to define a record.F STRUCTURE, COPY, VARIANT, and VARIANTS_OF field descriptionF statements are subdivided and defined by subordinate field description statements.ww­F+Bvš1 FIELD_DESCRIPTION_CLAUSEF The optional field description clause inserts text documenting field definitions into the CDD.2 Syntax Rules DF o Use the text delimiters /* and */ without the keywordF DESCRIPTION, and place the text immediately before the field= description statement of the field you want to document.7 o You can use 8-bit characters in CDDL descriptions. 2 Usage NotesF o This clause provides a way to associate text with a recordF description, providing a tool for documenting the sources of dataF and for describing the field structure of a record. DESCRIPTI EONF text can also aid in establishing record definition conventions and standards.F o You can also include comments in a CDDL source file by using theF exclamation point (!) as a comment delimiter. Using theF DESCRIPTION clause is preferable to including comment lines inF the source file because DESCRIPTION text is stored directly inF the CDD. CDDL/COPY_LIST copies DESCRIPTION clauses from templateF records, but does not copy comments prFeceded by an exclamationF point. Also, you can display record-level DESCRIPTION text withF DMU's LIST/ITEM=DESCRIPTION command. DMU's EXTRACT/RECORDF command extracts record- and field-level DESCRIPTION text but@ does not extract comments preceded by an exclamation point. 2 ExampleF The following example contains DESCRIPTION text of the record7 definition as a whole, and of the elementary field ID.. DEFINE RECORD CDD$TOP.CORPORATE.EMPLOYEE_LISTC G DESCRIPTION /* This record contains the employee master list, C and it is the source from which employee fields ? in other record descriptions are copied. */. EMPLOYEE STRUCTURE.8 /* An employee's ID number is his or her social security number. */? ID DATATYPE IS UNSIGNED NUMERIC 3 SIZE IS 9 DIGITS. NAME STRUCTURE.3 LAST_NAME DATATY HPE IS TEXT 8 SIZE IS 15 CHARACTERS.3 FIRST_NAME DATATYPE IS TEXT 8 SIZE IS 10 CHARACTERS.3 MIDDLE_INITIAL DATATYPE IS TEXT 6 SIZE IS 1 CHARACTER. END NAME STRUCTURE.+ ADDRESS COPY FROMC CDD$TOP.CORPORATE.ADDRESS_RECORD.? DEPT_CODE DATATYPE IS UNSIGNED NUMERIC 3I SIZE IS 3 DIGITS. END EMPLOYEE STRUCTURE.  END EMPLOYEE_LIST RECORD.ww­F+Bvš 1 DESCRIPTIONF A record description clause inserts text documenting a record definition into the CDD.2 Syntax RulesF o You must use the keyword DESCRIPTION and the text delimiters /*F and */ to insert one or more lines of text describing the record into the DEFINE command. 2 Usage NotesF o This clause provides a J way to associate text with a recordF description, providing a tool for documenting the sources of dataF and for describing the field structure of a record. DESCRIPTIONF text can also aid in establishing record definition conventions and standards.F o You can also include comments in a CDDL source file by using theF exclamation point (!) as a comment delimiter. Using theF DESCRIPTION clause is preferable to including comment lines inF t Khe source file because DESCRIPTION text is stored directly inF the CDD. CDDL/COPY_LIST copies DESCRIPTION clauses from templateF records, but does not copy comments preceded by an exclamationF point. Also, you can display record-level DESCRIPTION text withF DMU's LIST/ITEM=DESCRIPTION command. DMU's EXTRACT/RECORDF command extracts record- and field-level DESCRIPTION text but@ does not extract comments preceded by an exclamation point. 2 Example LF The following example contains DESCRIPTION text of the record7 definition as a whole, and of the elementary field ID.. DEFINE RECORD CDD$TOP.CORPORATE.EMPLOYEE_LISTC DESCRIPTION /* This record contains the employee master list, C and it is the source from which employee fields ? in other record descriptions are copied. */. EMPLOYEE STRUCTURE.8 /* An employee's ID number is his or her social security number. */? M ID DATATYPE IS UNSIGNED NUMERIC 3 SIZE IS 9 DIGITS. NAME STRUCTURE.3 LAST_NAME DATATYPE IS TEXT 8 SIZE IS 15 CHARACTERS.3 FIRST_NAME DATATYPE IS TEXT 8 SIZE IS 10 CHARACTERS.3 MIDDLE_INITIAL DATATYPE IS TEXT 6 SIZE IS 1 CHARACTER. END NAME STRUCTURE.N+ ADDRESS COPY FROMC CDD$TOP.CORPORATE.ADDRESS_RECORD.? DEPT_CODE DATATYPE IS UNSIGNED NUMERIC 3 SIZE IS 3 DIGITS. END EMPLOYEE STRUCTURE.  END EMPLOYEE_LIST RECORD.ww­F+Bvš 1 DATATYPEF The DATATYPE field attribute clause declares the type and size of aF field. Some valid CDD data types may not be supported by theF languages or languageO processors you will be using with the CDD. YouF should be certain that the records you define are valid for the language processors you use.F CDDL accepts TYPE as a synonym for DATATYPE, but the compiler issues a warning when you use TYPE.ww­F+Bvš1 datatype_optionsF The DATATYPE clause allows you several options for describing a field's data type:2 DATEF Specifies that the field is a 64-bit VAX standard absolute date data type.2 VIRTUAL_PFIELDF Specifies that the field is a VAX DATATRIEVE virtual field. No spaceF is allocated for virtual fields in a record. The COMPUTED BYF DATATRIEVE clause determines the value of a virtual field at runD time. A STRUCTURE field cannot contain the VIRTUAL FIELD datatype.2 BITF Specifies that the field is a bit string. Indicate the number of, bits in the field with an unsigned integer. 2 UNSPECIFIEDF Declares that the field is a sequence of 8-bit unsignQed bytes.D Indicate the number of bytes in the field with an unsigned integer.2 TEXTF Specifies that the field is a sequence of 8-bit ASCII bytes.F Indicate the number of characters in the field with an unsigned8 integer. CDDL accepts CHARACTER as a synonym for TEXT.2 VARYING STRINGF Specifies that the field is a PL/I or PASCAL varying string.F Indicate the number of characters in the field with an unsignedE integer. CDDL accepts VARYING TEXT as a syRnonym for VARYING STRING. 2 POINTERF Specifies that the field contains the address of another field orF record definition. In PL/I, for example, POINTER fields are used toF access based variables and buffers allocated by the system. AlthoughF PL/I does not associate POINTER fields with a specified recordF structure, other languages do; the optional [TO path-name] lets you" connect a POINTER to a structure.2 Floating_pointF Floating point data types represent approxi Smations to quantities in aF scientific notation consisting of a signed integer and a fraction.F The four floating point data types are the 32-bit F_FLOATING, theF 64-bit D_FLOATING, the 64-bit G_FLOATING, and the 128-bit H_FLOATING.F In addition, you can use F_FLOATING COMPLEX, D_FLOATING COMPLEX,F G_FLOATING COMPLEX, and H_FLOATING COMPLEX to specify ordered pairsF of floating point data types representing the real and imaginary components of complex numbers.3 SCALE TF You can specify a SCALE as an implied exponent. The signed integerF must be in the range -128 to 127. The SCALE specification indicatesF the number of places to shift the decimal point when the field isF evaluated. A negative integer indicates a shift of the specifiedF number of places to the left, and a positive integer indicates a6 shift of the specified number of places to the right.3 BASEF You can also specify the radix, or BASE, with an unsigned integer.F TheU BASE indicates the number system to be used when the field is$ evaluated. The default BASE is 10. 3 D_FLOATINGF Specifies that the field is a 64-bit floating point number with. precision to approximately 16 decimal digits.3 D_FLOATING_COMPLEXF Specifies that the field consists of two 64-bit floating complexF numbers, one for the real component and one for the imaginary. CDDL@ accepts D_FLOATING_COMPLEX as a synonym for D_FLOATING COMPLEX. 3 F_FLOATINGF SpecifiVes that the field is a 32-bit floating point number with1 precision to approximately seven decimal digits.3 F_FLOATING_COMPLEXF Specifies that the field consists of two 32-bit floating complexF numbers, one for the real component and one for the imaginary. CDDLF accepts FLOATING_COMPLEX, FLOATING COMPLEX, and F_FLOATING_COMPLEX as! synonyms for F_FLOATING COMPLEX. 3 G_FLOATINGF Specifies that the field is an extended range 64-bit floating point: number with precisionW to approximately 15 decimal digits.3 G_FLOATING_COMPLEXF Specifies that the field consists of two extended range 64-bitF floating complex numbers, one for the real component and one for theF imaginary. CDDL accepts G_FLOATING_COMPLEX as a synonym for G_FLOATING COMPLEX. 3 H_FLOATINGF Specifies that the field is an extended range 128-bit floating point: number with precision to approximately 33 decimal digits.3 H_FLOATING COMPLEXF Specifies that the field c Xonsists of two extended range 128-bitF floating complex numbers, one for the real component and one for theF imaginary. CDDL accepts H_FLOATING_COMPLEX as a synonym for H_FLOATING COMPLEX. 2 Fixed_pointF Fixed point data types represent scaled quantities in a binary) format. They can be SIGNED or UNSIGNED.F o You can declare the total number of DIGITS and the number ofF those digits that are FRACTIONS. The number of digits must beF greater t Yhan 0 and less than 32. The number of fractions mustF not be greater than the number of digits. The default number of fractions is 0.F o You can specify a SCALE as an implied exponent. The signedF integer must be in the range -128 to 127. The SCALEF specification indicates the number of places to shift the decimalF point when the field is evaluated. A negative specificationF indicates a shift of the specified number of places to the Z left,F and a positive specification indicates a shift of the specified# number of places to the right.0 When using SCALE, note the following rules:F - The SCALE specification and the FRACTIONS specification bothF indicate how many digits in a field are to the right of theF decimal point. There are, however, two important differences:F - The number of FRACTIONS you can specify is limited to theF number [ of DIGITS you declare for the data type. With0 SCALE, there is no such limitation.F - With SCALE, you can shift the decimal point to the rightF and to the left, but with FRACTIONS, you can shift the, decimal point only to the left.F - Use a positive integer in the SCALE specification to move the$ decimal point to the right.F - Use a negative integer in the SCALE specification to move the# decimal point t\o the left.F o You can also specify the radix, or BASE, with an unsignedF integer. The BASE indicates the number system to be used when5 the field is evaluated. The default BASE is 10.3 BYTEF Specifies that the field is an 8-bit byte. The BYTE can be SIGNED orF UNSIGNED. If there is no sign specification, UNSIGNED is the default.3 WORDF Specifies that the field is a 16-bit word. The field can be SIGNED@ or UNSIGNED. If no sign is speci]fied, UNSIGNED is the default. 3 LONGWORDF Specifies that the field is a 32-bit longword. The LONGWORD can beF SIGNED or UNSIGNED. If no sign is specified, UNSIGNED is the default. 3 QUADWORDF Specifies that the field is a 64-bit quadword field. The field canF be SIGNED or UNSIGNED. If no sign is specified, UNSIGNED is the default. 3 OCTAWORDF Specifies that the field is a 128-bit octaword field. The field canF be SIGNED or UNSIGNED. If no sign i^s specified, UNSIGNED is the default. 3 ExampleF The STRUCTURE field BACK_ORDER contains examples of valid CDDL data declarations. BACK_ORDER STRUCTURE.$ PRODUCT_NO DATATYPE IS TEXT) SIZE IS 8 CHARACTERS.% DATE_ORDERED DATATYPE IS DATE.% STATUS_CODE DATATYPE IS BYTE.( QUANTITY DATATYPE IS LONGWORD( ALIGNED ON LONGWORD. SUPPLIER ARRAY 1:4 % DATATYPE IS TEXT * _ SIZE IS 30 CHARACTERS.2 UNIT_PRICE DATATYPE IS LONGWORD SCALE -2. END BACK_ORDER STRUCTURE.2 Decimal_stringF o You must declare the total number of DIGITS in the field. YouF can also declare which of those digits are FRACTIONS. The numberF of digits must be greater than 0 and less than 32. The number ofF fractions must not be greater than the number of digits. The& default number of fractions is 0.F o You can specify a SCALE as an implied ` exponent. The signedF integer must be in the range -128 to 127. The SCALEF specification indicates the number of places to shift the decimalF point when the field is evaluated. A negative specificationF indicates a shift of the specified number of places to the left,F and positive indicates a shift of the specified number of places to the right.0 When using SCALE, note the following rules:F - The SCALE specification and the FRACT aIONS specification bothF indicate how many digits in a field are to the right of theF decimal point. There are, however, two important differences:F o The number of FRACTIONS you can specify is limited to theF number of DIGITS you declare for the data type. With0 SCALE, there is no such limitation.F o With SCALE, you can shift the decimal point to the rightF and to the left, but with bFRACTIONS, you can shift the, decimal point only to the left.F - Use a positive integer in the SCALE specification to move the$ decimal point to the right.F - Use a negative integer in the SCALE specification to move the# decimal point to the left.F o You can also specify the radix, or BASE, with an unsignedF integer. The BASE indicates the number system to be used when5 the field is evaluated. The default BASE is 10.c3 PACKED DECIMALF Specifies that the field is a packed decimal numeric field. CDDL8 accepts PACKED NUMERIC as a synonym for PACKED DECIMAL.3 UNSIGNED NUMERICF Specifies that the field is an unsigned decimal string. You must use the UNSIGNED keyword.3 ZONED NUMERICF Specifies that the field is a VAX ZONED NUMERIC data type. CDDL7 accepts SIGNED NUMERIC as a synonym for ZONED NUMERIC.3 LEFT SEPARATE NUMERICF Specifies that the field is a left separate signded numeric decimalF string. CDDL accepts [SIGNED] NUMERIC LEFT SEPARATE as a synonym for LEFT SEPARATE NUMERIC.3 LEFT OVERPUNCHED NUMERICF Specifies that the field is a left overpunched signed numeric decimalF string. CDDL accepts [SIGNED] NUMERIC LEFT OVERPUNCHED as a synonym for LEFT OVERPUNCHED NUMERIC.3 RIGHT SEPARATE NUMERICF Specifies that the field is a right separate signed numeric decimalF string. CDDL accepts [SIGNED] NUMERIC RIGHT SEPARATE as a synonym fore RIGHT SEPARATE NUMERIC.3 RIGHT OVERPUNCHED NUMERICF Specifies that the field is a right overpunched signed numericF decimal string. CDDL accepts [SIGNED] NUMERIC RIGHT OVERPUNCHED as a' synonym for RIGHT OVERPUNCHED NUMERIC.ww­j\+Bvš1 SCALEF You can specify a SCALE as an implied exponent. The signed integerF must be in the range -128 to 127. The SCALE specification indicatesF the number of places to shift the decimal point when the field is evalu fated., When using SCALE, note the following rules:F o The SCALE specification and the FRACTIONS specification bothF indicate how many digits in a field are to the right of theC decimal point. There are, however, two important differences:F - The number of FRACTIONS you can specify is limited to theF number of DIGITS you declare for the data type. With SCALE,% there is no such limitation.F - With SCALE, you can shift the decimalg point to the right andF to the left, but with FRACTIONS, you can shift the decimal point only to the left.F o Use a positive integer in the SCALE specification to move the decimal point to the right.F o Use a negative integer in the SCALE specification to move the decimal point to the left.ww­j\+Bvš1 BASEF Indicates the number system, or radix, to be used when the field is evaluated.ww­j\+Bvš1 SIZEh3 Indicates the total number of digits in the field.ww­j\+Bvš 1 no_digitsF The total number of digits. No_digits must be greater than 0 and less than 32.ww­j\+Bvš 1 no_fractsF The number of no_digits that are fractions. No_fracts must not be5 greater than no_digits. The default no_fracts is 0.ww­j\+Bvš1 scale_factorF A signed integer specifying the number of places to shift the decimalF point when the field is evaluatied. A negative scale_factor indicatesF a shift to the left, and a positive scale_factor indicates a shift to; the right. Scale_factor must be in the range -128 to 127.ww­j\+Bvš1 radixF An unsigned integer. Indicates the number system to be used when the. field is evaluated. The default radix is 10.ww­j\+Bvš1 DATEF Specifies that the field is a 64-bit VAX standard absolute date data type.ww­j\+Bvš1 VIRTUAL_FIELDF Specifies tjhat the field is a VAX DATATRIEVE virtual field. No spaceF is allocated for virtual fields in a record. The COMPUTED BYF DATATRIEVE clause determines the value of a virtual field at runD time. A STRUCTURE field cannot contain the VIRTUAL FIELD datatype.ww­|ƒ+Bvš1 BITF Specifies that the field is a bit string. Indicate the number of, bits in the field with an unsigned integer.ww­|ƒ+Bvš1 unspecified_field_sizeA An unsigned integer indkicating the number of bytes in the field.ww­|ƒ+Bvš 1 UNSPECIFIEDF Declares that the field is a sequence of 8-bit unsigned bytes.D Indicate the number of bytes in the field with an unsigned integer.ww­|ƒ+Bvš 1 text_string6 Represents text in strings of contiguous 8-bit bytes.ww­|ƒ+Bvš1 TEXTF Specifies that the field is a sequence of 8-bit ASCII bytes.F Indicate the number of characters in the field with an unsignled8 integer. CDDL accepts CHARACTER as a synonym for TEXT.ww­|ƒ+Bvš1 text_field_sizeF An unsigned integer indicating the number of characters in the field.ww­|ƒ+Bvš1 VARYING_STRINGF Specifies that the field is a PL/I or PASCAL varying string.F Indicate the number of characters in the field with an unsignedE integer. CDDL accepts VARYING TEXT as a synonym for VARYING STRING.ww­|ƒ+Bvš1 vs_field_sizeF An unsigned intmeger indicating the number of characters in the field.ww­|ƒ+Bvš 1 POINTERF Specifies that the field contains the address of another field orF record definition. In PL/I, for example, POINTER fields are used toF access based variables and buffers allocated by the system. AlthoughF PL/I does not associate POINTER fields with a specified recordF structure, other languages do; the optional [TO path-name] lets you" connect a POINTER to a structure.ww­ n|ƒ+Bvš1 Floating_pointF Floating point data types represent approximations to quantities in aF scientific notation consisting of a signed integer and a fraction.F The four floating point data types are the 32-bit F_FLOATING, theF 64-bit D_FLOATING, the 64-bit G_FLOATING, and the 128-bit H_FLOATING.F In addition, you can use F_FLOATING COMPLEX, D_FLOATING COMPLEX,F G_FLOATING COMPLEX, and H_FLOATING COMPLEX to specify ordered pairsF of floating point data types representinog the real and imaginary components of complex numbers.ww­|ƒ+Bvš 1 Fixed_pointF Fixed point data types represent scaled quantities in a binary) format. They can be SIGNED or UNSIGNED.F o You can declare the total number of DIGITS and the number ofF those digits that are FRACTIONS. The number of digits must beF greater than 0 and less than 32. The number of fractions mustF not be greater than the number of digits. The default num pber of fractions is 0.F o You can specify a SCALE as an implied exponent. The signedF integer must be in the range -128 to 127. The SCALEF specification indicates the number of places to shift the decimalF point when the field is evaluated. A negative specificationF indicates a shift of the specified number of places to the left,F and a positive specification indicates a shift of the specified# number of places to the right.0 q When using SCALE, note the following rules:F - The SCALE specification and the FRACTIONS specification haveF a similar function. They both indicate how many digits in aF field are to the right of the decimal point. There are,, however, two important differences:F o The number of FRACTIONS you can specify is limited to theF number of DIGITS you declare for the data type. With0 SCALE, there is no such limitation.rF o With SCALE, you can shift the decimal point to the rightF and to the left, but with FRACTIONS, you can shift the, decimal point only to the left.F - Use a positive integer in the SCALE specification to move the$ decimal point to the right.F - Use a negative integer in the SCALE specification to move the# decimal point to the left.F o You can also specify the radix, or BASE, with an unsignedF integser. The BASE indicates the number system to be used when5 the field is evaluated. The default BASE is 10.2 BYTEF Specifies that the field is an 8-bit byte. The BYTE can be SIGNED orF UNSIGNED. If there is no sign specification, UNSIGNED is the default.2 WORDF Specifies that the field is a 16-bit word. The field can be SIGNED@ or UNSIGNED. If no sign is specified, UNSIGNED is the default. 2 LONGWORDF Specifies that the field is a 32-bit longword. Thet LONGWORD can beF SIGNED or UNSIGNED. If no sign is specified, UNSIGNED is the default. 2 QUADWORDF Specifies that the field is a 64-bit quadword field. The field canF be SIGNED or UNSIGNED. If no sign is specified, UNSIGNED is the default. 2 OCTAWORDF Specifies that the field is a 128-bit octaword field. The field canF be SIGNED or UNSIGNED. If no sign is specified, UNSIGNED is the default. 1 Decimal_stringF o You must declare the total unumber of DIGITS in the field. YouF can also declare which of those digits are FRACTIONS. The numberF of digits must be greater than 0 and less than 32. The number ofF fractions must not be greater than the number of digits. The& default number of fractions is 0.F o You can specify a SCALE as an implied exponent. The signedF integer must be in the range -128 to 127. The SCALEF specification indicates the number of places to shift the d vecimalF point when the field is evaluated. A negative specificationF indicates a shift of the specified number of places to the left,F and positive indicates a shift of the specified number of places to the right.0 When using SCALE, note the following rules:F - The SCALE specification and the FRACTIONS specification haveF a similar function. They both indicate how many digits in aF field are to the right of the decimal point. There w are,, however, two important differences:F o The number of FRACTIONS you can specify is limited to theF number of DIGITS you declare for the data type. With0 SCALE, there is no such limitation.F o With SCALE, you can shift the decimal point to the rightF and to the left, but with FRACTIONS, you can shift the, decimal point only to the left.F - Use a positive integer in the SCALE specification txo move the$ decimal point to the right.F - Use a negative integer in the SCALE specification to move the# decimal point to the left.F o You can also specify the radix, or BASE, with an unsignedF integer. The BASE indicates the number system to be used when5 the field is evaluated. The default BASE is 10.2 PACKED DECIMALF Specifies that the field is a packed decimal numeric field. CDDL8 accepts PACKED NUMERIC as a synonym for PACyKED DECIMAL.2 UNSIGNED NUMERICF Specifies that the field is an unsigned decimal string. You must use the UNSIGNED keyword.2 ZONED NUMERICF Specifies that the field is a VAX ZONED NUMERIC data type. CDDL7 accepts SIGNED NUMERIC as a synonym for ZONED NUMERIC.2 LEFT SEPARATE NUMERICF Specifies that the field is a left separate signed numeric decimalF string. CDDL accepts [SIGNED] NUMERIC LEFT SEPARATE as a synonym for LEFT SEPARATE NUMERIC.2 LEFT OVERPUNCHEDz NUMERICF Specifies that the field is a left overpunched signed numeric decimalF string. CDDL accepts [SIGNED] NUMERIC LEFT OVERPUNCHED as a synonym for LEFT OVERPUNCHED NUMERIC.2 RIGHT SEPARATE NUMERICF Specifies that the field is a right separate signed numeric decimalF string. CDDL accepts [SIGNED] NUMERIC RIGHT SEPARATE as a synonym for RIGHT SEPARATE NUMERIC.2 RIGHT OVERPUNCHED NUMERICF Specifies that the field is a right overpunched signed numericF decimal{ string. CDDL accepts [SIGNED] NUMERIC RIGHT OVERPUNCHED as a' synonym for RIGHT OVERPUNCHED NUMERIC.ww­ŽȘ+Bvš1 bit_field_size@ An unsigned integer indicating the number of bits in the field.ww­ŽȘ+Bvš1 BYTEF Specifies that the field is an 8-bit byte. The BYTE can be SIGNED orF UNSIGNED. If there is no sign specification, UNSIGNED is the default.ww­ŽȘ+Bvš1 WORDF Specifies that the field is a 16-bit word. The field can |be SIGNED@ or UNSIGNED. If no sign is specified, UNSIGNED is the default.ww­ŽȘ+Bvš 1 LONGWORDF Specifies that the field is a 32-bit longword. The LONGWORD can beF SIGNED or UNSIGNED. If no sign is specified, UNSIGNED is the default.ww­ŽȘ+Bvš 1 QUADWORDF Specifies that the field is a 64-bit quadword field. The field canF be SIGNED or UNSIGNED. If no sign is specified, UNSIGNED is the default.ww­ Ń+Bvš 1 OCTAWORD}F Specifies that the field is a 128-bit octaword field. The field canF be SIGNED or UNSIGNED. If no sign is specified, UNSIGNED is the default.ww­ Ń+Bvš1 PACKED_DECIMALF Specifies that the field is a packed decimal numeric field. CDDL8 accepts PACKED NUMERIC as a synonym for PACKED DECIMAL.ww­ Ń+Bvš1 UNSIGNED_NUMERICF Specifies that the field is an unsigned decimal string. You must use the UNSIGNED keyword.ww­ Ń+Bvš~1 ZONED_NUMERICF Specifies that the field is a VAX ZONED NUMERIC data type. CDDL7 accepts SIGNED NUMERIC as a synonym for ZONED NUMERIC.ww­ Ń+Bvš1 LEFT_SEPARATE_NUMERICF Specifies that the field is a left separate signed numeric decimalF string. CDDL accepts [SIGNED] NUMERIC LEFT SEPARATE as a synonym for LEFT SEPARATE NUMERIC.ww­ Ń+Bvš1 LEFT_OVERPUNCHED_NUMERICF Specifies that the field is a left overpunched signed numeric decimalF string. CDDL accepts [SIGNED] NUMERIC LEFT OVERPUNCHED as a synonym for LEFT OVERPUNCHED NUMERIC.ww­ Ń+Bvš1 RIGHT_SEPARATE_NUMERICF Specifies that the field is a right separate signed numeric decimalF string. CDDL accepts [SIGNED] NUMERIC RIGHT SEPARATE as a synonym for RIGHT SEPARATE NUMERIC.ww­ Ń+Bvš1 RIGHT_OVERPUNCHED_NUMERICF Specifies that the field is a right overpunched signed numericF decimal string. CDDL accepts [SIGNED] NUMERIC €RIGHT OVERPUNCHED as a' synonym for RIGHT OVERPUNCHED NUMERIC.ww­ Ń+Bvš 1 D_FLOATINGF Specifies that the field is a 64-bit floating point number with. precision to approximately 16 decimal digits.ww­ Ń+Bvš1 D_FLOATING_COMPLEXF Specifies that the field consists of two 64-bit floating complexF numbers, one for the real component and one for the imaginary. CDDL@ accepts D_FLOATING_COMPLEX as a synonym for D_FLOATING COMPLEX.ww­ Ń+Bvš 1 F_FLOATINGF Specifies that the field is a 32-bit floating point number with1 precision to approximately seven decimal digits.ww­ Ń+Bvš1 F_FLOATING_COMPLEXF Specifies that the field consists of two 32-bit floating complexF numbers, one for the real component and one for the imaginary. CDDLF accepts FLOATING_COMPLEX, FLOATING COMPLEX, and F_FLOATING_COMPLEX as! synonyms for F_FLOATING COMPLEX.ww­ Ń+Bvš 1 G_FLOATINGF Specifies tha ‚t the field is an extended range 64-bit floating point: number with precision to approximately 15 decimal digits.ww­ Ń+Bvš1 G_FLOATING_COMPLEXF Specifies that the field consists of two extended range 64-bitF floating complex numbers, one for the real component and one for theF imaginary. CDDL accepts G_FLOATING_COMPLEX as a synonym for G_FLOATING COMPLEX.ww­ Ń+Bvš 1 H_FLOATINGF Specifies that the field is an extended range 128-bit floƒating point: number with precision to approximately 33 decimal digits.ww­ Ń+Bvš1 H_FLOATING COMPLEXF Specifies that the field consists of two extended range 128-bitF floating complex numbers, one for the real component and one for theF imaginary. CDDL accepts H_FLOATING_COMPLEX as a synonym for H_FLOATING COMPLEX.ww­ Ń+Bvš1 field_attribute_statementF In each field attribute statement, you use field attribute clauses toF define the fi„elds in a record. CDDL contains generic field attributeF clauses and some facility-specific field attribute clauses that are* understood by only a particular language.ww­ Ń+Bvš 1 ALIGNEDF The ALIGNED field attribute clause aligns a field on a specified7 starting boundary relative to the start of the record. 2 Usage NotesF o To satisfy hardware requirements, some languages and languageF processors have field alignment restrictions for data …F definitions. The ALIGNED clause enables you to control the. starting boundaries of fields you define.F o All fields, except BIT fields, begin by default on the first byteF following the last field. BIT fields begin on the bitF immediately following the last field. You can modify this/ starting position with the ALIGNED clause.F o The ALIGNED clause aligns fields within a record relative to theF start of the record, not relative †to virtual memory locations.F For example, if you specify LONGWORD alignment for a field, thatF field does not necessarily begin on a longword boundary inF memory. Rather, the field begins some multiple of 32 bits beyondF the start of the record. To correctly use the ALIGNED clause,F you must know the memory alignment techniques of the language you use with the CDD.F o You should not use the ALIGNED clause in template records. WhenF CDDL stores t ‡he template record, the position of an aligned fieldF is fixed within the record and is not changed when the record isF copied into another record definition. Therefore, the newlyF created field may not align properly in the new record definition. 2 ExampleF In the following example, a LONGWORD field (QUANTITY) follows a BYTEF field. The PRODUCT_NO field spans 64 bits, the DATE_ORDERED fieldF spans 64 bits, and the STATUS_CODE field spans 8 bits. ˆ The ALIGNEDF clause causes the three bytes following STATUS_CODE to remain emptyE and aligns QUANTITY exactly 160 bits beyond the start of the record. IN_STOCK STRUCTURE.$ PRODUCT_NO DATATYPE IS TEXT) SIZE IS 8 CHARACTERS.% DATE_ORDERED DATATYPE IS DATE.% STATUS_CODE DATATYPE IS BYTE.( QUANTITY DATATYPE IS LONGWORD( ALIGNED ON LONGWORD. LOCATION ARRAY 1:4% DATATYPE IS TEXT * ‰ SIZE IS 30 CHARACTERS.2 UNIT_PRICE DATATYPE IS LONGWORD SCALE -2. END IN_STOCK STRUCTURE.ww­Čű+Bvš1 boundary_optionsF Location where field is aligned relative to start of record in ALIGNED clause.ww­Čű+Bvš1 ARRAYF The ARRAY field attribute clause declares multidimensional arrays orF one-dimensional arrays. ARRAY is most useful when the subscript's lower bound is not equal to 1. 2 Usage NotesF o With ARRAŠY, each subscript has an upper and lower bound defined" by a pair of signed integers.F o In multidimensional arrays, ROW_MAJOR declares the rightmostF subscript to be the fastest varying. COLUMN_MAJOR declares the2 leftmost subscript to be the fastest varying.F o If neither ROW_MAJOR nor COLUMN_MAJOR is specified, the default is ROW_MAJOR. 2 ExampleF In the following example, the ARRAY clause declares 20 instances ofF SUPPLIER (from 0 to 19) ‹where each instance is four 30-character strings./ SUPPLIER ARRAY 0:19 1:42 DATATYPE IS TEXT 7 SIZE IS 30 CHARACTERS.ww­Čű+Bvš 1 lower_boundF Specifies the lower bound of a subscript in an ARRAY field attribute! clause. The default value is 1.ww­Čű+Bvš 1 upper_boundF Specifies the upper bound of a subscript in an ARRAY field attributeF clause. Its value Œmust be greater than or equal to that of the lower bound.ww­Čű+Bvš 1 ROW_MAJORF In an ARRAY field attribute clause, declares the rightmost subscript to be the fastest varying.ww­Čű+Bvš1 COLUMN_MAJORF In an ARRAY field attribute clause, declares the leftmost subscript to the the fastest varying.ww­Čű+Bvš1 BLANK_WHEN_ZEROF The BLANK WHEN ZERO field attribute clause sets an entire field toF blanks when you assign it a  zero. Only VAX COBOL supports this* feature. All other processors ignore it. 2 ExampleF In the following example, the field NEW is initially set to blanks/ when it is accessed by the VAX COBOL compiler. ZIP_CODE STRUCTURE., NEW DATATYPE IS UNSIGNED NUMERIC SIZE IS 4 DIGITS BLANK WHEN ZERO., OLD DATATYPE IS UNSIGNED NUMERIC$ SIZE IS FIVE DIGITS. END ZIP_CODE STRUCTURE.ww­Čű+Bvš1 COMPUTED_BŽY_DATATRIEVEF The COMPUTED BY DATATRIEVE field attribute clause suppliesF expressions used by VAX DATATRIEVE to calculate the values of VIRTUAL fields.2 cbd_quoted_stringE An expression used by VAX DATATRIEVE to calculate the field's value.F The set of quoted strings must form a valid VAX DATATRIEVE virtualF expression. The CDDL compiler does not check the virtual expressionD for correct syntax. You must provide a correct virtual expression. 2 Usage NotesF o You must specify a VIRTUAL FIELD DATATYPE for a field using the# COMPUTED BY DATATRIEVE clause.F o Only VAX DATATRIEVE can interpret VIRTUAL fields. OtherF processors either ignore their presence or refuse to process) record descriptions containing them.9 o You can use 8-bit characters in CDDL quoted strings.F o You cannot specify an INITIAL VALUE field attribute for a virtual field.F o You cannot specify a CONDITION NAME field attribute for a virtual field.F o You cannot use a virtual field as a tag variable in the VARIANTS$ OF field description statement. 2 ExampleF No storage has been allocated here for TOTAL_PRICE. Instead, VAXF DATATRIEVE uses the virtual expression "UNIT_PRICE * QUANTITY" to0 calculate the value of TOTAL_PRICE at run time.1 TOTAL_PRICE DATATYPE IS VIRTUAL FIELD1 COMPUTED BY DATATRIEVE AS4 "UNIT_PRICE * QUAN ‘TITY".ww­èm,Bvš1 CONDITION_NAMEF The CONDITION NAME field attribute clause enables the VAX COBOLF compiler to associate one or more condition names with specific values for a field. 2 Parameters cond_name The condition. COB_condition_name$ A COBOL name for the condition. low_val, high_valF Field values or ranges of field values associated with the condition name. COB_ext_nameF A quoted string c ’ontaining a COBOL external name. See the VAXF COBOL Language Reference Manual for information on the legal use of external names.2 Syntax RulesF o The condition name must be a string of up to 31 characters fromF the set A-Z, 0-9,_, and $. The first character in the stringF must be a letter from A-Z, and the last character can not be _ or $.F o COB_condition_name, quoted strings, or external names must beF legal VAX COBOL names. However, “the CDDL compiler does not checkF for correct syntax. You must provide a correct value expression.F o The values low_val and high_val can be fixed point numbers,F floating point numbers, quoted strings, octal numbers, or hexadecimal numbers.F o The compiler ignores commas, but you can use them to make value# specifications easier to read. 2 Usage NotesF o Only VAX COBOL supports this feature. Other language processors& ignore the COND”ITION NAME clause.F o Each CONDITION NAME clause defines one condition name. EachF condition name can represent a discrete value, a range of values,! or any combination of these.F o You can use the CONDITION NAME clause as many times as you wish within a field description.F o The values low_val and high_val must be legal values as defined- by the data type declared for the field.F o The length of a literal you specify in a CONDITION NAME clause6 • can not exceed the length declared for the field.F o You can specify a fixed point number as the value of any fieldF whose valid VAX COBOL data type is not DATE, TEXT, or UNSPECIFIED.F o You can specify a floating point number as the value of a fieldF whose valid VAX COBOL data type is not DATE, TEXT, or UNSPECIFIED.F o You can specify a quoted string as the value only of a fieldC whose valid VAX COBOL data type is DATE–, TEXT, or UNSPECIFIED.9 o You can use 8-bit characters in CDDL quoted strings.F o You can specify an octal number as the value of any valid VAXF COBOL data type. In order to specify an octal number, placeF single quotation marks (') around the number and precede it with %O; for example, VALUE IS %O'16'F o You can specify a hexadecimal number as the value of any validF VAX COBOL data type. In order to specify a hexadecimal number,F — place single quotation marks (') around it and precede it with %X; for example, VALUE IS %X'3E'F o Value n2 must be greater than or equal to value n1 in the field's collating sequence.F o Value n4 must be greater than or equal to value n3 in the field's collating sequence. 2 ExampleF The following example defines three valid conditions according to the& value of the field RECORD_IDENTIFIER.* RECORD_IDENTIFIER DATATYPE IS TEXT , ˜ SIZE IS 1 CHARACTER7 CONDITION FOR COBOL IS ON_HAND1 COBOL NAME "ON-HAND") VALUE IS "S"6 CONDITION FOR COBOL BACKORDER3 COBOL NAME "BACKORDER") VALUE IS "B"9 CONDITION FOR COBOL OUT_OF_STOCK6 COBOL NAME "OUT-OF-STOCK") VALUE IS "O"7 ™ CONDITION FOR COBOL IS INVALID; VALUES ARE "A", "C" THRU "N", 8 "P" THRU "R", "T" THRU "Z".ww­B1-Bvš1 DEFAULT_VALUEF The DEFAULT_VALUE field attribute clause sets a default value for a" field accessed by VAX DATATRIEVE. 2 Parameters fixed_point_number dtrdv_quoted_string< A VAX DATATRIEVE expression that is the default value.2 Syntax RulesF o The quoted string (dtrd šv_quoted_string) or fixed point numberF must be a valid VAX DATATRIEVE expression. However, the CDDLF compiler does not check for correct syntax. It is yourB responsibility to provide a correct default value expression.9 o You can use 8-bit characters in CDDL quoted strings. 2 Usage NotesF o The DEFAULT_VALUE clause, used with VAX DATATRIEVE, serves muchF the same purpose as the INITIAL_VALUE clause. The mainF difference is tha›t the INITIAL_VALUE clause assigns a value to aF field when the field is first allocated, usually at compile time,F but the DEFAULT_VALUE clause assigns a value to a field each timeC the record is stored without an explicit value assigned to it.F o Only VAX DATATRIEVE supports the DEFAULT_VALUE clause. Other# language processors ignore it. 2 ExampleF The following example assigns a DEFAULT_VALUE of 0 to the field TOTAL_PRICE.2 TOTAL_PRICE œ DATATYPE IS VIRTUAL FIELD2 COMPUTED BY DATATRIEVE AS4 "UNIT_PRICE * QUANTITY"; DEFAULT_VALUE FOR DATATRIEVE IS 0.ww­B1-Bvš 1 EDIT_CODEF The EDIT_CODE field attribute clause provides a code that VAX RPG II' follows when printing a field's value. 2 Parameter rpgec_quoted_string) A VAX RPG II edit code or modifier.2 Syntax RulesF o The quoted string (rpgec_quoted_string) must be a valid VAX RPGF II edit code or modifier. However, the CDDL compiler does not0 check the quoted string for correct syntax.9 o You can use 8-bit characters in CDDL quoted strings. 2 Usage NoteF Only VAX RPG II supports the EDIT_CODE clause. Other language processors ignore it. 2 ExampleF In the following example, the edit code for the field ORDNUM is 3.F Because the attribute's value is 3, a VAX RPG II program will& suppress zeroes whežn printing ORDNUM. TRANSACTION STRUCTURE.9 ORDNUM DATATYPE IS NUMERIC RIGHT OVERPUNCHED$ SIZE IS 8 DIGITS- EDIT_CODE FOR RPG IS "3".9 AMOUNT DATATYPE IS NUMERIC RIGHT OVERPUNCHED0 SIZE IS 8 DIGITS 2 FRACTIONS= EDIT_WORD FOR RPG IS "$0 , . CR".  END TRANSACTION STRUCTURE.ww­B1-Bvš 1 EDIT_STRINGF The EDIT_STRING field attribute clause provides a format thaŸt VAX4 DATATRIEVE follows when displaying a field's value. 2 Parameter dtres_quoted_string# A VAX DATATRIEVE edit string.2 Syntax RulesF o The edit string must be a valid VAX DATATRIEVE expression.F However, the CDDL compiler does not check the quoted string for correct syntax.9 o You can use 8-bit characters in CDDL quoted strings. 2 Usage NoteF Only VAX DATATRIEVE supports the EDIT_STRING clause. Other language processors ignore it.  2 ExampleF In the following example, VAX DATATRIEVE displays the TRANS_DATEF field as a series of three 2-digit numbers in the format month/day/year.. TRANSACTION STRUCTURE OCCURS 1 TO 99 TIMES9 DEPENDING ON TRANSACTION_COUNT.* TRANS_DATE DATATYPE IS DATE4 EDIT_STRING FOR DATATRIEVE( IS "MM/DD/YY".6 ORDER_NUMBER DATATYPE IS UNSIGNED NUMERIC, Ą SIZE IS 10 DIGITS.6 AMOUNT DATATYPE IS UNSIGNED NUMERIC6 SIZE IS 8 DIGITS 2 FRACTIONS- INITIAL VALUE IS 0. END TRANSACTION STRUCTURE.ww­B1-Bvš 1 EDIT_WORDF The EDIT_WORD field attribute clause provides a format that VAX RPG* II follows when printing a field's value. 2 Parameter rpgew_quoted_string A VAX RPG II edit word.2 Syntax RulesF o The quoted string must be a valid VąAX RPG II edit word. However,F the CDDL compiler does not check the quoted string for correct syntax.9 o You can use 8-bit characters in CDDL quoted strings. 2 Usage NoteF Only VAX RPG II supports the EDIT_WORD clause. Other language processors ignore it. 2 ExampleF In the following example, the EDIT_WORD attribute in the AMOUNT field specifies a monetary format: TRANSACTION STRUCTURE.9 ORDNUM DATATYPE IS NUMERIC RIGHT OVERPUNCHED$ Ł SIZE IS 8 DIGITS- EDIT_CODE FOR RPG IS "3".9 AMOUNT DATATYPE IS NUMERIC RIGHT OVERPUNCHED0 SIZE IS 8 DIGITS 2 FRACTIONS= EDIT_WORD FOR RPG IS "$0 , . CR".  END TRANSACTION STRUCTURE.ww­TX-Bvš1 INITIAL_VALUEF The INITIAL_VALUE field attribute clause declares a field's value% when CDDL first allocates the field. 2 Usage NotesF o The value of the literal must fit i €nto the space allocated for the field.F o You can specify a complex number as the INITIAL_VALUE only of aF field whose data type is F_FLOATING COMPLEX, D_FLOATING COMPLEX,/ G_FLOATING COMPLEX, or H_FLOATING COMPLEX.F o You can specify a fixed point number as the INITIAL_VALUE of anyF field whose data type is not DATE, TEXT, UNSPECIFIED, VARYING STRING, or VIRTUAL FIELD.F o You can specify a floating point number as the INITIAL_VALUE of aF fie„ld whose data type is not DATE, TEXT, UNSPECIFIED, VARYING STRING, or VIRTUAL FIELD.F o You can specify a quoted string as the INITIAL_VALUE only of aF field whose data type is DATE, TEXT, UNSPECIFIED, or VARYING STRING.F o The quoted-string in the EXTERNAL subclause contains a legal VAX COBOL external name.9 o You can use 8-bit characters in CDDL quoted strings.F o You can specify a hexadecimal number as the INITIAL_VALUE of aF field Šwith any data type except VIRTUAL FIELD. In order toF specify a hexadecimal number, place single quotation marks ('); around the number and precede it with %X; for example, INITIAL_VALUE IS %X'3E'F o You can specify an octal number as the INITIAL_VALUE of a fieldF with any data type except VIRTUAL FIELD. In order to specify anF octal number, place single quotation marks (') around the number) and precede it with %O; for example, INITIAL_VAL§UE IS %O'16'9 o A VIRTUAL FIELD cannot have an INITIAL_VALUE clause.F o Language processors that do not support the INITIAL_VALUE clause ignore it.F o If the base is not ten and scale is not zero, you can specifyF initial values only in hexadecimal or octal. Furthermore, beforeF you translate the initial value to hexadecimal or octal, youE should multiply it by the base raised to the value of the scale.F For example, to specify an initial valuše of 1 for a field withF base 2 and scale 5, first multiply the value by 2 raised to theF fifth, yielding 32. Then convert 32 to its hexadecimal or octal& equivalent, and store that value. 2 ExampleF The following data declaration gives the field AMOUNT an INITIAL_VALUE of 0./ TRANSACTION STRUCTURE OCCURS 1 TO 99 TIMES: DEPENDING ON TRANSACTION_COUNT., TRANS_DATE DATATYPE IS DATE.7 ORDER_NUMBER © DATATYPE IS UNSIGNED NUMERIC- SIZE IS 10 DIGITS.7 AMOUNT DATATYPE IS UNSIGNED NUMERIC7 SIZE IS 8 DIGITS 2 FRACTIONS. INITIAL_VALUE IS 0. END TRANSACTION STRUCTURE.ww­TX-Bvš1 JUSTIFIED_RIGHTF The JUSTIFIED_RIGHT field attribute truncates or fills a TEXT or; UNSPECIFIED field from the left instead of from the right. 2 Usage NotesF o Only VAX COBOL supporȘts the JUSTIFIED RIGHT clause. Other# language processors ignore it.F o Use this clause only on fields whose data type is TEXT or UNSPECIFIED. 1 MISSING_VALUEF The MISSING_VALUE field attribute clause specifies a value toB indicate that a field has never been assigned a meaningful value. 2 Parameters fixed-point-number quoted-string' The VAX DATATRIEVE missing value.2 Syntax RulesF o The quoted string or fixed point number « must be a valid VAXF DATATRIEVE expression for the field. The CDDL compiler does not check for correct syntax.9 o You can use 8-bit characters in CDDL quoted strings. 2 Usage NotesF o Only VAX DATATRIEVE supports the MISSING_VALUE clause. Other# language processors ignore it.F o VAX DATATRIEVE treats a field containing a MISSING_VALUE as aF special case; for example, VAX DATATRIEVE ignores fieldsF containing a MISSING_VALUE Źwhen it performs statistical operations. 2 ExampleF The following example assigns a missing value of 0 to the fieldF PRICE. A PRICE of 0 indicates to VAX DATATRIEVE that the value forF PRICE is missing; VAX DATATRIEVE ignores records with PRICE equal to9 0 when it performs operations involving the PRICE field.9 PRICE DATATYPE IS UNSIGNED NUMERIC9 SIZE IS 8 DIGITS 2 FRACTIONS? MISSING­_VALUE FOR DATATRIEVE IS 0.ww­TX-Bvš1 NAMEF The NAME field attribute clause declares a facility-specific name forF a field. The specified language or language processor then7 recognizes only this name when you refer to the field. 2 Parameter quoted-string' The facility-specific field name.2 Syntax RulesF o The quoted string must be a legal name for the specified languageF or language processor. The CDDL does not check the quoted striźng$ for validity or correct syntax.9 o You can use 8-bit characters in CDDL quoted strings. 2 Usage NotesF o You can use this clause only if you have specified a field nameF in the field declaration. You can not specify a/ facility-specific name for unnamed fields.F o Once you have assigned a facility-specific name to a field, the= facility no longer recognizes the field's original name.F o Be careful when you use the NAME clause bŻecause it enables you to9 assign completely different names to the same field.F o Avoid assigning dissimilar names to the same field. The NAMEF clause is designed only to allow you to make field names seem& native to applications languages. 2 ExampleF The following example provides a VAX COBOL name and a VAX RPG II nameF for the ORDER_NUMBER field. Because of the NAME clause, VAX COBOLF recognizes the field only by the name ORDER-NUMBER, and VAX RPG II.° recognizes the field only by the name ORDER#.1 ORDER_NUMBER DATATYPE IS UNSIGNED NUMERIC& SIZE IS 10 DIGITS6 NAME FOR COBOL IS "ORDER-NUMBER".. NAME FOR RPG IS "ORDER#". 1 OCCURSF The OCCURS field attribute clause declares fixed-length, one-dimensional arrays. 2 Parameters max_number, The number of occurrences of the array. COB_index A VAX COBOL index name.2 Syntax RulesF ± o An unsigned integer (max_number) declares the number ofF occurrences in one-dimensional, fixed-length arrays. This- integer is the upper bound of the array.9 o The number of occurrences must be greater than zero. 2 Usage NotesF o The unsigned integer (max_number) is the array's upper bound; theF lower bound of an array declared with OCCURS is always 1. If youF need to specify an array with a lower bound other than 1, use the ARRAY cla Čuse.F o Only VAX COBOL supports the INDEXED FOR COBOL BY optional field3 attribute clause. Other processors ignore it.F o You cannot use the INDEXED FOR COBOL BY optional field attributeF clause with Version 3.0 of VAX COBOL or any earlier version. VAXB COBOL supports INDEXED FOR COBOL BY in Version 3.1 and later.F o If you use a name as a COBOL index name you cannot use that nameF as a field name or COBOL-specific name elsewhere in the record descripłtion. 2 ExampleF In the following example, the OCCURS clause is used twice to declareF 20 instances of SUPPLIER where each instance is four 30-character2 strings. Note that OCCURS clauses can be nested.G SUPPLIER STRUCTURE OCCURS 20 TIMES. / SUPPLIER OCCURS 4 TIMES1 DATATYPE IS TEXT7 SIZE IS 30 CHARACTERS. END SUPPLIER STRUCTURE.ww­f-ŽBvš1 OCCURS_DEPENDINGF The OCCURS . . . DEPENDING field attribute clause declares a( variable-length, one-dimensional array. 2 Parameters min_number, max_number- The range for the number of occurrences. dep_field_nameF The tag variable field, whose value determines the actual number of occurrences. COB_index A VAX COBOL index name.2 Syntax RulesF o Two unsigned integers (min_number, max_number) specify a rangeF for ”the number of occurrences; min_number specifies the minimumF number of occurrences and must be greater than or equal to zero;F max_number specifies the maximum number of occurrences and must, be greater than or equal to min_number.F o The actual number of occurrences varies according to the value of the named field.F o The field (dep_field_name) named in the DEPENDING clause must beF an elementary field fixed in the record and not part of an array.F Its f ¶ield description must precede the array field description,F and its value must never be less than min_number nor greater than* max_number. You must name the field.F o You must fully qualify the field name if it is not unique withinF the record. A fully qualified field name consists of anF elementary field name preceded by the field names of as many ofF its direct ancestors as you need to specify the elementary fieldF uniquely. Once the elementary fi ·eld name is identified uniquely,F you can omit any remaining ancestors' field names. You mustF separate each element of a fully qualified field name from the next with a period. 2 Usage NotesF o The unsigned integers min_number and max_number declare the rangeF for the array's upper bound; the lower bound of an array declaredF with OCCURS . . . DEPENDING is always 1. If you need to specifyD an array with a lower bound other than 1, use the ARRAY clažuse.F o If the tag variable's name is not unique within the record, noneF of the ancestors in its fully qualified name can be unnamed fields.F o Only VAX COBOL supports the INDEXED FOR COBOL BY field attribute) clause. Other processors ignore it.F o You cannot use the INDEXED FOR COBOL BY optional field attributeF clause with Version 3.0 of VAX COBOL or any earlier version. VAXB COBOL supports INDEXED FOR COBOL BY in Version 3.1 and later.F o Ičf you use a name as a COBOL index name you cannot use that nameF as a field name or COBOL-specific name elsewhere in the record description. 2 ExampleF In the following example, a variable length array defines individual/ transactions within the STRUCTURE field SALES. SALES STRUCTURE.> TRANSACTION_COUNT DATATYPE IS UNSIGNED WORD6 VALID FOR DTR IF A "TRANSACTION_COUNT > 0". ș9 TRANSACTION STRUCTURE OCCURS 1 TO 99 TIMES5 DEPENDING ON; TRANSACTION_COUNT.6 TRANS_DATE DATATYPE IS DATE.B ORDER_NUMBER DATATYPE IS UNSIGNED NUMERIC 7 SIZE IS 10 DIGITS.B AMOUNT DATATYPE IS UNSIGNED NUMERIC A SIZE IS 8 DIGITS 2 FRACTIONSD » PICTURE FOR COBOL IS "9(6)V99". END TRANSACTION STRUCTURE. END SALES STRUCTURE.F The fully qualified field name of TRANSACTION_COUNT is SALES.TRANSACTION_COUNT.ww­f-Bvš 1 PICTUREF The PICTURE field attribute clause declares a field's picture string0 for a specified language or language processor. 2 Parameter pic_quoted_stringF The picture string for the specified language or language procŒessor.2 Syntax RulesF o Pic_quoted_string must be a valid picture string for theF specified language or language processor. The CDDL compiler does@ not check the quoted string for validity or correct syntax.6 o You can use 8-bit characters in pic_field_string.F o The data type implicit in the pic_field_string must be consistent< with the data type you select with the DATATYPE clause. 2 Usage NotesF o Each language that requires a picture string œwill construct aF default picture string if you do not provide one. The defaultF picture string provides a concise, efficient description of theF field. You should use the default picture string whenever: possible and avoid facility-specific PICTURE clauses.F o The CDDL compiler does not check picture strings for conformityF with the DATATYPE clause. In most cases, therefore, the default0 picture string is probably the best option.F o You canŸ use the EDIT_STRING field attribute clause to provide an. edited picture string for VAX DATATRIEVE. 2 Example; The following example contains a picture string for COBOL.A AMOUNT DATATYPE UNSIGNED NUMERIC 8 DIGITS 2 FRACTIONS2 PICTURE FOR COBOL IS "9(6)V99".ww­xŠ-Bvš1 QUERY_HEADERF The QUERY_HEADER field attribute clause provides a label that VAXF DATATRIEVE uses as a column heading for the field in printouts and reportsż. 2 Parameter dtrqh_quoted_string& The VAX DATATRIEVE query header.2 Syntax RulesF o The quoted string must be a valid VAX DATATRIEVE query header.F The CDDL compiler does not check the quoted string for correct syntax.F o Quoted strings must be separated from each other by a space, tab, or comma. 2 Usage NotesF o Only VAX DATATRIEVE supports the QUERY_HEADER clause. Other# language processors ignore it.F o If you specifÀy more than one quoted string, VAX DATATRIEVE stacksF them. Use multiple quoted strings to specify long query headers.9 o You can use 8-bit characters in CDDL quoted strings. 2 ExampleF In the following example, the QUERY_HEADER clause specifies that VAXF DATATRIEVE use TOTAL PRICE as the column header for the field TOTAL_PRICE.2 TOTAL_PRICE DATATYPE IS VIRTUAL FIELD+ COMPUTED BY DTR AS4 "UNIT_PRICEÁ * QUANTITY"? QUERY_HEADER FOR DTR IS "TOTAL PRICE".ww­xŠ-Bvš 1 QUERY_NAMEF The QUERY_NAME field attribute clause provides VAX DATATRIEVE with anF alternate reference name for a field. VAX DATATRIEVE allows you toF refer to a field either by its field name or by a specified query name. 2 Parameter dtrqn_quoted_string$ The VAX DATATRIEVE query name. 2 Syntax RuleF The quoted string must be a valid VAX DATATRIEVE query nÂame. TheC CDDL compiler does not check the quoted string for correct syntax. 2 Usage NotesF o Only VAX DATATRIEVE supports the QUERY_NAME clause. Other processors ignore it.F o You can specify a query name for a field only if you haveF specified a field name for it in the field description statement.9 You can not specify a query name for unnamed fields.F o QUERY_NAME is different from NAME because VAX DATATRIEVEF recognizes both theĂ query name and the original field name. WithF NAME, the facility-specific name is the only name recognized by2 the specified language or language processor.F o Choose a query name that is shorter and easier to remember thanF the actual field name. You can then choose a field name that is5 descriptive of the field's contents and purpose.9 o You can use 8-bit characters in CDDL quoted strings. 2 ExampleF In the following example, the QUERY_NAME clause speÄcifies TP as an5 alternate DATATRIEVE name for the field TOTAL_PRICE.1 TOTAL_PRICE DATATYPE IS VIRTUAL FIELD* COMPUTED BY DTR AS2 "UNIT_PRICE * QUANTITY"3 QUERY_NAME FOR DTR IS "TP".ww­xŠ-Bvš1 VALID_FOR_DATATRIEVE_IFF The VALID_FOR_DATATRIEVE_IF field attribute clause causes VAXF DATATRIEVE to validate value assignments to a field. VAX DATATRIEVEF refuses to assign a valĆue to a field if that value is not accepted by this validation expression. 2 Parameter dtrvi_quoted_stringA VAX DATATRIEVE source text forming a validation expression. 2 Syntax RuleF The quoted strings must form a valid VAX DATATRIEVE validationF expression. The CDDL compiler does not check the validation expression for correct syntax. 2 Usage NotesF o Only VAX DATATRIEVE can interpret these validation expressions.5 Other language processors ignore their presence.9 o You can use 8-bit characters in CDDL quoted strings. 2 ExampleF In the following example, the VALID FOR DATATRIEVE IF clause causesF VAX DATATRIEVE to accept only positive integers for the field TRANSACTION_COUNT.2 TRANSACTION_COUNT DATATYPE IS UNSIGNED WORD) VALID FOR DTR IF5 "TRANSACTION_COUNT > 0".ww