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 cursor to the line: Scan the “double quote” bar code, then, scan the “CR” bar code if using 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 covering in the tutorial. 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”. Each 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-backs 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 the 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 initi als 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) and the data for prompt #2 (item number) to the 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

Prompt

Yes/Next

No/End

 

Upload

Upload

 

Type

 

Stmt

Stmt

 

Prefix

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 repeatedly prompt for Item, then Quantity, 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 uploaded file would look like this:

Operator

Item #

Quantity

 

Uploaded data looks like:

Name

 

 

 

 

WDS

123456

124

 

WDS123456124

 

892938

880

 

WDS892938880

 

345890

3

 

WDS3458903

 

99540

75

 

WDS9954075

 

 

Flat File sample data

 

 

 

21

Page 22
Image 22
Worth Data 5000 owner manual Flat File Formats, Refer-back programming example, Flat File sample data