Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

Parameters

Syntax Rules

Usage Notes

Example

CDD/Plus Dictionary Data Definition Language Utility CONDITION_NAME — VMS CDD+_4.1A

 The CONDITION NAME field  attribute  clause  enables  the  VAX  COBOL
 compiler  to  associate  one  or  more  condition names with specific
 values for a field.

Additional information available:

ParametersSyntax RulesUsage NotesExample

Parameters


 cond_name

     The condition.


 COB_condition_name

     A COBOL name for the condition.


 low_val, high_val

     Field values or  ranges  of  field  values  associated  with  the
     condition name.


 COB_ext_name

     A quoted string containing a COBOL external name.   See  the  VAX
     COBOL  Language Reference Manual for information on the legal use
     of external names.

Syntax Rules

  o  The condition name must be a string of up to 31  characters  from
     the  set  A-Z,  0-9,_,  and $.  The first character in the string
     must be a letter from A-Z, and the last character can not be _ or
     $.

  o  COB_condition_name, quoted strings, or  external  names  must  be
     legal VAX COBOL names.  However, the CDDL compiler does not check
     for correct syntax.  You must provide a correct value expression.

  o  The values low_val and  high_val  can  be  fixed  point  numbers,
     floating   point  numbers,  quoted  strings,  octal  numbers,  or
     hexadecimal numbers.

  o  The compiler ignores commas, but you can use them to  make  value
     specifications easier to read.


Usage Notes

  o  Only VAX COBOL supports this feature.  Other language  processors
     ignore the CONDITION NAME clause.

  o  Each CONDITION NAME clause  defines  one  condition  name.   Each
     condition name can represent a discrete value, a range of values,
     or any combination of these.

  o  You can use the CONDITION NAME clause as many times as  you  wish
     within a field description.

  o  The values low_val and high_val must be legal values  as  defined
     by the data type declared for the field.

  o  The length of a literal you specify in a  CONDITION  NAME  clause
     can not exceed the length declared for the field.

  o  You can specify a fixed point number as the value  of  any  field
     whose   valid   VAX  COBOL  data  type  is  not  DATE,  TEXT,  or
     UNSPECIFIED.

  o  You can specify a floating point number as the value of  a  field
     whose   valid   VAX  COBOL  data  type  is  not  DATE,  TEXT,  or
     UNSPECIFIED.

  o  You can specify a quoted string as the  value  only  of  a  field
     whose valid VAX COBOL data type is DATE, TEXT, or UNSPECIFIED.

  o  You can use 8-bit characters in CDDL quoted strings.

  o  You can specify an octal number as the value  of  any  valid  VAX
     COBOL  data  type.   In  order  to specify an octal number, place
     single quotation marks (') around the number and precede it  with
     %O; for example,

     VALUE IS %O'16'


  o  You can specify a hexadecimal number as the value  of  any  valid
     VAX  COBOL  data type.  In order to specify a hexadecimal number,
     place single quotation marks (') around it and  precede  it  with
     %X; for example,

     VALUE IS %X'3E'


  o  Value n2 must be greater than or equal to value n1 in the field's
     collating sequence.

  o  Value n4 must be greater than or equal to value n3 in the field's
     collating sequence.


Example

 The following example defines three valid conditions according to the
 value of the field RECORD_IDENTIFIER.

 RECORD_IDENTIFIER       DATATYPE IS TEXT
                         SIZE IS 1 CHARACTER
                         CONDITION FOR COBOL IS ON_HAND
                             COBOL NAME "ON-HAND"
                             VALUE IS "S"
                         CONDITION FOR COBOL BACKORDER
                             COBOL NAME "BACKORDER"
                             VALUE IS "B"
                         CONDITION FOR COBOL OUT_OF_STOCK
                             COBOL NAME "OUT-OF-STOCK"
                             VALUE IS "O"
                         CONDITION FOR COBOL IS INVALID
                             VALUES ARE "A", "C" THRU "N",
                             "P" THRU "R", "T" THRU "Z".

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026