Wednesday | 04 DEC 2024
[ previous ]
[ next ]

UniVerse Dictionaries

Title:
Date: 2023-05-07

I wrote an ADD-DICT function that will let you add dictionaries. It lets you set up the attribute number and the attribute name. The attribute name is made an A type so it is the canonical name and the number is then a synonym to the name. The program also updates the @ attribute so that listing a record will list the new dictionary as well.

I like the way we do dictionaries at work so I'm continuing it as well. We haev a single A type that is the name and this works with a program that lists out just the A types of a file.

I also use pick style dictionaries and they have 10 fields.

The fields are:

1 TYPE
2 FIELD
3 DESCRIPTION
4 ASSOCIATION 
5 
6 
7 CONVERSION
8 CORRELATIVE
9 JUSTIFICATION
10 WIDTH

The type field can be A or S.The field is the attribute number that this is a dictionary for.The description is the column heading and will display when a record is listed.The association is how this attribute relates to others, I haven't used it so I'm not sure what it looks like.The conversion is how to display the value, this can be a MD conversion or D for date.On the correlative line you can have an A correlative or an F correlative.The justification is L for left or R for Right.The width is how many characters to show when listing a value.

There are also I type fields that call subroutines. This is quite handy when you want to do complex things when listing a value. This is usually when an F correlative is starting to get unwieldy.