Académique Documents
Professionnel Documents
Culture Documents
Pgina 1 de 17
About DataWatch
This is a GOLD edition feature.
DataWatch allows you to monitor a database that is linked to a particular label. Whenever DataWatch
detects new records added in the database, it prints the records automatically.
Note: If you have two databases of two different types (e.g., one dBase and the other OLE DB) attached
to your label, DataWatch monitors the first one; that is, the first database field that you added to the
label. If you have two databases of the same type attached to your label, DataWatch will not run and will
display "Cannot run DataWatch..." errors.
file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh37A8.htm
27/06/2015
About DataWatch
Pgina 2 de 17
Command File
Extension
.def
Definition file
.cmd
Command files
.dbf
Database file
File Type
Multiple Raw Data: Uses a definition file as the command file and separate text files that contain
the data. The system reads the command file once, and then monitors the data file directory for
changes. When a new data file appears in the directory, the system prints the labels according to
the command file instructions.
You specify the name of the directory to be monitored. All data files are deleted after printing.
Multiple ASCII File: Uses multiple ASCII files that can contain both the commands and the data.
The system monitors the entire directory of command files for changes to any of them. When
changes appear, the system executes the command files and prints the labels.
You specify the name of the directory to be monitored. All command files executed in the monitored
directory are deleted after printing.
Single ASCII File: Uses a single ASCII file that can contain both the commands and the data. The
system monitors this one file for changes. When changes appear, the system executes the
command file and prints the labels.
file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh37A8.htm
27/06/2015
About DataWatch
Pgina 3 de 17
You can select whether or not the single file is deleted after printing.
DBF File: Uses a database (.dbf) file that contains the commands and the data. The system
monitors the database for changes. When changes appear, the system executes the command file
and prints the labels.
file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh37A8.htm
27/06/2015
About DataWatch
Pgina 4 de 17
LABELNAME=C:\Users\Public\Public
Documents\TKI\InstallationFolderName\Labels\LabelName.LBL
DATATYPE = DELIMITED
DELIMITER= ,
FIELD=PART
FIELD=QTY
FIELD=SUPPLIER
FIELD=SERIAL
For this sample, the path in the Directory to Monitor would look like this:
C:\Users\Public\Public Documents\TKI\InstallationFolderName\Command Files\Monitor
A sample text data file would look like this:
1001, 2222, 3333, 4444
1002, 2222, 2222, 4444
file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh37A8.htm
27/06/2015
About DataWatch
Pgina 5 de 17
Using quotation marks (" ") around field names is optional, unless you are adding spaces in the
fields.
A semicolon ( ; ) indicates remarks or comment statements; characters that appear on a line after a
semi-colon will be ignored.
Sequence of Commands
In a command file, each batch normally begins with the LABELNAME command and finishes with
LABELQUANTITY. All other commands for that label should be between these two commands.
After the LABELQUANTITY command, you may add the LABELNAME command for the next label
to be printed.
DATATYPE
The DATATYPE command identifies the type of data file that this system can access:
DELIMITED: Each field in the command file is separated from the next field by a delimiting
character. When writing the command file, you must first give the DATATYPE command,
followed by the DELIMITER command that specifies the delimiting character. For example:
file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh37A8.htm
27/06/2015
About DataWatch
Pgina 6 de 17
DATATYPE=DELIMITED
DELIMITER=,
FIXED: Each field occupies a specific number of spaces in the data file. Every record must be set
up the same for this to work. Fields that are shorter than the specified length must fill up the rest
of the space with blanks. The size of each field must be specified in the FIELD command.
ASSIGNED: The size of each field is defined in the command file structure. Each named field
from the label that requires data is assigned a value using the FIELD_NAME format. Only one
piece of data appears per line.
FIELD
The FIELD command is used for each data field on the label. The form depends on the data type being
used:
DELIMITED: Since delimited data is already separated by definition, there is no need to include
the starting and stopping position within the data file. Only the field name needs to be included.
For example:
FIELD=PART
FIELD=QTY
FIELD=SUPPLIER
FIXED: For fixed data, the start and stop positions must be specified. The field name should be
followed by the start and stop position of the data within the data file. For example:
FIELD=Company@110
ASSIGNED: For assigned data, the FIELD command is not used; instead, the FIELD_NAME
format is used to specify the data for the variable field.
FIELD_NAME
For each variable data field (When Printed or database) on the label; there should be a statement in the
command file that assigns it a value. The value for FIELD_NAME in the command file must match
exactly the name of the field in the label; the variable data should appear after the equal sign within
quotation marks.
For database key data fields, the name of the key data field on the label should be the same as its name
in the database. If more than one label is being processed in the same command file, leaving a field
name blank results in the last assigned value for that name being reused. To leave a field blank, insert a
null character (two quotes with nothing in between, "" ) into the string. For example:
file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh37A8.htm
27/06/2015
About DataWatch
Pgina 7 de 17
PART_NUM = "836773"
COMPANY=""
LABELDATA
The LABELDATA command identifies the location and name of the file that contains the data to be
used. If the data is in the same command file, set LABELDATA=THISFILE.
IMPORTANT: When creating command files with multiple raw data that use .def files, you must
create folders for each .def file and its associated .txt file. If the .txt file and its associated .def file are
not isolated in separate folders, all .txt files within the same folder as the .def file will be executed when
the command file is run.
PRINTER
The PRINTER command is an optional command that identifies which printer to use. If omitted, then
the currently selected printer is used.
The printer name must be typed exactly as it appears on the Select Printer dialog box, including upperand lower-case letters, and must be contained within quotation marks in order to be recognized.
For example:
PRINTER="Datamax DMX 430-(V) on COM2:"
You can also use this command to send the output of the command file to a picture file:
PRINTER = "PICTURE:name,dpi,color"
Where:
name = Name of the file. The extension you choose determines the format of the graphic (e.g., .bmp,
.pcx). Include the full path to the file (e.g., c:\labels\pic.bmp).
dpi = The resolution of the image in dots per inch. The default is 300.
color = 0 (zero) is for black and white; 1 is for color images.
PRINTERTASK
file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh37A8.htm
27/06/2015
About DataWatch
Pgina 8 de 17
The PRINTERTASK command can be used if you have enabled Run Separators. Using
PRINTERTASK, you can specify the order of printing using the standard printer tasks available. Include
the appropriate letters in the sequence you want them to occur. For example, PHP would print your print
batch twice with the Run Separator between them. For example:
PRINTERTASK=PHP
Note: The PRINTERTASK command must appear before the LABELQUANTITY command.
LABELQUANTITY
The LABELQUANTITY command specifies the number of labels to print, and should be the last line
for each label to be printed from the command file, since it is the active command. The label prints when
this command is encountered. If omitted, then only one label will print (default is
LABELQUANTITY=1).
If desired, you can vary the label quantity for specific labels by adding the LABELQUANTITY
command on its own line anywhere after the LABELDATA command. This will specify the label
quantity to print for any labels following the LABELQUANTITY command.
For example:
The LABELQUANTITY defaults to 1. If you want only one label of a group to print with a quantity of
2, you must change the quantity to 2 on the line before that labels data, and change it back to 1 on the
line following that labels data.
LABELDATA=THISFILE
Label #1, Field 1-2, Field 1-3,
Label #2, Field 2-2, Field 2-3,
LABELQUANTITY=2
Label #3, Field 3-2, Field 3-3, (**This label prints with a quantity of 2**)
LABELQUANTITY=1
Label #4, Field 4-2, Field 4-3,
Note: Do not include the LABELQUANTITY command if you are using data files; one label or group
of labels will be printed for each line of data.
file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh37A8.htm
27/06/2015
About DataWatch
Pgina 9 de 17
QUITAPP
The QUITAPP command terminates the execution of the command file immediately, and so should be
the very last command in the file. The program will remain open after running a command file unless
this line is included.
QUITAPP should not be used in definition files; if included in a definition file, the program ignores it.
Monitor only new records: Prints only the records that are added to the database. Otherwise, all
records are printed when new records appear.
Timed Interval (in seconds): How often the directory is monitored for changes.
file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh37A8.htm
27/06/2015
About DataWatch
Pgina 10 de 17
Process File Based on: Determines the order in which files are processed.
Date Time: Processing is based on the when the file was created (oldest first).
Minimize Main Window: The design window is minimized during command file processing.
Create Backup before deleting (BAK): Saves a backup copy of each command file after printing
takes place.
Delete Command File after executing: Deletes the command file after executing it. Otherwise, the
file is not deleted.
Log Errors to File: Logs any errors encountered during the execution of the command file. The
file (named CMDFILE.ERR) can be found in the same directory as the command file.
Stop Processing On Error: If an error occurs while printing any label it will stop the print job, and
prevent printing the remaining labels in the file. For example, a misspelled field name will end the
print job.
Timed Interval (in seconds): How often the directory is monitored for changes.
file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh37A8.htm
27/06/2015
About DataWatch
Pgina 11 de 17
for changes. After labels are printed, the command files are deleted. You may, however, select the
option to save a backup of each command file (.bak extension).
Process File Based on: Determines the order in which files are processed.
Date Time: Processing is based on when the file was created (oldest first).
Minimize Main Window: The design window is minimized during command file processing.
Create Backup before deleting (BAK): Saves a backup copy of each command file after printing
takes place.
Log Errors to File: Logs any errors encountered during the execution of the command file. The
file (named CMDFILE.ERR) can be found in the same directory as the command file.
Stop Processing On Error: If an error occurs while printing any label it will stop the print job, and
prevent printing the remaining labels in the file. For example, a misspelled field name will end the
print job.
Timed Interval (in seconds): How often the directory is monitored for changes.
file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh37A8.htm
27/06/2015
About DataWatch
Pgina 12 de 17
file over and over again each time the data files change.
When you do change the command file, you can move the old command file to the monitored folder
where it will be executed and deleted, so that the rest of the data files will be executed according to the
new command file.
Definition File
The commands for a multiple raw data file type are stored in a definition file that uses the .def file
extension. This is a sample of what a definition file may contain:
LABELNAME=C:\Program Files\LV8\Command Files\AIAG.lbl
DATATYPE=DELIMITED
DELIMITER=,
FIELD=PART
FIELD=QTY
FIELD=SUPPLIER
FIELD=SERIAL
IMPORTANT: When creating command files with multiple raw data that use .def files, you must
create folders for each .def file and its associated .txt file. If the .txt file and its associated .def file are
not isolated in separate folders, all .txt files within the same folder as the .def file will be executed when
the command file is run.
Data Files
The data file contains the data that populates the fields in the label. This is a sample of what a data file
may contain:
20700,10,ABC Company,123456
20701,20,ABC Company,654321
Data files may be generated by an outside system (e.g., inventory or accounting system) or computer,
and are sent to the directory that is monitored for changes. When changes appear in the directory, the
labels are printed and the data files are deleted.
file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh37A8.htm
27/06/2015
About DataWatch
Pgina 13 de 17
Date Time: Processing is based on the when the file was created (oldest first).
Minimize Main Window: The design window is minimized during command file processing.
Create Backup before deleting (BAK): If your definition file is in the same directory as your data files,
saves a backup copy of each definition file after printing takes place.
Log Errors to File: Logs any errors encountered during the execution of the command file. The file
(named CMDFILE.ERR) can be found in the same directory as the command file.
Stop Processing On Error: If an error occurs while printing any label it will stop the print job, and
prevent printing the remaining labels in the file. For example, a misspelled field name will end the print
job.
Timed Interval (in seconds): How often the directory is monitored for changes.
7. Click OK to return to the design window.
8. If data is available, execute the command file.
file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh37A8.htm
27/06/2015
About DataWatch
Pgina 14 de 17
LBLNAME: A character field specifying the full name and path of the label.
LBLPRINTER: This field contains the printer and port on which the label will be printed. The
syntax must be exactly the same as it appears on the Select Printer dialog box, including
capitalization.
For example: ZEBRA Z4000 - (V) on LPT1:
There can be other fields in the database. If there are any variable fields on your label (fields that would
normally be When Printed or Database), these fields should also be included in the command file
database.
Since multiple labels can be printed from one command file database, the variable fields for all of the
labels that are to be used should be in the database.
Set up the label as you normally would. Any database fields should call the command file database. Not
all of the fields in the command file database must be used, but any fields used must be in the command
file database.
file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh37A8.htm
27/06/2015
About DataWatch
Pgina 15 de 17
Multiple Raw Data: The label design software executes the definition file first, monitors the data
directory for changes and, when changes appear, prints the labels.
Multiple ASCII Files: All of the command files in the selected directory are executed in order.
Single ASCII File: A prompt appears asking you to enter the name of the file to run, and whether
or not you want the file monitored for changes that will then be printed.
Database File: A prompt appears asking for the name of the file to use, and if you want the
database records currently in the file to be printed. The database file is monitored for any changes
and, when changes appear, labels are printed.
Log of each file, including time of processing, file name, and status (processed, waiting, etc.)
file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh37A8.htm
27/06/2015
About DataWatch
Pgina 16 de 17
For example, a database can be set up so that the operator is prompted for a part number. The part
number is the key field value that looks up a record containing the label format, printer, port, and any
variable data associated with the label. Label Select uses the record information to print the selected
label to the correct printer and port, and includes any variable data without requiring additional user
input.
Key field: Contains the key field valuessuch as part numbers, last names, or other valuesthat
can be used to retrieve (look up) specific records in the database. This field must be set up as a
character data type.
Label name field: Contains the name of the label file, including the full path to each label. This
field must be set up as a character data type.
Printer name field: Contains the name of the printer and port for each label. The printer name and
port must match exactly what appears in the Printer box (in the Select Printer dialog box)
including upper- and lower-case characters, and all punctuation. This field must be set up as a
character data type.
file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh37A8.htm
27/06/2015
About DataWatch
Pgina 17 de 17
Variable data fields: Contain the variable data values, if any, that you want to print for each label.
The name of the variable data field in the Label Select database must match the name of the field
in the label. If there is a match, then the label field will be populated with the value from the Label
Select database. If there is no match, then no variable data will be printed. For example, if the
Label Select database has a field called DEPT, and there is a variable field on the label also named
DEPT, then the DEPT field on the label will be populated with the value from the Label Select
database for that label.
Tip: A sample Label Select database, called l_select.dbf, is located in the program's Data folder
(C:\Users\Public\Public Documents\TKI\Common\Data) to demonstrate how the Label Select feature
works. You can use the program's Database Editor to display the contents of the database.
file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh37A8.htm
27/06/2015