THE TABLE SCREEN

HOW TO DEFINE TABLES

Up to ten different tables (0-9) may be defined
for each format.  An individual table may be used
by more than one field, as long as each field has
the same field length.  Pressing Alt+F1 will
switch the Format Generator to the Table entry
screen.  There are up to 200 lines that may be
used to enter tables.  Large tables should be
defined as external files for better efficiency.
The Home, End, PgUp, and PgDn keys may be used to
display a different set of 10 lines.  When the
table entry has been completed, pressing Alt+F10
will switch the Format Generator back to the
Heading or Attributes screens.

The first line of a table must be an "**T" line.
This starts the definition of a table.  The first
blank line or another "**" line will end the
definition for the table.  The fourth character
of an "**T" line is the table # (0-9).  The rest
of the line may be used for comments.  It is
recommended that the name or names of the fields
that will be validated by the table are placed in
the comment section.

Example:  **T2  Job Numbers

The following line(s) are then used for keying
the valid table values.  Each table value must be
keyed using the full length of the field (use
leading or trailing blanks as appropriate).
Separate each entry with a comma.  If a field may
be left blank in the data entry file, then be
sure to key a blank entry in the table.  A range
of valid entries may be entered with a dash (-)
between the entries instead of a comma.

Example: In the first example below the field may
not be left blank during data entry.  The valid
entries are (A,B,C,D,F,M,P)  only.  In the second
example, blank is a valid entry.

     **T2 Work Codes
     A-D,F
     M,P

     **T3 Job Numbers
        ,100,150,200-205,250,300,424

Signed numeric fields are generally not validated
using a table.  If however, this becomes
necessary, the last digit of a negative signed
numeric field must contain an overpunch code.
The "overpunch" codes are as follows:

     Ŀ
      Last Digit   EBCDIC   ASCII  
     Ĵ
           0         }     (space) 
           1         J        !    
           2         K        "    
           3         L        #    
           4         M        $    
           5         N        %    
           6         O        &    
           7         P        '    
           8         Q        (    
           9         R        )    
     

Example:

     To enter 235-  as a table entry: For an
     EBCDIC signed numeric field substitute 23N.
     For an ASCII signed numeric field substitute
     23%.

HOW TO DEFINE CUSTOM DATA TYPES

Custom Data Types are defined on the Table
screens.  Up to ten different Data Types (0-9)
may be defined for each format.  Pressing Alt+F1
will switch the Format Generator to the Table
entry screens.  When the Data Type coding is
complete, press Alt+F10 to switch the Format
Generator back to the Heading or Attributes
screen.

The example below shows the coding used to define
a custom Data Type used in the SAMPLE2 Format.
Any field that uses Data Type 1 in the SAMPLE2
Format could only be keyed with digits 0-9, or
the letters "A" or "B".

     **D1        Data Type for Part #s (Level #5)
     0-9,A,B     Digits, or letters A & B only

The first line of a Data Type definition must
contain "**D" in columns 1-3.  Column 4 of the
line contains the Data Type definition number of
0-9.  The rest of the line may contain comments.

A single line is then used to define all of the
valid characters that may be keyed into any field
that will be using this Data Type.  Separate each
entry with a comma.  A range of characters may be
entered by keying a dash (-) between the entries
instead of a comma.

The first character in the definition will
determine the shift and the case for the data
entry field.  If the first character is a digit
then the program will be in numeric shift,
otherwise it will be in alpha shift.  If the
first character is a lower case letter, then
lower case is allowed.  If the first character is
not a lower case letter, then the program will
automatically convert all alpha characters into
upper case as you key them into the field.

HOW TO DEFINE LOGIC ENTRIES

Up to ten different sets of Logic entries (0-9)
may be defined for each format.  Simply code an
"L" in the Field Type column and the Logic number
(0-9) in the Field Check column of any field to
be used as a Logic field.  An individual set of
Logic entries may be used by more than one field,
as long as each field has the same field length.
Pressing Alt+F1 will switch the Format Generator
to the Table entry screens, where Logic entries
are defined.  There are up to 200 lines that may
be used to enter the Logic entries.  The Home,
End, PgUp, and PgDn keys may be used to display a
different set of 10 lines.  When the Logic entry
has been completed, pressing Alt+F10 will switch
the Format Generator back to the Heading or
Attributes screens.

