3.1.2 Format
TABLE table_name or table_name TABLE | |
  |
DESC | One line description about the table. (optional) |
One or more lines of descriptive text about the table. Can be up to 4,000 characters in length. |
END |
  |
URL | One line URL. (optional) |
One or more lines for a URL. Can be up to 250 characters in length. |
END |
  |
For each column ... |
Column Name | One line description about a column. (optional) |
  |
DESC | One line description about a column. (optional) |
One or more lines of descriptive text about column. Can be up to 4,000 characters in length. |
END |
  |
URL | One Line URL. (optional) |
One or more lines for URL. Can be up to 250 characters in length. |
END |
  |
FORMAT | One line describing format for column. (optional) |
One or more lines describing format for column. Can be up to 250 characters in length. |
END |
  |
VALUES |
VALUE_1 (30 characters max) | Description for VALUE_1. (250 characters max) |
VALUE_2 | Description for VALUE_2. |
VALUE_3 | Description for VALUE_3. |
VALUE_N | Description for VALUE_N. |
END |
Repeat above format for each column in table. |
All entries above are optional.
For example, a Column Name can be defined using only a DESC keyword, or DESC and VALUES, or use DESC, URL, FORMAT, and
VALUES.
For the DESC, URL, and FORMAT keywords, the column's description, URL, and format can be defined after the keyword
using a single line of text.
Optionally, DESC, URL, and FORMAT can be defined using one or more lines of text by using the END keyword to delimit the text.
The VALUES keyword requires using one or more lines of text to define the values for a column and must end with the END keyword.
A value can be up to 30 characters in length while the value description can be up to 250 characters in length.
+1DataDictionary will issue a warning if you try to write a multiline description starting on the same line as
the column name, DESC, FORMAT, or URL keyword even if you delimit it with an END statement.
For example, the following DESC will generate a warning message:
MY_COLUMN_NAME
DESC This is a one line description for a column
which is found on three lines
with or without an END keyword.
To clear up the generated warning message, you can type either:
MY_COLUMN_NAME This is a one line description ... an END keyword.
or:
MY_COLUMN_NAME
DESC This is a one line description ... an END keyword.
or:
MY_COLUMN_NAME
DESC
This is a one line description for a column
which is found on three lines
with or without an END keyword.
END
Why does +1 support the URL option?
Many large programs are written to standards or requirement documents.
Most standards can now be found on the Internet.
For example, valid Reject Reason Codes with their definition can be found
in the Health Care Eligibility Inquiry and Response standard.
If a column in the database stores the Reject Reason Code, the URL can provide a direct link
to where this column is defined in the standard which in turn allows you and others
to understand the column faster.
To generate comment templates for all tables and columns found in each table,
use the "-t" or "-T" options for +1DataDictionary.
Both options will create or overwrite .txt files found in the comments/templates.dir directory.
The -t option creates short comment templates allowing you to write just the DESC sections
for a table and columns.
The -T option creates long comment templates allowing you to write the DESC and URL for a table
and DESC, URL, FORMAT, and VALUES sections for columns found in the table.
To use the actual .txt files created, you must first move these files up one level to the comments directory.
Be careful not to overwrite any existing .txt files in the comments directory!
3.1.3 Example
TABLE RECIPIENT
DESC The RECIPIENT table contains information on all hospital recipients.
URL http://plus-one.com
LAST_NAME Recipient's Last Name
FIRST_NAME
DESC
Recipient's First Name
END
AGE
DESC Recipient's Age
PHONE Recipient's Phone Number
FORMAT 999-999-9999
LONG_TERM_CARE
DESC
Provides recipient's long term care coverage.
END
URL http://health-care-national.com
FORMAT 99
VALUES
1 Coverage
0 No Coverage
END
LAST_UPDATE
DESC
Last time recipient's information was updated.
END
FORMAT DD-YYYY-MON
Based on the above comments/RECIPIENT.txt example, +1DataDictionary will generate the following HTML output for the RECIPIENT table.
RECIPIENT Table Comments
Table - Sorted Table - Copybook - Control File - Create Table - Comments - Row Size - Back To Table Index