1 05/15/85  mrds.cmdb_source.gi.info
 2 
 3 Syntax:  The basic syntax of the source text is as follows.
 4 
 5               domain: domain_name1 declaration1 {options1} {,
 6               ...,
 7               domain_nameN declarationN {optionsN} } ;
 8 
 9   {attribute: attr_name1 domain_name1 {,
10               ...,
11               attr_nameN domain_nameN} ; }
12 
13     relation: relation_name1 (attr_name1* attr_name2*...attr_nameN) {,
14               ...,
15               relation_nameN (attr_name1* attr_name2*...attr_nameN) } ;
16 
17       {index: relation_name1 (attr_name1 attr_name2...attr_nameN) {,
18               ...,
19               relation_nameN (attr_name1 attr_name2...attr_nameN) } ; }
20 
21 
22 Function:  This file describes the format of the data model definition
23 source text that is input to the create_mrds_db command for creating an
24 unpopulated mrds data base.  The source segment must have cmdb as a
25 suffix.
26 
27 Semantics:  The relation statement defines that relationI is to be made
28 up of the attributes whose names are given, and that those attribute
29 names followed by an asterisk, are to be part of the key field for
30 searching that relation.
31 
32 
33 The domain statement specifies the data type that a domain, and by
34 default an identically named attribute, will assume.
35 
36 The attribute statement defines additional attributes to have the data
37 type of the corresponding domain whose name is given.
38 
39 The index statement specifies which attributes for relationI are to be
40 secondary indexed, to provide for faster searching.
41 
42 
43 In the domain statement, declarationI is a PL/I data type declaration
44 for any signed binary or decimal numeric data type, or bit or character
45 string type.
46 
47 All names for domains or attributes can be up to 32 characters long.
48 Relation names can be 30 characters long, starting with a letter, and
49 composed of letters, digits, underscores, and hyphens.
50 
51 
52 Domain options:  The options on the domain statement may be chosen from
53 the following.
54 
55 -check_procedure path
56    specifies the data verification procedure used for the domain.  The
57    procedure accepts the data value of the domain data type, and
58    returns 1 for OK, 0 for not, in a fixed bin(35) indicator.
59 
60 -decode_procedure path
61    specifies the procedure used to convert data bases into users data
62    type when retrieving.  The parameters are (db_value, user_value,
63    code), code = fixed bin(35) status code, db_value is input,
64    user_value is output, both of domain data type.
65 
66 
67 -encode_procedure path
68    specifies the procedure used to convert users to data base data type
69    when storing.  The parameters are (user_value, db_value, code), code
70    = fixed bin(35) status code, user_value is input, db_value is
71    output, both of domains data type.
72 
73 -decode_declaration declaration
74    specifies the declaration of the data type for user_value if it is
75    to be different than the domain data type for encoding/decoding.