Input File commas-n'-quotes conversion
If CQ is specified, input files are converted from
commas-n'-quotes format, according to the rules described in the
previous section.
This will always happen before anything else, since ADB's "native
mode" deals with
fixed-length records. This is why I often refer
to commas-n'-quotes conversion (for input files) as "importation." Likewise,
commas-n'-quotes conversion for output files might be referred to as
"exporting."
Remember, string fields must have double quotes around them
when they're imported in commas-n'-quotes format,
although integer, fixed decimal, and "special" fields need not.
If any field is longer than expected, the commas-n'-quotes phase
will abort the processing, and you'll see a fairly descriptive
error message. The same goes for situations in which the input
record doesn't have the correct number of fields.
commas-n'-quotes conversion is done by the utility DBCvt.
If it
fails, the log file (ADBLOG.xx, where "xx"
is the project file suffix) will contain the command line to
invoke DBCvt. You can then correct the error and run
that command line at the DOS prompt, in order to make sure that
there are no similar errors in the file (if you wish).
If you want to know how to use DBCvt by itself, you can run it
from the DOS command line with no arguments.
DBCvt is an excellent tool for validating the correctness of
commas-n'-quotes format. Although ADB itself handles the
conversion from fixed-length format to commas-n'-quotes format,
DBCvt can go both ways (like all utilities in this package,
DBCvt's quite useful on its own terms.)
After commas-n'-quotes conversion is finished (if specified), ADB
generally insists that every record in the file be of the exact
length that the fieldset for the file would imply. (See the next
subsection for more details.)
You can run ADB with just the "-P" command line parm, if you want
to know how long ADB "thinks" a file format should be.
ADB will then "pretty print" the definitions into the log file.
You can use the "-P" argument for producing "clean" versions of
file
layouts . . . which can then be used as the basis for
applying a compiled programming language or any other tool to
ADB's fixed-length files.
Return
to local table of contents
Return
to global table of contents
Frames mode, or
No frames