The first line of a set of Logic entries must be
an "**L" line.  This starts the definition of a
set of Logic entries.  The first blank line or
another "**" line will end the definition for the
set of Logic entries.  The fourth character of
the "**L" line is the Logic number (0-9).  The
rest of the line may be used for comments.  It is
recommended that the name or names of the fields
that will be used by the set of Logic entries are
placed in the comment section.

Example:  **L0 Trade Codes

The operator may then start keying Logic entries.
Each entry consists of a function to be performed
followed by a list of table values that will
cause the function to perform.  The valid
functions are F, S, or E.  "F" is used to switch
format levels, "S" is used to skip fields, and
"E" is used to signal an error condition.  F and
S must be followed by a 1 or 2 digit value for
the function.  The list of table entries start in
position 5 of the line and may not continue to
the next line.  Separate each table entry with a
comma.  To specify a range of values, use a dash
(-) instead of a comma between the entries.

Example: In the example below, the program will
automatically switch to format level #2 if the
operator keys "PRG" or "OPR" in the Trade Code
field.  The program will do nothing (Skip zero
fields) if the operator keys "blank", "WEL",
"PAI", "CAR", or "LAB" Trade Codes.  Any other
entries keyed will cause an error.  "Blank"
through "zzz" is a range that includes all
entries that the operator can key.

     **L0 Trade Codes
     F2  PRG,OPR       Switch to format level #2
     S0     ,WEL,PAI   Valid entries (do nothing)
     S0  CAR,LAB       More valid entries
     E      -zzz       All other entries invalid

The order that each function is defined can be
significant, as in the previous example.  If the
"E" line were placed first, all entries would be
considered in error.  By placing the "E" line
last, only those entries that did not get found
on the previous lines can cause an error.

HOW TO DEFINE EXTERNAL FILES

Up to 10 different External Files (0-9) may be
defined for each format.  The External Files may
be used to validate information keyed by the
operator, or may be used to supply information
that will be placed in the data entry records.
Up to 30 different External Fields (0-29) may be
defined for the External Files.

External Files and Fields are used in the Edit
screens for validation and substitution.
Pressing Alt+F1 will switch the Format Generator
to the Table entry screens, where External Files
and Fields are defined.  There are up to 200
lines that may be used in the Table screens for
the entries.  The Home, End, PgUp, and PgDn keys
may be used to display a different set of 10
lines.  When the coding is completed, pressing
Alt+F10 will switch the Format Generator back to
the Heading or Attributes screens.

     **F1  C:\DE\EMPMAST.SYS  9,1     Master File
     *EF1  3,7        Trade Code in positions 7-9
     *EF2  6,1        Employee # in positions 1-6

The first line of an External File definition
must contain "**F" in columns 1-3.  Column 4
contains the External File number 0-9.  The first
blank line or another "**" line will end the
definition.  Following the "**Fn" on the same
line, you must code the DOS filename of the
External File with any filename extension
included.  You may code a Path as part of the
filename, if desired.  If the Path is not
specified then the default drive and current
directory will be searched for the file.  Next on
the same line is the length of each record, a
comma, followed by the start location of the key
to each record.

External Fields may be defined on the following
lines for the External File.  The first 3
characters for External Fields are always "*EF"
followed by the External Field number 0-29.  The
length of the field, a comma, then the start
location of the field in the file is all that is
necessary to complete the definition of each
field.  Comments may be placed in the rest of the
line.

In the preceding example "EMPMAST.SYS" is defined
as External File #1.  The key to the file is
located starting in column 1 of each 9 character
long record.  2 different External Fields were
also defined.  Field #1 is located in columns 7
through 9, #2 is located in columns 1-6.

BUILDING EXTERNAL FILES

An External File must contain fixed length
records and fixed field positions.  The External
File may be down-loaded from a Host computer, or
it may be built directly on the PC using the Data
Entry Emulator or any other method that you have
available.  The file must be in ascending order
by a "key" that you will be using to access the
file.  You can use the DOS SORT command to sort
the file in the correct order, if desired.
Duplicate keys should be avoided.  The key is
used to locate records in the file using a Binary
Search routine.

If you have a large file to be searched, it would
be more efficient to strip out unneeded
information from the file, making a smaller
subset of the file.  The file should contain only
those fields and records that are necessary for
the Data Entry application.  The smaller the
record length, the faster the program will be
able to locate each record.

MAXIMUM CAPACITIES

There are 10 different custom Data Types that may
be defined.

There are 10 different Tables that may be
defined.

There are 10 different Logic entries that may be
defined.

A maximum of 200 Table lines may be defined in
each format.

Up to 10 different External Files may be defined
in each format.
**************** end of section *****************
