21
SUFFIX -- _
Scan the bar code for “double quote” then scan the bar code for the “comma”.
SUFFIX -- “,_
Press the ENTER key to complete the change.
Press the Right Arrow to go to PROMPT 02. At the prompt scan the “double quote” bar code.
PREFIX -- _
Press ENTER or the down arrow until you move the c ursor to the line: Scan the “double quote” bar code, then, scan the
CR” bar code if u sing the TriCoder as a USB keyboard, or the “CR” and the “LF” if using the TriCoder as a Serial
interface: SUFFIX -- “?_
Press ENTER to complete the change. If you do not press ENTER after each change, the change will not be permanent.
Press the key to exit the program, then again to exit PROGRAMMING MODE. The TriCoder is now
programmed to upload its data in a comma separated file format.
Flat File Formats
Flat Files are the most complicated file format of the three we are co vering in the tu torial. The format of a Flat File is mostly
dependent upon the host program you will use to process the data you are uploading.
A Flat File uses what we call “Refer-backs”. E ach record has at least one field that remains constant while other fields may contain
variable data. “Refer-backs” allow the operator to enter the data for the constant fields only once, letting the TriCoder append the data
to each record as it uploads. “Refer-b acks” are specified in the Upload Prefix and Upload Suffix of each field. We will use a program
that prompts for operator name, item number and finally a quantity to demonstrate how “Refer-backs” work.
Lets say that t he data for the first field in every record must be the operators initials (3 characters). The second field in each record
must be an item number and the third field is a quantity. It doesn‟t make sense to require the operator to enter their initials every time
they scan an item number and enter a quantity. The solution is to create a program that uses a “Refer-back” to attach the data from
prompt #1 (operator name) a nd the data for prompt #2 (item number) to t he data for prompt #3 (quantity) every time. We do this
by using the upload prefix or upload suffix.
Specifiying these characters: }xx
where xx is the number of the statement you want to take data from, in the Upload Prefix or Upload Suffix of the statement you want
to attach the “Refer-back” data to. The following TriCoder Coding Form shows the program we have described above (only the
relevant entries on the form are shown):
Stmt #
Entry
Type
Prompt
Yes/Next
Stmt
No/End
Stmt
Upload
Prefix
Upload
Suffix
01
D
Operator Name
02
99
~0
02
D
Enter Item No.
03
99
~0
03
D
Enter Quantity
02
99
}01}02
CR
Refer-back programming example
The above program would prompt for Operator Name once, then rep eatedly prompt for Item, then Qu antity, attaching the Operator
Name data and the Item data to the front of every quantity upon upload.
If the data for Operator Name entered is WDS, and variable data is entered at each Item and Quantity prompt, the uploa ded file would
look like this:
Operator
Name
Item #
Quantity
Uploaded data looks like:
WDS
123456
124
WDS123456124
892938
880
WDS892938880
345890
3
WDS3458903
99540
75
WDS9954075
Flat File sample data