File Management Software

Data Dictionary Maintenance

Last Revised: 11/04/16

This program is used to describe the contents of data files, temporary work files, and templated data structures used by programs.

It is also used to maintain Views, which is an ordered collection of fields. It is also used to describe File Maintenance applications, which uses an ordered collection of Views to provide routine File Maintenance applications while writing little or no code.

Main View

Fields

Key Structure

Views

File Maintenance

Define/Convert Data File

Export to Basis Data Dictionary

 

Main View

Field# Heading Description
  Data Dictionary Name Dynamo typically uses a 6 character file name that starts with the two character company code.  The data dictionary should only include that portion of the file name that follows the company code.  In this example, the file name is DSCM01, the company code is DS, so only CM01 is needed here.  You may store files with names up to 10 characters long (excluding the 2 character company code).

Data Dictionary Maintenance can also be used for describing other data structures that are used to store data and transfer between programs.  The Dat Dictionary Name field would often refer to the string variable name used (excluding the trailing dollar sign).  For example, program CM040 has a data structure used to pass information to and back from CM040.  The File Name field in that example would be CM040.  The company used to store the Data Dictionary for program templates should be the same as the folder where the program is located.  In this example, the CM040 program is located in the DY/ directory, so company DY should be used to store the Data Dictionary.

 

Temporary work files should also be described in the Data Dictionary.  Temporary files are designated using a period following the Data Dictionary Name.  The CM040 program, for example, creates a work file.  This work file has a data dictionary file name of CM040. (including the period at the end).  No other periods may appear in the Data Dictionary Name.

1 Description Up to 40 characters.
2 File Type Use the 3 character file types used in Dynamo
File TypeDescription
MKYMulti-keyed MKEYED file.  This is the most popular and recommended file type for all files.  Supports multiple keys or indexes.
MKXMulti-keyed XKEYED file.  Requires BBj.  Allows for more KNUM's and segments that MKY.
MKJMulti-keyed JKEYED file.  Requires BBj.  Supports journaling and transactions
MKVMulti-keyed VKEYED file.  Requires BBj.  Similar to MKX except MKV support variable length records, named key chains, dynamically add, change, and drop key chains, and enables storing the template within the file itself, eliminating the need for the .tpl template file.
SKYSingle-keyed MKEYED files.  Supports only a single key or index.  Requires KEY= on new WRITE's.  Best to use a MKY file, even if at first you only expect to need a single key.
SKXSingle-keyed XKEYED file (BBj only).
SKJSingle-keyed JKEYED file (BBj only).
SKVSinlge-keyed VKEYED file (BBj only).
DIRDirect files.  Obsolete format replaced by SKY files.  File cannot be dynamic.
SRTSort files, i.e., keys but no data.  Obsolete format, also replaced by SKY files.  File cannot be dynamic.
INDIndexed files have no key associated with the data.  Records can be read sequentially, or by relative record number.
SERSerial files, primarily used for spooled reports.  No keyed or random access.
PGMProgram files.
3 Path

The Path is optional. The Path is used by Dynamo Tools when defining a data file based on the Data Dictionary. You can use the File Utility (SMU) or called program CDS034 to define data files.

If the Path is not provided, the data file will be defined below the Dynamo Tools Base directory (SMSDIR)/XX/XXDDNAME, where XX represents the Dynamo 2 character company code, .i.e., /u/CDI/CD/CDSM08.

When a Path is provided, the data file will be defined in the specified path.

If the path is relative, i.e., does not begin with /, then the path is relative to SMSDIR.

The Path must end with the Data Dictionary Name, and may optionally include the Company Code.

Examples:

/usr0/RL/DATA/FBHDR
XX/data/XXPO40
/u/spi5/data/ORDER_H

4 Menu Code Store the 3 letter menu code that this file is most likely to be associated with.  It is used by the F menu option to display file information for files associated with the menu.  It does not apply to dictionary entries of file type PGM nor for temporary work files.
5 Key Size Specify the key size in this field for SKY, DIR, and SRT data files. The key structure for MKx files is defined using the Key Structure View.
6 Record Size Only required when there are variable length fields in the record, and you want to define the data file with more or less than the number of characters required based on the record structure.  If non-zero, this field will be used to override the computed records size when defining a data file.
7 File Notes Notepad text typically used to describe how records are added, changed, and removed, and to describe the usage of each KNUM.

Fields

Record Structure - Main Display
Field Name This is the bbx compatible template field name.  It can be up to 16 characters containing letters, numbers, and underscore, and must begin with a letter.


