Using the Record Dictionary
The Record Dictionary provides the information for identifying and locating records and fields within records. The Record Dictionary is an ASCII file you can create using any ASCII editor. Used with the Condition table, any variable in the Record Dictionary can be used in a conditional evaluation. For more information about the Condition table, see Using Condition Tables.
Record Dictionary information is divided into two sections:
- Record section, which describes the records
- Variable Definition section, which describes the fields contained in the records
For more information about the Record Dictionary, see Using the Record Dictionary for Variables.
Record definition syntax
Record Name = Search(Column, Search Mask) {Repeating}
Parameter |
Description |
Record Name |
The name the record will use in the future. A record name begins with an alpha character and can have a maximum of 30 characters. You can have only one description for a given record name. Record names are not case sensitive — you cannot define both BASE and Base. |
Search |
Keyword |
Column |
Starting column number to search. |
Search Mask |
Text to search for in the record columns. |
Repeating |
(Optional) Keyword used to indicate there may be multiple records of that type in a transaction. |
Here are some examples:
< Records >
Message = Search(61,01) Repeating
Account = Search(61,02)
Variable definition syntax
Variable = Record(name) Offset(n) Length(n) Type(x)
Variable = GVM(name) Offset(n) Length(n) Type(x)
Variable = Record(name) Offset(n) Length(n) Type(x) Rule(name) Format(flags)
Variable = Record(name) Offset(n) Length(n) Type(x) Format(flags) Precision(n)
Parameter |
Description |
Variable |
The name future references to this variable will use. A variable name begins with an alpha character and can have a maximum of thirty (30) characters. |
Record(name) |
(Optional) Identifies the record in which this variable will be found. This parameter is mutually exclusive when using GVM. |
GVM(name) |
(Optional) The name of the global variable to use. This parameter is mutually exclusive when using Record. Also keep in mind a rule is not necessary with the global variable. |
Offset |
The offset into the record where the data is located. |
Length |
The length of the data. |
Type(x) |
(Optional) May be either Char, Num, Zone, or Packed. Char is character data. Can be any string of alphanumeric characters and symbols. Num is numeric data. Can have a sign in front and a decimal place. Zone is zoned decimal. Looks like a numeric value except the sign is added to the last digit. Packed is packed decimal. |
Format(flags) |
(Optional) Similar to the flags used with the MoveNum rule except the input flags (such as input length and precision, S, and B) are not needed. |
Rule(name) |
(Optional) You can include any field rule such as DateFmt or SetAddr2. The Move_It and MoveNum rules are inherent to the Record Dictionary, so you do not need to call them. If you omit a rule, the Move_It rule functionality is the default. |
Precision(n) |
(Optional) The number of decimal places for a numeric variable. |
Here are some examples:
< Variables >
MSGTYPE = Record(Message)Offset(41) Length(1) Type(Char)
MSGGID = Record(Message)Offset(37) Length(2) Type(Zone)
GRPHID = Record(Graph) Offset(31) Length(8) Type(Packed)
PRTCOND1 = Record(Graph1) Offset(31) Length(8) Type(Num) Format(C)
PRTCOND2 = Record(Graph2) Offset(31)Length(8)Type(Num)Precision(5)
Total = Record(Address)Offset(50)Length(50)Rule(SetAddr2)
* OMR
RCBBATCH = GVM(RCBBatchName)Length(32)Type(Char)
INI options
You must use the Name option to define the name of the Record Dictionary.
< DataDictionary >
Name = (file name of the Record Dictionary)
Place the Record Dictionary file in your DEFLIB directory.
Sample Record Dictionary
Here is a sample Record Dictionary definition:
*
* This is the Record Dictionary
*
* These are the Records
* The only parameter is the record search mask. This can only be
* used for non-repeating records.
<Records>
Message = Search(61,01) Repeating
Account = Search(61,02)
MeterRead = Search(61,03) Repeating
Detail = Search(61,18) Repeating
*
*
* These are the variable definitions
* The required fields:
* Record name defined in the above section
* Offset into the record where the data begins
* Length of the data
* Optional fields:
* Formatting routine (data as is will be the default)
* Type or input format (not currently used)
<Variables>
***** The following are examples. All white space is ignored. ****
*
* AcctNum = Record(Header) Offset(4) Length(15) Type(Char)
* MessageText = Record(Message) Offset(53) Length(38) Type(Char)
* CompanyCode = Record(Header) Offset(24) Length(2) Type(Char)
* CustomerName = Record(Client) Offset(22) Length(21) Type(Char)
* NoticeDate = Record(Client) Offset(79) Length(8) Type(Num) Rule(Date) Format( )
* CashReceived = Record(Client) Offset(313) Length (10) Type(Zone) Rule(MoveNum) Format(10.2,13.2,$,S-)
*
ACSA = Record(Account) Offset(487) Length(10) Type(Zone) Rule(MoveNum) Format(10.2,14.2,S-,C)
ACSC = Record(Account) Offset(497) Length(10) Type(Zone) Rule(MoveNum) Format(10.2,14.2,S-,C)
ACBB = Record(Account) Offset(436) Length(10) Type(Zone) Rule(MoveNum) Format(10.2,14.2,S-,C)
BMV1 = Record(Message) Offset(159) Length(15) Type(Char)
BMV2 = Record(Message) Offset(174) Length(15) Type(Char)
BMV3 = Record(Message) Offset(189) Length(15) Type(Char)
BMV4 = Record(Message) Offset(204) Length(15) Type(Char)
BMV5 = Record(Message) Offset(219) Length(15) Type(Char)
DTAT = Record(Detail) Offset(163) Length(10) Type(Zone) Rule(MoveNum) Format(10.2,14.2,S-,C)
DTV1 = Record(Detail) Offset(181) Length(18) Type(Zone) Rule(MoveNum) Format(18.8,18.2,S-,C)
DTV2 = Record(Detail) Offset(199) Length(18) Type(Zone) Rule(MoveNum) Format(18.8,18.2,S-,C)
DTV3 = Record(Detail) Offset(217) Length(18) Type(Zone) Rule(MoveNum) Format(18.8,18.2,S-,C)
DTV4 = Record(Detail) Offset(235) Length(18) Type(Zone) Rule(MoveNum) Format(18.8,18.2,S-,C)
DTV5 = Record(Detail) Offset(253) Length(18) Type(Zone) Rule(MoveNum) Format(18.8,18.2,S-,C)
DTVM1 = Record(Detail) Offset(271) Length(15) Type(Char)
DTVM2 = Record(Detail) Offset(286) Length(15) Type(Char)
DTVM3 = Record(Detail) Offset(301) Length(15) Type(Char)
*
***The following is the grouping that is defined for messaging*
*
MsgLinePriority = Record(Message) Offset(96) Length(5) Type(Zone)
*
*
==============================================================
See also
© Copyright 2020, Oracle and/or its affiliates. All rights reserved. Legal notices.