DATANAMES.DAT
- the Flat File Describing Datanames
This file contains information describing the datanames used in
the WebTables interfaces.
One copy of this file exists for each interface set.
The main body of the file is a set of dataname blocks,
each consisting of a dataname line followed by additional descriptive lines.
This is proceded by a set of global defaults and some other overall paramaters.
Thus from top to bottom, the file contains:
Edit this file to add new datanames to the interface pages,
to remove datanames from the interface pages or to
change other information associated with a given dataname.
Then, to implement the changes, call WTFORMWRITE.COM,
the Interface Form Writing Exec, as described below.
Pay careful attention to spacing when editing this file.
The column position of the colons must not be changed.
- invalid
- sets initial state of invalid handling toggle
- table
- One for each table referenced in the interface set
- two letter abbreviation to be used for owner name.table name
- owner name.table name
- primary key element name
- datatype of primary key element
- abbreviation of primary key element name
- join
- join statements to connect tables. Only needed if interface set has more than one table.
If there are more than two tables, all join statements must have the same table on the right.
If a set of tables is found that cannot be joined in this way, the join code in WTQUERY
will have to be made more complex.
- qualifier
- One for each qualifier radio button or checkbox. Some interface sets have none.
- qualifier text
- url fragment encoding the qualifier (see URL discussion in WebTables help file, with the
exception that we use Q here instead of R, to denore Qualifier instead of Range)
- RADIO for radio button, CHECKBOX for checkbox
- button set name (must be same for all radio buttons that are to toggle one another)
- CHECKED for initial state checked on
- description
- line of descriptive text for the qualifier's glossary file
- crosslink
- directory name of another interface set to be accessible from links at the bottom of
this interface set. Some interface sets have none.
Each of the following lines establishes a global default to be used
throughout this interface set.
These defaults can be overridden for any individual dataname
by specifying an appropriate line in the individual dataname block.
See the discussion of the individual dataname blocks for details.
- default_datatype
- default_nickname
- default_owner
- default_simpleuse
- default_numfrom
- default_numto
- default_datefrom
- default_dateto
- default_charfrom
- default_charto
- default_rangelast
- default_numprec
- default_dateprec
- default_errortype
- default_ymin
- default_ymax
The first line of each block must be a dataname specification.
Other lines can come in any order and may be omitted if the
corresponding global default is appropriate.
Each line should appear at most once per dataname block,
with the exception that any number of description lines are permitted.
Global defaults are available for all lines except
- dataname (always unique)
- description (always unique)
- select (default is to derive this from dataname)
- exclude (default is to derive this from dataname)
- badness (default is to derive this from dataname)
- dataname
-
the handles by which one describes what is to be plotted.
They appear in the URLs that are passed to WTINTERMED.COM and to WTQUERY.
They most often correspond to abbreviations for Oracle element names.
- if datatype is NUMBER, DATE, CHAR or VMSFILE:
dataname is an Oracle element specification.
It could contain the detailed specification, Owner_Name.Table_Name.Element_Name,
but since this ends up making URLs too long, it instead starts with one of the
two letter abbreviations for an owner name and table name specified in the
Overall Parameters for this interface set.
in a few special cases, such as RL.RUN_LENGTH in the SLD Main Tables,
a made up element_name is used, whose real interpretation
is revealed in the subsequent SELECT line.
- if datatype is LINK:
dataname can be anything unique.
The important information is contained in the extra parts of the datatype statement.
- if datatype is CONSTANT:
dataname is a number (with or without a decimal point)
- if datatype is HEADER:
dataname is a string to be written as a header line in the simple interface.
- if datatype is RELABEL:
dataname is irrelevant (but the convention is to also make it RELABEL).
It just indicates that the simple interface's submit gif should be repeated at this point.
- datatype
-
indicates what type of information is expected from a given dataname.
Both datatypes VMSFILE and LINK can result in output that is a link to a file on disk.
The difference is that, while VMSFILE datanames have a full VMS file specification
stored in Oracle, LINK filenames build a VMS file specification (or other URL)
on the fly, getting a particular number or date from Oracle and substituting this into
a set pattern.
See the various DATANAMES.DAT files for examples.
- select
- fragment of SQL code to be used for this dataname's part of the SELECT statement.
Can be used to perform operations such as DECODE.
See the various datanames.dat files for examples.
- if datatype is NUMBER, default is just to select the dataname
- if datatype is DATE, the default is to select the dataname rounded as specified
in DATEPREC
- if datatype is CHAR, the default is an elaborate set of string replacement operations
to remove special characters that are used by the WebTables System as delimiters
and to replace c language special characters with html markup equivalents.
This procedure is probably more complex than absolutely necessary.
It evolved out of trying to fit SLC CATER's long paragraph style CHAR datatypes
and some of the other recent LINK datatypes
into a system that was originally designed to just handle single words.
The order of operations in this sequence is important.
- & is replace with "a-t-s-n" so that & can be used in place of space
- space is replaced with & so that space can be used as wtquery's output delimiter
- double quote is replaced with & (which will then translate to space)
so that dcl can handle it
- backslash n is replace with html break markup so that the paragraph will
break as desired
- question mark is replace with "q-m-r-k" so that question mark can be used as wtquery's
other output delimiter (separates number invalid from actual data)
- the result is truncated to 300 characters so that resulting lines of markup plus
output fit have a decent chance of fitting into dcl's string length limits
The first two items together allow the very common character, space, to be replaced
by a nice short character, &, thus reducing the chance that the final string will
get so large that it needs to be truncated.
Note that when a select line is used,
the Oracle elements must always be specified fully as
owner.table.element, never just as table.element.
This is necessary for WTQUERY to correctly form the from_phrase.
- exclude
- fragment of SQL code to be used for this dataname's part of the WHERE statement.
Used to figure out what Oracle rows to exclude when user selects "exclude Oracle rows
that contain invalid data".
Can be used to have the system consider a given dataname invalid when some other
dataname has some particular value.
Default is "WHERE IS NOT NULL".
See the various datanames.dat files for examples.
Note that when an exclude line is used,
the Oracle elements must always be specified fully as
owner.table.element, never just as table.element.
This is necessary for WTQUERY to correctly form the from_phrase.
- badness
- fragment of SQL code to be used for the part of the select statement that counts
how many rows had invalid data for the given dataname.
One could use this to have the system count a given dataname as invalid when some other
dataname has some particular value.
Default is "DECODE(select,NULL,1,0)"
See the various datanames.dat files for examples.
Note that when a badness line is used,
the Oracle elements must always be specified fully as
owner.table.element, never just as table.element.
This is necessary for WTQUERY to correctly form the from_phrase.
- nickname
- name to be used in column headings
- owner
- the Glossary file will show this person as the one to receive
complaints about the following description
- description
- detailed description to be presented in glossary.
This should include any comments that might help users decide whether
this is really the information they are expecting.
Any number of lines of description can be included for a given dataname.
HTML markups are permitted within the description lines.
- simpleuse
- two characters, each either Y or N, denoting whether this dataname is to be used
with either of the two columns of the simple interface
- numfrom
- initial value for FROM, INCLUDES, EQUALS and NOT EQUALS input areas
for datanames of type NUMBER
- numto
- initial value for TO input areas for datanames of type NUMBER
- datefrom
- initial value for FROM, INCLUDES, EQUALS and NOT EQUALS input areas
for datanames of type DATE
- dateto
- initial value for TO input areas for datanames of type DATE
- charfrom
- initial value for FROM, INCLUDES, EQUALS and NOT EQUALS input areas
for datanames of type CHAR
- charto
- initial value for TO input areas for datanames of type CHAR
- rangelast
- initial value for LAST input areas
- numprec
- number of digits to the right of the decimal place to be displayed
for datanames of type NUMBER (rounding is applied in colmath.exe)
- dateprec
- precision to be used for datanames of type DATE
(rounding is applied in Oracle via WTQUERY).
- W show day of the week
- Y truncate to year
- M truncate to month
- D truncate to full date
- H truncate to hour
- T truncate to minute
- * do not truncate (will show to the second)
Keep in mind that the database only contains date, no time, for some datanames.
- errortype
- the only options currently supported are POISSON (for Poisson error bars)
or blank for no error bars
- ymin
- initial value for YMIN plot scale input areas.
Can be either a real number or the string "AUTO" (meaning autoscale).
- ymax
- initial value for YMAX plot scale input areas
Can be either a real number or the string "AUTO" (meaning autoscale).
Joseph Perl
3 October 1997