Field names in the format FSn where n is a number have special significance in Dynamo Tools.  They indicate that the field represents a field separator, used in files that still use an IOLIST for reading and writing data.  In the example above FS1 is the first field separator in the record.  Note that the NAME field is variable length and does not have an FS2 field following it.  This is because the NAME field truly is variable in length, where the CUSTNO field is always 6 characters long, and thus requires a template type of C(6) and not C(6*).

It is our recommendation, that any new file use fixed length fields, and no field separators.  The CVS() function can be used to strip trailing blanks from fields when required.

Link to The Dynamo Data Dictionary allows you to define a field once, and then refer to the primary definition in all data structures that also contain that field.  This is an important design concept of the Data Dictionary.  When any field attributes of such a linked field are changed, then all references to the field reflect that change.  Note that the linkage is prompted based on a common field name.  You are not required to link fields with the same name, so that the field NAME in the customer file, does not have to be the same as field NAME in the vendor file.
Repeat If the field is a repeating field, then the maximum repeat is stored here.
Template Type This is the bbx template type.  A character type is assumed, so an entry of 10 will display as C(10).  An entry of 10* will display as C(10*).  An entry of N5 will display as N(5).  The * indicates variable length, but unlike bbx, Dynamo assumes the number before the * is the maximum length of the field.


For new files, we recommend using fixed length field types.  The CVS() function can be used to strip trailing blanks from fields when required.  We also recommend using B type fields for all numeric fields that have fractional places such as any field containing amounts of dollars and cents.

We also suggest using U(3) fields for all dates, and storing the date in the julian format.  The DATE() function can be used when required to format this internal date value.  However, the Dynamo Data Dictionary will support dates in C(8) format: MM/DD/YY, C(6)/N(6) format: YYMMDD, N(5) format using the Microsoft serial# date, or C(8)/N(8) format: YYYYMMDD.

Note that unlike bbx that uses -1 as the julian date value for a field without a date, and 0 to indicate today's date, Dynamo considers a date with a value of 0 as a field without a date.  This definition eliminates the need to populate newly dimensioned string templates containing date fields with -1 values.

Mask The Mask is similar to a bbx mask, with the addition of the floating decimal format and the elapsed time format.  The best practice is to store the preferred mask in the data dictionary, and not specify a mask when using other Dynamo Tools such as CDS037 and CDS038.  You may need a mask in CDS038 when printing totals, where the total could be larger than what could be displayed using the mask that is used for a single field.
Numeric field typeExamplesNote
regular numeric###
#,##0
-###,##0
-###,###.00
###,###.00CR
Any valid bbx mask can be used
floating numericN4.3
N7.4
N8.1
A floating numeric only displays the decimal point and negative indicator when required.  It is useful for numbers such as quantities, that are almost always whole numbers, but could include a fractional part.  Floating numeric masks are in the format of Nx.y where x is the maximum number of characters to be displayed, and y is the maximum number of places to the right of the decimal point.
date%Mz/%Dz/%Yz
%Ds %Mz/%Dz/%Yz
Any mask that can be used in the bbx DATE() function for dates can be used
time%hz:%mz %p
%Hz:%mz:%s
Any mask that can be used in the bbx DATE() function for time can be used
elapsed time%HHHH:%mzThe number of H's indicate the number of digits for the hours.  This mask will show hours and minutes.  You can use a mask such as ####.00 to show hours and fractional hours.

There is an optional window containing additional attributes of each field described below.

Record Structure - Additional Attributes
Column Title The column title should contain a short but descriptive heading that will be used by Dynamo Tools such as CDS037 and CDS038.  Avoid long column titles for short data fields and the columns required to display or print the column title limit what can be displayed or printed on a single row.  Note that the Column Title is optional and should not be specified when it can be derived from the field name.  When the column title is not specified, it will be the same as the field name, converted to proper case, and with any trailing "NO" for number, replaced with a #.  Field name of ITEMNO becomes Item#.  You may enter leading blanks in the column title in order to right justify the title over a column of right justified data.
Description

The description field is also optional, and only used during File Maintenance or by a View Manager, such as CDS550 or CDW550. It may be the same as the field name or column title, but is typically longer and contains spaces when required.

If the field is repeating, then the index will normally be included within square brackets and follow the description in a view, i.e.,
Special Instructions[1]
Special Instructions[2]
Special Instructions[3]
However, there are times where the index should be omitted, especially when the field uses a T type called routine.  To omit the index and square brackets, add a period to the end of the Description.

Data Entry Type This is the data entry type used in CDS039/CDS069.
TypeDescriptionApplies to string template fieldsApplies to numeric template fields
AAlpha-numericYN
LLeft justified alpha-numericYN
RRight justified alpha-numericYN
aAlpha-numeric, null permittedYN
lLeft justified alpha-numeric, null permittedYN
rRight justified alpha-numeric, null permittedYN
JDate stored in julian formatNY
jDate stored in julian format, zero value permittedNY
DDate form mm/dd/yyYN
dDate form mm/dd/yy, null permittedYN
SDate form yymmddYN
sDate form yymmdd, null permittedYN
*PasswordYN
WWindow textYN
CCalled routine - Custom (deprecated)YN
XCalled routine - External (deprecated)YN
TCalled routine - TemplateYY
Upper Case Specify as U to cause data to be displayed and stored in upper case.  Only applies to selected data entry field types.
Minimum
Data Entry Types Usage
A, L, R, a, l, r, * The minimum number of non-blank characters required.
J, j, D, d, S, s The minimum value has several different meanings for dates.

Zero indicates no restrictions.
Values of julian dates indicate the minimum date permitted, i.e., JUL(2007,24,7).
Values between 74 and 99 indicate a minimum value of Jan 1, 19xx where xx is the value passed. (Functional but obsolete).
Values under 1900 represent the number of days after the current date.
Values between 1900 and 3000 represent Jan 1 of the year with the value passed.

W The number of columns for the window text
C, X, T Passed to external routine
Maximum
Data Entry Types Usage
A, L, R, a, l, r, * The maximum number of characters required.
J, j, D, d, S, s The maximum value has several different meanings for dates.

Zero indicates no restrictions.
Values of julian dates indicate that is the highest date permitted, i.e., JUL(2007,12,31).
Values between 74 and 99 indicate a maximum value of Jan 1, 19xx where xx is the value passed. (Functional but obsolete).
Values under 1900 represent the number of days after the current date.
Values between 1900 and 3000 represent Dec 31 of the year with the value passed.

W The number of rows for the window text
C, X, T Passed to external routine
Notes Notepad text that can be used to describe additional information about the field.
Verification Additional validation that can be done to insure the entered data is in a list or on file.

File Verification Parameters
Related File The file name (including company code) used for to validate the entered data
KNUM The KNUM of the Related File to use when validating the entry
Display Fields An optional pipe separated list of field names, in the Related File, that should be displayed during the F2 window of valid records.  Example: NAME|CITY|ST.
Display Position The Display Fields can be displayed to the Right of the entry, Below the entry, or N for not displayed.
Auto Display List Y indicates that the list of valid entries should be displayed without during initial entry without requiring the operator to touch the F2 key first.
Key Prefix Any additional text that precedes the entered value in the key of the related file.
Window Title Optional text to appear in window border listing valid values.

Related Field List Parameters
Display Position The Display Fields can be displayed to the Right of the entry, Below the entry, or N for not displayed.
Auto Display List Y indicates that the list of valid entries should be displayed without during initial entry without requiring the operator to touch the F2 key first.
Field Title Optional text to appear above column of valid values during entry.
Window Title Optional text to appear in window border listing valid values.
Verification List A list of field values along with text to display to the right of the value.

Key Structure

This view is used to maintain the key structure of MKx data files. The fields should be entered prior to describing the key structure.

The keys are listed in KNUM order with KNUM=0 at the top of the list. You can Insert, Delete, and Paste keys.  Move the * down to the desired key and touch the Enter key to edit the Key Structure.

Select each key segment from the list of Fields, enter the Index of the Key Segment is a repeating field, sub-string expression if applicable, as well as any special options. The options include B for Business Math fields (should always be used for template type B fields), D for Descending sequence, and U for Unique secondary keys.

 

Define/Convert Data File

This option is used to define or convert an existing data file to match the current Data Dictionary. It is essentially the same as the Compare to Data Dictionary Option withing the File Utility (SMU), but also available here for convenience.

Note that when it is necessary to rename an existing field in a data file that has records, it is best to use the Data Dictionary File/Field Rename application on the FMS menu, as it will also change the template file.

 

Export to Basis Data Dictionary

This option is used to export the Dynamo Tools Data Dictionary for the current Data Dictionary Name, to the Basis Legacy Data Dictionary. This eliminates the need to manually maintain the Basis Data Dictionary using the Basis Enterprise Manager. This function is the same as the 'Update Basis Data Dictionary from Dynamo Data Dictionary' option in the 'Basis Data Dictionary Maintenance' application on the FMS menu, but also available here for convenience.