How to Buy and Use a Datamax Bar Code Printer

How to Buy and Use a
Datamax
Bar Code Printer
This document is intended to demonstrate how easy it is for you to hook up a Datamax bar
code printer to your UNIX box and make custom labels using Cyberquery to access your
Array information.
Datamax Allegro 2
Why do this?
Where did this information come from?
Why Datamax, and why this printer?
How to buy a Datamax Allegro 2 printer and supplies.
When you get your printer…
How to hook the printer up to your system.
How to write a CQ program that makes a bar coded label.
Using bar coding in your warehouse.
Examples
Of bar code in Operator’s Manual
Of working CQs
Datamax i-4208
Why do this?
 So you can control your label creation from your Array box, which is the same
environment where your data is.
 So you can publish tools that your users can use create their OWN labels using CQ
and the Menu Maker II or other menu program.
 So you can automate the creation of labels that go with certain functions, or jobstream,
etc.
 So you can implement TPW, warehouse management software, or cycle counting, or
whatever you dream up.
 So you can control your own environment and be the master of your own destiny.
Where did this information come from?
There are a number of AUG members already using this printer. The pioneer was David
Weinstein, who has been the most vocal champion of the Allegro 2. The attached queries are
examples derived from the experiences of those users.
Why Datamax, and why this printer?
NOTE: the Datamax “i” class of printers has largely replaced the Allegro family
because of speed, memory, and reliability. Also, some Array users report that they
use Brady printers, some of which are re-branded Datamax printers. (- Steve
Shuman 10.10.01)
Datamax makes an excellent family of printers. The Allegro 2 is currently the least expensive
of the heavy-duty, high quality printers that will work forever and not give you any problems.
It can use wax-ribbons to transfer the image to the label – thereby making the label permanent
(almost) – or burn the image directly into the label for less permanent applications.
If you are labeling the shelves in your warehouse you will want to use the ribbons. If you are
making shipping labels, you may want to print without ribbons. In my warehouse I use
ribbons for everything. Ribbons are cheap anyway.
However, you should know that the Allegro 2 is not the only printer. The entire family of
Datamax printers use the Datamax Programming Language – so ANY of their printers will
work with the same CQs you write. This means you can buy a little cheap one to produce a
mailing label you only print once a month, for example.
You can see the full line of Datamax printers at: www.datamaxcorp.com
How to buy a Datamax Allegro 2 printer and supplies.
The vendor below is a good place to start, but there are other places that sell this equipment.
Maybe the best place to start is to get a catalog from these people.
Laser Label Technologies
www.LLTproducts.com
800-882-4050
LLT is inexpensive, polite and fast. They also keep a record of what you buy, so you can call
up and say, “Give me more of what I bought last time”.
You will need to buy:
(NOTE: LLT SAYS SOME COSTS SHOWN ARE DISCOUNTED FOR AUG MEMBERS. BE
SURE TO IDENTIFY YOURSELF AS AN AUG MEMBER.)
1. One Datamax Allegro 2 printer with a serial port. (A serial port is going to be the
DB25 typical 25-pin “D-shell” RS232-type connector like on the back of a dumb
terminal. You will NOT need a parallel port like the typical printer has that hooks up
to a PC, but you can get it that way if you want it.) The people taking your order
will question you to make sure you are not crazy – not many people buy this printer to
use with a serial port. They may ask you to sign a form saying you are ordering the
serial port and ask you to fax it back to them.
pdsa2t serial printer
$955 each (as of 12/5/2000)
2. Some labels. The Allegro 2 printer can print up to 4.5” wide. That means that you
can print labels up to 4.5” wide – and they can be any length. (I know of an
application where a company is printing some kind of package document for export
that is 4”x 24” – so don’t worry about the labels!) The labels come on a roll. They
are not pin fed – but the printer advances them by itself. It is worth paying the few
cents extra to get perforations between labels for easy tear off – especially if you are
making bigger labels. These labels happen to be the ones I use:
btm3010ap
(3” x 1”)
$18.50 per roll
bt3358ap
(3.5” x 8”)
$20.40 per roll
btm4030ap
(4” x 3”)
$15.60 per roll
( I can also get them about 20% cheaper from Integrated Document and Label
Solutions at 877-491-1136.)
3. Some ribbons. The rule-of-thumb is that a single ribbon will last about as long as two
rolls of labels. You don’t have to get a ribbon any wider than the label you are
printing, but I have made it a practice to just standardize on the max size ribbon. These
happen to be the two sizes I use (now just the larger ones.)
brscg425
(4.25” x 1181')
$15.40 per roll
brscg350
(3.5” x 1181')
$13.40 per roll
4. A re-winder. (I am putting this item on here even though it is a “luxury” item.) This
is just a little device that sits separately in front of the printer and winds up the labels
that are spitting out. You don’t NEED this, but I have been through printing labels for
two warehouses now (one warehouse more than once), and I did the first one without
it. I wound up with piles of “label spaghetti” – the labels stuck to each other, I
reprinted a lot of them – it was not bad, but I knew it could be better. When I did the
second warehouse I used this little thing and felt it paid for itself. If you are
contemplating making many thousands of labels, then maybe you want one of these.
RLLMC10A-mini cat10A
$355.00 each
When you get your printer
The printer shipment will come in a few days. The labels and ribbons will arrive separately.
In your box will be:
 A printer.
 An Operator’s Manual. This is what you will need to write CQs, set up your printer,
do some troubleshooting. Nice little book.
 A CD-ROM: This has some manuals on it so you can keep it on your PC. You may
want to install this on your network somewhere so that whoever will be taking care of
your printers will have access to the information. There is also software for use with
windows, including some graphical tools.
 A coupon. In the Operators Manual is a coupon for you to order a free hard copy of a
Programmer’s Manual. You already have a copy of the Programmer’s Manual on the
CD-ROM, and it is also available for download free from Datamax’s website
www.datamaxcorp.com – but if you want a book, then order it. Unless you intend to
get real, real serious about programming you don’t need to look in this book though.
Follow the directions in the Operator’s manual for set up. (Tip: If it seems that it just won’t
work, use a flashlight to see that the ribbon is fed properly through the sensor fingers.)
How to hook the printer up to your system.
This is going to be a snap. This is exactly the same as setting up an OKI-data printer on your
system. I am going to skip over some of these details, because there is already a lot of
information out there on setting up printers, but here are the highlights:
This is a serial device, so you can hook it up directly to a RAN or a PortServer. (TSS likes to
sell DigiBoard products for this function, so you may have a DigiBoard device to hook up to.
Anyway, you need to hook it up via whatever cabling you have in place. If you have an
adapter to work with an RJ-45 fitting that is fine.
Set up the printer like a generic “other” printer using RS232.
Here is an example of one of my printer configurations. This printer happens to be hooked up
to a DigiBoard PortServer serial adapter at a remote warehouse.
Change / Show Characteristics of a Printer/Plotter
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[TOP]
Printer/Plotter
Printer/Plotter type
Printer/Plotter interface
Description
Status
Location
Parent adapter
* PORT number
BAUD rate
PARITY
BITS per character
Number of STOP BITS
FLOW CONTROL to be used
OPEN DISCIPLINE to be used
STTY attributes for RUN time
STREAMS modules to be pushed at OPEN time
Printer TIME OUT period
STATUS of device at BOOT time
[Entry Fields]
lp22
osp
rs232
Other serial printer
Available
00-00-07-16
sa7
[16]
[9600]
[none]
[8]
[1]
[xon]
[dtropen]
[clocal]
[sptr]
[60]
available
Ignore the following attributes when using
the Print Queue:
Number of LINES per page
Number of COLUMNS per page
Number of COLUMNS to indent
Send all characters to printer UNMODIFIED
Send BACKSPACES
WRAP CHARACTERS beyond the specified width
Send FORM FEEDS
Send CARRIAGE RETURNS
Send LINE FEEDS
Add CARRIAGE RETURNS to LINE FEEDS
Convert lowercase to uppercase
Expand TABS on eight position boundaries
Return on ERROR
[BOTTOM]
[00]
[132]
[0]
no
yes
no
yes
yes
yes
yes
no
yes
no
Note the “Number of LINES per page” value is 00. While this is the same as an OKI-data
setup, you may find if you are spooling large print jobs and are experiencing strange behavior
every so many labels, that this value is something other than 00.
Rather than go into excruciating detail here – if you suspect that you are not set up properly,
check the configuration on one of your printers that is set up to print pick tickets. Pick tickets
are printed in straight ASCII – just like this printer needs to be, so copy whatever you find is
already working on your system. (If you do an lpstat on your system you can see what the
printer device is that is assigned to that queue, then take that information and go into smit.)
Unfortunately, you will not be able to test the printer by sending it a file in the typical way
since the printer needs a special signal first. Instead, use this CQ to see if your printer is
working:
/** test Datamax printers **/
where svt_rec:whole_rec ="xxxxxxxxx"
list/nodefaults/nodetail/pagelength=0
/noheadings/pagewidth=255
end of report
"<002>" + "L"
/newline
"D11"
/newline
"Q0002"
/newline
"161100000500020"+username /newline
"16110000000002012345678910"/newline
"E"
/newline
If everything is set up properly, you should get two labels – each saying your username on the
top line and the numbers 1-10 under your name.
(There is nothing special about writing this query against the svt_rec file – it is just a little file
that will never have a record equal to “xxxxxxxx”, so it will not print anything until it comes
to the “end of report” section. It is just a way to use CQ to output a file that is not specific to
Array data. Remember this trick – this is a good trick to use when you are trying to make a
label for something that is NOT in Array – like making labels specific to your bin location
scheme for example. Since writing these I have learned that the officially sanctioned method
of doing this is to write a query against FAKE:FAKE instead of a real file.)
How to write a CQ program that makes a bar coded label.
Datamax calls their programming language “DPL” – or Datamax Programming Language. It
is so ridiculously easy that you won’t believe it.
The output to the printer needs to have these components:
 A wake up signal to the printer (The wake up call consists of the “STX” symbol,
which equates to an octal value of 2 – and the letter “L”. )
 The quantity of labels you want (if you do not supply this it is assumed to be 1
label)



The component itself – which consists of a leading “prefix” string of numbers and
letters and the what the data in the component is. Altogether the component tells
the printer the following (not listed in order):
 What it is – a bar code, string of text, etc.
 Set height and width dot size. (D11 means one-to-one ratio)
 Where the component should go vertically.
 Where the component should go horizontally.
 How big it is.
 How it is oriented – upside down, sideways, etc.
 What the font is – or bar code language if it is a bar code.
 What the data actually is.
If there is more than one component on a label there may be a number of strings.
The letter “E” which comes at the END of the label.
This format will have to be created for each label, so if you are making labels for a range of
items, the output of your CQ might look like this:
?L
(This is what the octal value of 2 and the letter “L” will look like on screen.)
D11
(Height and width dot size ratio.)
Q0002
(Qty of labels – in this case two. Note four digits required)
1234567890123456data_here
(Prefix and then data)
E
(End of this label)
?L
D11
Q0002
1234567890123456data_here
E
?L
D11
Q0002
1234567890123456data_here
E
See how easy this is?
You can read about the details of what these all mean by looking at your Operator’s Manual
in Programming Examples, or see a small excerpt in the examples section of this document.
The important part is of course the prefix string. That is what controls everything. You can
also make life a lot easier for yourself by writing your queries in a way that help you play
with this. (Whenever you write a query that produces a label, you have to play with the font
size, placement, etc. You can plan on wrecking a few labels – but it is pretty easy.)
When I wrote the below query, I opened the manual and looked at the page in programming
examples that showed what the prefix string needed to be and what the individual parts meant.
Then I wrote a define statement that breaks out the parts so I can easily play with the query as
I move things around. Then I put away the manual and concentrated on ruining some labels.
Try to write your queries organized like this – it will save you lots of time, because if you
want to change the font size on the top line, you can look at the “settings_top_line” define
statement and easily read which number you need to tinker with. (This query makes humanreadable customer mailing labels selected for a specific tax code.)
/** Make customer mailing labels 1" x 3" on bar code printer */
define string BEGIN_LABEL = "<002>" + "L" + "<012>" + "D11" + "<012>"
define string TERMINATE_LABEL = "E" + "<012>"
define string TOP_LINE = parameter/prompt=
"What do you want the top line to say? "
default "Accounts Payable"
define number BEGIN_CUSTOMER[6] = parameter default 000000
define number END_DEFAULT
= if BEGIN_CUSTOMER = 0 then 999999
else BEGIN_CUSTOMER
define number END_CUSTOMER[6]
= parameter
define string settings_top_line =
+
+
+
+
+
"1"
"9"
"11"
"004"
"0072"
"0005"
+
+
+
+
+
+
"1"
/** rotation **/
"9"
/** font id **/
"11"
/** horiz & width multipler **/
"004" /** font size **/
"0054" /** row (100th/inch) **/
"0005" /** column (100th/inch **/
custome:name
+
+
+
+
+
+
"1"
/** rotation
**/
"9"
/** font id **/
"11"
/** horiz & width multipler **/
"004" /** font size **/
"0038" /** row (100th/inch) **/
"0005" /** column (100th/inch **/
custome:adr1
+
+
+
+
+
+
"1"
/** rotation **/
"9"
/** font id **/
"11"
/** horiz & width multipler **/
"004" /** font size **/
"0020" /** row (100th/inch) **/
"0005" /** column (100th/inch **/
custome:adr2
+
+
+
+
+
+
+
+
+
+
"1"
/** rotation **/
"9"
/** font id **/
"11"
/** horiz & width multipler **/
"004" /** font size **/
"0002" /** row (100th/inch) **/
"0005" /** column (100th/inch **/
custome:city
"
"
custome:st
"
"
custome:zip
define string CUST_NAME =
define string CUST_ADR1 =
define string CUST_ADR2 =
define string CUST_CITY_ST_ZIP =
define string CUST_SORT
=
default END_DEFAULT
/**
/**
/**
/**
/**
/**
rotation **/
font id **/
horiz & width multipler **/
font size **/
row (100th/inch) **/
column (100th/inch **/
str(custome:custno) + "-" + str(custome:shipto)
define string SHOW_CUSTNO[1] = parameter/uppercase/prompt=
"Show customer number on the label? " default "Y"
valid if SHOW_CUSTNO one of "Y","N"
define string SHOW_CUST_RESULT = if SHOW_CUSTNO = "Y" then CUST_SORT else " "
define string CUST_CUSTNO=
"2"
/** rotation **/
+
+
+
+
+
+
where
and
and
and
"9"
/** font id **/
"11"
/** horiz & width multipler **/
"002" /** font size **/
"0070" /** row (100th/inch) **/
"0285" /** column (100th/inch **/
SHOW_CUST_RESULT
custome:custno => BEGIN_CUSTOMER
custome:custno <= END_CUSTOMER
custome:tax = 2
custome:shipto = 0
list
/nodefaults/pagelength=0/pagewidth=255
SETTINGS_TOP_LINE + top_line
CUST_NAME
CUST_ADR1
CUST_ADR2
CUST_CITY_ST_ZIP
CUST_CUSTNO
/newline
/newline
/newline
/newline
/newline
/newline
sorted by
CUST_SORT
top of CUST_SORT
BEGIN_LABEL
end of CUST_SORT
TERMINATE_LABEL
You can use the exact same technique to write queries that print barcodes.
(Note: The “<012>” is the octal equivalent for line feed, but you can accomplish the same
thing by using the “/newline” command in CQ, you don’t have to use octal.)
Here is one that prints several human-readable large labels from whatever the person types in.
They are used to mark the ends of an aisle.
/**
MAKES (4) 3.25" X 5.5" AISLE END LABELS **/
DEFINE STRING
Msg[1]= parameter/prompt=
"Note: 4 of each label will be made
default " "
A1[3] = parameter/prompt="Enter label
A2[3] = parameter/prompt="Enter label
A3[3] = parameter/prompt="Enter label
A4[3] = parameter/prompt="Enter label
A5[3] = parameter/prompt="Enter label
A6[3] = parameter/prompt="Enter label
define string BEGIN_LABEL
"<002>" + "L" + "<012>"
"D11" +
"<012>"
"Q0004" +
"<012>"
"494401000500320"
on large label format.”
choice
choice
choice
choice
choice
choice
1"
2"
3"
4"
5"
6"
default
default
default
default
default
default
"
"
"
"
"
"
"
"
"
"
"
"
=
+
+
+
define string TERMINATE_LABEL = "E" + "<012>"
WHERE SVT_REC:DATA = "zzzzzzzzzzz"
LIST/NODETAIL/NOHEADINGS/NODEFAULTS/PAGEWIDTH=255/PAGELENGTH=0
END OF REPORT
if A1 <> "
" then {BEGIN_LABEL + A1/NEWLINE
TERMINATE_LABEL/NEWLINE}
if
if
if
if
if
A2
A3
A4
A5
A6
<>
<>
<>
<>
<>
"
"
"
"
"
"
"
"
"
"
then
then
then
then
then
{BEGIN_LABEL
{BEGIN_LABEL
{BEGIN_LABEL
{BEGIN_LABEL
{BEGIN_LABEL
+
+
+
+
+
A2/NEWLINE
A3/NEWLINE
A4/NEWLINE
A5/NEWLINE
A6/NEWLINE
TERMINATE_LABEL/NEWLINE}
TERMINATE_LABEL/NEWLINE}
TERMINATE_LABEL/NEWLINE}
TERMINATE_LABEL/NEWLINE}
TERMINATE_LABEL/NEWLINE}
Here is one that makes a human-readable label for whatever the person wants, used to label all
kinds of stuff.
/***************************************************************************
Makes (1) 3"x 1" label not barcoded.
Will print anything entered on the
Datamax Allegro 2 barcode printer.
(approx 15 characters if bold, 25 if not)
****************************************************************************/
define string
UNDERSTAND[1] = parameter/uppercase/cls/line=10/prompt=
"The output of this query only looks like a label when it prints at a Datamax bar code
printer, not on the view screen. You will actually need to print a label to know what it will
look like.
"
default " "
define string
TOP_LINE[25] = parameter/uppercase/cls/line=10/prompt=
"
Enter approx 15 characters (bold) for TOP line: " default "123456789012345"
define string
TOP_FONT[1]
= parameter/uppercase/prompt=
" Bold top line (Y/N)? (25 characters if not bold): " default "Y"
valid if TOP_FONT one of "Y", "N"
define string
TF
= if TOP_FONT = "Y" then "6" else
if TOP_FONT = "N" then "5"
define string BOTTOM_LINE[25] = parameter/uppercase/prompt=
" Enter approx 15 characters (bold)for BOTTOM line: " default "123456789012345"
define string
BOTTOM_FONT[1] = parameter/uppercase/prompt=
"
Bold bottom line (Y/N)? (25 characters if not): " default "Y"
valid if BOTTOM_FONT one of "Y", "N"
define string
BF
= if BOTTOM_FONT = "Y" then "6" else
if BOTTOM_FONT = "N" then "5"
define string BEGIN_LABEL
= "<002>" + "L" + "<012>" +
"D11" + "<012>"
define number
HOW_MANY[2] = parameter/prompt=
"
How many labels do you want?: "
default 1
define string
TOP_LABEL = "1"+ TF +"11"+ "000"+ "0050"+ "0020"
define string
BOTTOM_LABEL = "1"+ BF +"11"+ "000"+ "0000"+ "0020"
/*** WHAT STRING MEANS:
ROTATION +FONT+MULT+IGNORE+ ROW + COLUMN
define string TERMINATE_LABEL
***/
= "E" + "<012>"
where svt_rec:ship_code="@@@@@@@@@@@@"
LIST
/nodefaults/pagewidth=255/pagelength=0/nobanner/noheadings/noreporttotals
/nodetail/noblanklines/noformfeeds/space=0/nopageheadings/notitle/nofill
end of report
if
BOTTOM_LINE => " "
or TOP_LINE
=> " "
then
{
BEGIN_LABEL
"Q"/column=1 HOW_MANY/mask="9999"/width=4/column=2
TOP_LABEL
+ TOP_LINE
BOTTOM_LABEL
+ BOTTOM_LINE
TERMINATE_LABEL
}
/NEWLINE
/newline=2
/newline
/newline
/newline
The key here – and I hate to belabor this point so much – is to get your hands on a printer, set
it up and get playing with the labels themselves. Then you will see what the details mean.
Tip: One note about a problem with using the Code 128 bar code that I have never seen
documented anywhere – If, when you are making a label that uses the Code 128 bar code
language, the first element of your data is an “A”, “B” or “C”, then the printer interprets this
as instructions to use the A, B or C subset of the Code 128 language – and will begin printing
at the second character of your data! To get around this problem, add the letter “A” before
your data. Code 128 makes a more compact bar code – perfect for warehousing and scanning
from a distance. Compare 128 to code 3-of-9 for example and you will see what I mean.
Using bar codes in your warehouse.
So now that you have the ability to print bar code labels, what are you going to do with your
new ability?
It may be obvious, but I hope you see that the real value to bar codes is directly related to how
well you use them. The ultimate way to use bar codes is to use them in your daily processes
like picking and receiving. Trade Services currently offers Array integration to the Paperless
Warehouse – and perhaps in the future will develop some other sort of real-time, radiofrequency-directed warehouse management software. Even though I have spent into six
figures for it, I am an enthusiastic proponent of that technology, and feel I have gotten my
money’s worth. If you haven’t seriously considered warehouse management software then
you are missing a chance to make a giant difference in your organization.
TSS also offers cycle counting modules, etc. Because these offerings change I will not go
into detail about them – but I think the key issue is that you have a plan on how YOU intend
to use them before you start sticking labels up.
The 1” x 3” label is perfect for labeling the edges of metal shelves, sticking on magnets, etc.
Most of the queries in the examples use this size.
Here are some places where you might use this printer to make labels:
 Bin location on the shelf.
 Item labels for the shelf.
 Item labels to stick on the material itself.
 Combination item/bin location tags.
 Customer mailing labels.
 Shipping labels.
 Counter / showroom.
 In the RGA area.
 Fixed asset labeling.
 Custom labels on demand.
 Offer labeling service to customers.
 More…
WARNING – sometimes bar code labels can hurt you. If you put a bar code label on your
shelf that shows the ITEM number – will someone who scans that label really have scanned
that item, or will they have scanned the label and THINK they have that item? I made this
mistake, and wound up removing thousands of labels because I felt that the label actually
made me less accurate.
EXAMPLES:
These first two examples are actually pulled from the Programming examples of the
Operator’s Manual. In sample one you see that what the raw ASCII test looks like, and the
barcode that it produces.
Sample 1:
<STX> L <CR>
H07 <CR>
D11 <CR>
19110080100002510K OHM 1/4 WATT <CR>
1a6210000000050590PCS <CR>
E
10K OHM 1/4 WATT
Sample 2:
The example shown below prints out a Code 3 of 9 bar code with a wide to narrow bar ratio
of 3:1 and can be used to print any of the bar codes shown in Appendix C of the Operators
Manual by altering the example's fields.
<STX>L<CR>
D11<CR>
1A93040001501000123456789<CR>
121100000000100Barcode A<CR>
E
<STX>L Syntax L on line 1 is used to enter the label formatting mode.
Sample Label
CYBERQUERY EXAMPLES
This section shows examples of working CQs from Steve Shuman and David Weinstein.
This one makes labels for the edge of the shelf. It gives the user 19 different prompts. It
forces certain input so the user must enter it according to my own bin location scheme. You
will have to modify the “valid if” portions of the CQ to match yours. Just to get you started
playing with it, examples you could key in of valid bin locations that it will accept is
“J1234A”, “D4567C”, “B9988D”. The bar code portion of the label is slightly different from
the human readable portion, which has spaces inserted to make the label easier to read.
/***************************************************************************
Allows 19 separate entries.
Makes 1 bar-coded 3"x 1" location
label for each entry.
–Steve Shuman 10/6/99
****************************************************************************/
define string BAY1[6]
define string BAY2[6]
define string BAY3[6]
define string BAY4[6]
define string BAY5[6]
define string BAY6[6]
define string BAY7[6]
define string BAY8[6]
define string BAY9[6]
define string BAY11[6]
define string BAY12[6]
define string BAY13[6]
= parameter/uppercase
valid if BAY1[1] => "A" and BAY1[1] <= "Z"
and len(replace(BAY1," ",""))=6
default "A00000"
= parameter/uppercase
valid if BAY2[1] => "A" and BAY2[1] <= "Z"
and len(replace(BAY2," ",""))=6
default "A00000"
= parameter/uppercase
valid if BAY3[1] => "A" and BAY3[1] <= "Z"
and len(replace(BAY3," ",""))=6
default "A00000"
= parameter/uppercase
valid if BAY4[1] => "A" and BAY4[1] <= "Z"
and len(replace(BAY4," ",""))=6
default "A00000"
= parameter/uppercase
valid if BAY5[1] => "A" and BAY5[1] <= "Z"
and len(replace(BAY5," ",""))=6
default "A00000"
= parameter/uppercase
valid if BAY6[1] => "A" and BAY6[1] <= "Z"
and len(replace(BAY6," ",""))=6
default "A00000"
= parameter/uppercase
valid if BAY7[1] => "A" and BAY7[1] <= "Z"
and len(replace(BAY7," ",""))=6
default "A00000"
= parameter/uppercase
valid if BAY8[1] => "A" and BAY8[1] <= "Z"
and len(replace(BAY8," ",""))=6
default "A00000"
= parameter/uppercase
valid if BAY9[1] => "A" and BAY9[1] <= "Z"
and len(replace(BAY9," ",""))=6
default "A00000"
= parameter/uppercase
valid if BAY11[1] => "A" and BAY11[1] <= "Z"
and len(replace(BAY11," ",""))=6
default "A00000"
= parameter/uppercase
valid if BAY12[1] => "A" and BAY12[1] <= "Z"
and len(replace(BAY12," ",""))=6
default "A00000"
= parameter/uppercase
valid if BAY13[1] => "A" and BAY13[1] <= "Z"
define string BAY14[6]
=
define string BAY15[6]
=
define string BAY16[6]
=
define string BAY17[6]
=
define string BAY18[6]
=
define string BAY19[6]
=
define
define
define
define
define
define
define
define
define
define
define
define
define
define
define
define
define
define
string
string
string
string
string
string
string
string
string
string
string
string
string
string
string
string
string
string
BAY1A
BAY2A
BAY3A
BAY4A
BAY5A
BAY6A
BAY7A
BAY8A
BAY9A
BAY11A
BAY12A
BAY13A
BAY14A
BAY15A
BAY16A
BAY17A
BAY18A
BAY19A
and len(replace(BAY13," ",""))=6
default "A00000"
parameter/uppercase
valid if BAY14[1] => "A" and BAY14[1] <= "Z"
and len(replace(BAY14," ",""))=6
default "A00000"
parameter/uppercase
valid if BAY15[1] => "A" and BAY15[1] <= "Z"
and len(replace(BAY15," ",""))=6
default "A00000"
parameter/uppercase
valid if BAY16[1] => "A" and BAY16[1] <= "Z"
and len(replace(BAY16," ",""))=6
default "A00000"
parameter/uppercase
valid if BAY17[1] => "A" and BAY17[1] <= "Z"
and len(replace(BAY17," ",""))=6
default "A00000"
parameter/uppercase
valid if BAY18[1] => "A" and BAY18[1] <= "Z"
and len(replace(BAY18," ",""))=6
default "A00000"
parameter/uppercase
valid if BAY19[1] => "A" and BAY19[1] <= "Z"
and len(replace(BAY19," ",""))=6
default "A00000"
= BAY1[1,3]+ " " +BAY1[4,5]+" "+BAY1[6]
= BAY2[1,3]+ " " +BAY2[4,5]+" "+BAY2[6]
= BAY3[1,3]+ " " +BAY3[4,5]+" "+BAY3[6]
= BAY4[1,3]+ " " +BAY4[4,5]+" "+BAY4[6]
= BAY5[1,3]+ " " +BAY5[4,5]+" "+BAY5[6]
= BAY6[1,3]+ " " +BAY6[4,5]+" "+BAY6[6]
= BAY7[1,3]+ " " +BAY7[4,5]+" "+BAY7[6]
= BAY8[1,3]+ " " +BAY8[4,5]+" "+BAY8[6]
= BAY9[1,3]+ " " +BAY9[4,5]+" "+BAY9[6]
= BAY11[1,3]+ " " +BAY11[4,5]+" "+BAY11[6]
= BAY12[1,3]+ " " +BAY12[4,5]+" "+BAY12[6]
= BAY13[1,3]+ " " +BAY13[4,5]+" "+BAY13[6]
= BAY14[1,3]+ " " +BAY14[4,5]+" "+BAY14[6]
= BAY15[1,3]+ " " +BAY15[4,5]+" "+BAY15[6]
= BAY16[1,3]+ " " +BAY16[4,5]+" "+BAY16[6]
= BAY17[1,3]+ " " +BAY17[4,5]+" "+BAY17[6]
= BAY18[1,3]+ " " +BAY18[4,5]+" "+BAY18[6]
= BAY19[1,3]+ " " +BAY19[4,5]+" "+BAY19[6]
define string BEGIN_LABEL
=
"<002>" + "L" + "<012>" +
"D11" + "<012>"
+
"1e9404000400020"
define string END_LABEL
=
"161100000000020"
define string TERMINATE_LABEL = "E" + "<012>"
where svt_rec:ship_code="@@@@@@@@@@@@"
LIST
/nodefaults/pagewidth=255/pagelength=0/nobanner/noheadings/noreporttotals
/nodetail/noblanklines/noformfeeds/space=0/nopageheadings/notitle/nofill
end of report
if BAY1 <> "A00000" then
{BEGIN_LABEL + replace(BAY1A," ","")/newline
END_LABEL
+ BAY1A/newline TERMINATE_LABEL/newline}
if BAY2 <> "A00000" then
{BEGIN_LABEL + replace(BAY2A," ","")/newline
END_LABEL
+ BAY2A/newline TERMINATE_LABEL/newline}
if BAY3 <> "A00000" then
{BEGIN_LABEL + replace(BAY3A," ","")/newline
END_LABEL
+ BAY3A/newline TERMINATE_LABEL/newline}
if BAY4 <> "A00000" then
{BEGIN_LABEL + replace(BAY4A," ","")/newline
END_LABEL
+ BAY4A/newline TERMINATE_LABEL/newline}
if BAY5 <> "A00000" then
{BEGIN_LABEL + replace(BAY5A," ","")/newline
END_LABEL
+ BAY5A/newline TERMINATE_LABEL/newline}
if BAY6 <> "A00000" then
{BEGIN_LABEL + replace(BAY6A," ","")/newline
END_LABEL
+ BAY6A/newline TERMINATE_LABEL/newline}
if BAY7 <> "A00000" then
{BEGIN_LABEL + replace(BAY7A," ","")/newline
END_LABEL
+ BAY7A/newline TERMINATE_LABEL/newline}
if BAY8 <> "A00000" then
{BEGIN_LABEL + replace(BAY8A," ","")/newline
END_LABEL
+ BAY8A/newline TERMINATE_LABEL/newline}
if BAY9 <> "A00000" then
{BEGIN_LABEL + replace(BAY9A," ","")/newline
END_LABEL
+ BAY9A/newline TERMINATE_LABEL/newline}
if BAY11 <> "A00000" then
{BEGIN_LABEL + replace(BAY11A," ","")/newline
END_LABEL
+ BAY11A/newline TERMINATE_LABEL/newline}
if BAY12 <> "A00000" then
{BEGIN_LABEL + replace(BAY12A," ","")/newline
END_LABEL
+ BAY12A/newline TERMINATE_LABEL/newline}
if BAY13 <> "A00000" then
{BEGIN_LABEL + replace(BAY13A," ","")/newline
END_LABEL
+ BAY13A/newline TERMINATE_LABEL/newline}
if BAY14 <> "A00000" then
{BEGIN_LABEL + replace(BAY14A," ","")/newline
END_LABEL
+ BAY14A/newline TERMINATE_LABEL/newline}
if BAY15 <> "A00000" then
{BEGIN_LABEL + replace(BAY15A," ","")/newline
END_LABEL
+ BAY15A/newline TERMINATE_LABEL/newline}
if BAY16 <> "A00000" then
{BEGIN_LABEL + replace(BAY16A," ","")/newline
END_LABEL
+ BAY16A/newline TERMINATE_LABEL/newline}
if BAY17 <> "A00000" then
{BEGIN_LABEL + replace(BAY17A," ","")/newline
END_LABEL
+ BAY17A/newline TERMINATE_LABEL/newline}
if BAY18 <> "A00000" then
{BEGIN_LABEL + replace(BAY18A," ","")/newline
END_LABEL
+ BAY18A/newline TERMINATE_LABEL/newline}
if BAY19 <> "A00000" then
{BEGIN_LABEL + replace(BAY19A," ","")/newline
END_LABEL
+ BAY19A/newline TERMINATE_LABEL/newline}
This one is from David Weinstein. It allows the printing of pricing on the label if you choose.
This would be good for labeling at the sales counter.
/*****************************************************************
This is the original program as supplied by Dave Weinstein of
Kennedy Electric - with one exception: the original began the
attention-getter sequence with "?L", and that has now been
replaced with the octal command for the ascii "STX" character,
so now the attention-getter sequence reads
"<002>"+"L"/newline.
*******************************************************************/
/**** Dave's notes:
PROGRAM
ICI040.EQ
Client
403 - Kennedy Electric
VERSION
1.0 12/98 DAVID WEINSTEIN
Actually a copy of ICI020 cut on 12/98 for AUG
NOTES
PRINT SHELF LABEL FOR BARCODED INVENTORY CONTROL
Works exclusively with the ALLEGRO Datamax barcode printer
but doesn't use K_BARLABELS so it can be shared
**************************************************************************/
/* Lets you put base price on the label if you want */
DEFINE SIGNED BINARY NUMBER L_SELL = INV_MST:COST_LIST/DEC=2
DEFINE
define
define
define
define
STRING
string
string
string
string
define string
L_PREFIXITEMS = "122400200580005"
L_PREFIXITEML = "161100200580005"
L_PREFIXDCI = "1J730300015004000"
L_PREFIXDESC = "112200200030015"
L_PREFIXBIN = "112200200350235"
L_PREFIXITEM = IF LEN(TRUN(inv_mst:ITEM)) > 16
THEN L_PREFIXITEMS
ELSE L_PREFIXITEML
DEFINE STRING L_SEEK[18] = PARAMETER/CLS/COL=2/LINE=10/UPPERCASE
/PROMPT = "(ICI040) Enter Prefix Of Item For Labels "
DEFINE UNSIGNED ASCII NUMBER L_MAX = LEN(TRUN(L_SEEK))
DEFINE STRING L_TYPE[1] = PARAMETER/COL=2/LINE=12/uppercase
/PROMPT = "Comment on Label (P)rice, (D)=DCI, (B)=Bin Loc, (X)=Nothing
DEFAULT "B"
"
DEFINE UNSIGNED ASCII NUMBER L_QTY[4] = PARAMETER/COL=2/LINE=14
/PROMPT = "How Many Labels Do You Want "
DEFAULT 1
DEFINE UNSIGNED BINARY NUMBER L_WARE[1] = PARAMETER/COL=2/LINE=16
/PROMPT = "Use What Warehouse for Bin Location "
DEFAULT 1
DEFINE FILE XWARE = ACCESS WHSE_RE,
SET WHSE_RE:WARE = L_WARE,
WHSE_RE:ITEM = INV_MST:ITEM,
USING FIRST INDEX, EXACT
DEFINE STRING L_BINSUFFIX = IF L_TYPE = "D" THEN INV_MST:INDUSTRY[7,12]
ELSE IF L_TYPE = "B" THEN XWARE:BIN
ELSE IF L_TYPE = "P" THEN "$"+STR(L_SELL)
ELSE ""
WHERE INV_MST:ITEM[1,L_MAX] = TRUN(L_SEEK)
LIST/DOMAIN="INV_MST"/PAGELENGTH=0/NODEFAULTS/NOHEADINGS/NOBANNER
L_PREFIXITEM + INV_MST:ITEM/NEWLINE
L_PREFIXDESC + INV_MST:DESC/NEWLINE
IF LEN(TRUN(INV_MST:INDUSTRY)) = 11 THEN L_PREFIXDCI + INV_MST:INDUSTRY/NEWLINE
"E"/NEWLINE
SORTED BY INV_MST:ITEM
/* Must use TOP OF or you won't have the BL and D11 prefixes set-up properly */
TOP OF INV_MST:ITEM
"<002>" + "L"/NEWLINE
"D11"/NEWLINE
"Q"/col=1
L_QTY/mask="9999"/width=4/col=2/newline
L_PREFIXBIN + L_BINSUFFIX
This one makes a bar coded item label along with some other information such as item type,
bin location, etc. You can see that it is derived primarily from David’s original query above.
/*****************************************************************
MAKE CHOICE OF QTY OF A BARCODED ITEM IDENTIFIER BY ITEM RANGE
-Steve Shuman 06/6/99
**************************************************************************/
/* Lets you put base price on the label if you want */
DEFINE SIGNED BINARY NUMBER L_SELL = INV_MST:COST_LIST/DEC=2
DEFINE STRING
LOGO_BANNER
= "121100200830005" +
" Nelson Electric 800-80-NELSON" +
" (800-806-3576)"
DEFINE STRING
L_PREFIXITEMS = "141100200580005"
define string
L_PREFIXITEML = "141100200580005"
define string
L_PREFIXDCI_2 = "1E7303000150040A"
define string
L_PREFIXDCI
= "1E7203000150020A"
/** NOTE: the "A" subset of code 128 is selected with the additional
"A" character at the end of the above placement strings.
****/
define string
L_PREFIXDESC = "112200200030015"
define string
L_PREFIXBIN
= "221100200800288"
define string
PREFIX_DATE
= "221100200800275"
define string
L_PREFIXITEM = IF LEN(TRUN(inv_mst:ITEM)) > 16
THEN L_PREFIXITEMS
ELSE L_PREFIXITEML
DEFINE STRING L_SEEK[18] = PARAMETER/UPPERCASE
/PROMPT = "Enter Beginning Item:"
DEFINE STRING L_SEEK2[18] = PARAMETER/UPPERCASE
/PROMPT = "Enter Ending Item:"
DEFAULT L_SEEK
DEFINE STRING L_TYPE[1] = "B"
/***
PARAMETER/COL=2/LINE=12/uppercase
/PROMPT = "Comment on Label (P)rice, (D)=DCI, (B)=Bin Loc, (X)=Nothing
DEFAULT "B"
****/
DEFINE UNSIGNED ASCII NUMBER L_QTY[4] = PARAMETER
/PROMPT = "How Many Labels of Each?"
DEFAULT 1
DEFINE UNSIGNED BINARY NUMBER L_WARE[1] = PARAMETER
/PROMPT = "Which Warehouse?"
DEFAULT 1
DEFINE FILE XWARE = ACCESS WHSE_RE,
SET WHSE_RE:WARE = L_WARE,
WHSE_RE:ITEM = INV_MST:ITEM,
USING FIRST INDEX, EXACT
define number
define string
LEN_BIN
= len(trun(xware:bin))
NUM_SPACES = if LEN_BIN = 8 then "
if LEN_BIN = 7 then "
if LEN_BIN = 6 then "
if LEN_BIN = 5 then "
if LEN_BIN = 4 then "
if LEN_BIN = 3 then "
if LEN_BIN = 2 then "
if LEN_BIN = 1 then "
if LEN_BIN = 0 then "
" else
" else
" else
" else
" else
" else
" else
" else
"
DEFINE STRING L_BINSUFFIX = IF L_TYPE = "D" THEN INV_MST:INDUSTRY[7,12]
ELSE IF L_TYPE = "B" THEN XWARE:BIN +
NUM_SPACES + INV_MST:TYPE
ELSE IF L_TYPE = "P" THEN "$"+STR(L_SELL)
ELSE ""
WHERE INV_MST:ITEM => TRUN(L_SEEK)
AND INV_MST:ITEM <= TRUN(L_SEEK2)
LIST/DOMAIN="INV_MST"/PAGELENGTH=0/NODEFAULTS/NOHEADINGS/NOBANNER
L_PREFIXITEM + INV_MST:ITEM/NEWLINE
L_PREFIXDESC + INV_MST:DESC/NEWLINE
IF LEN(TRUN(INV_MST:INDUSTRY)) = 11 THEN
{L_PREFIXDCI + INV_MST:INDUSTRY
} ELSE
{L_prefixdci + (TRUN(INV_MST:ITEM)) }
""/NEWLINE
"E"/NEWLINE
"
SORTED BY INV_MST:ITEM
/* Must use TOP OF or you won't have the BL and D11 prefixes set-up properly */
TOP OF INV_MST:ITEM
"<002>" + "L"/NEWLINE
"D11"/NEWLINE
"Q"/col=1
L_QTY/mask="9999"/width=4/col=2/newline
L_PREFIXBIN + L_BINSUFFIX/newline
PREFIX_DATE todaysdate/width=6/newline
LOGO_BANNER/NEWLINE
The below example makes labels for qty received. David Weinstein uses this in his
warehouse automation system. (I can’t help but add an editorial comment recommending
caution when using this practice: If your user sticks labels on the parts there is a good chance
that the item will be misidentified. A stronger solution is the way TPW does this – which is
to have a printer on each person’s belt to print labels on demand as soon as an item is
discovered to be non-scannable. Of course it is not fair to pick out this one practice when in
fact David has an entire system running – but please think about who has access to printing
item labels and make sure they know when to use them and when not to use them.) David
uses a custom database that cross-references the number against the number of bar codes to
print for a specific item. I changed his query to add the “How_Many” number instead of this
field, but you can modify it to your tastes. David says that qty received divided by package
size is a rough approximation of what he uses with this query.
/* PROGRAMICI024.EQ
VERSION1.0 11/1/94 DAVID WEINSTEIN (Modified by Steve Shuman)
NOTES
Prints Barcode Labels for receivings that call for it
**************************************************************************/
Define unsigned ascii number l_pono[7] = parameter/cls/column=10/line=10
/prompt = "(ICI024) Purchase Order Number "
Define number How_Many
= parameter/prompt="How many of each label?"
DEFINE STRING L_PREFIXITEMS = "122400200580005"
define STRING L_PREFIXITEML = "161100200580005"
define string L_PREFIXDCI
= "1J730300015005000"
define string L_PREFIXDESC = "112200200030015"
define string L_PREFIXITEM = IF LEN(TRUN(inv_mst:ITEM)) > 16
THEN L_PREFIXITEMS
ELSE L_PREFIXITEML
Where po_det:order = l_pono and inv_mst:misc_sort = 999
LIST/DOMAIN="PO_DET"/PAGELENGTH=0/NODEFAULTS/NOHEADINGS/NOBANNER
L_PREFIXITEM + PO_DET:ITEM/NEWLINE
L_PREFIXDESC + INV_MST:DESC/NEWLINE
L_PREFIXDCI + INV_MST:INDUSTRY/NEWLINE
"E"/NEWLINE
SORTED BY inv_mst:ITEM
TOP OF inv_mst:ITEM
"L"/NEWLINE
"D11"/NEWLINE
"Q"/col=1
How_Many/mask="9999"/width=4/col=2
The below example makes labels for a specific receiver. David Weinstein says this is useful
for setting up a new warehouse.
/* PROGRAM
Client
VERSION
ICI042.EQ
403 - Kennedy Electric
1.0 11/99 DAVID WEINSTEIN
NOTES
PRINT SHELF LABEL FOR BARCODED INVENTORY CONTROL
DIRECTLY FROM A PO RECEIVING
**************************************************************************/
Define unsigned ascii number l_prefix[7] = parameter/cls/col=10/line=10
/prompt = "(ICI042) Enter PO# for barcode labels "
Define unsigned ascii number l_suffix[3] = parameter/col=41/line=12
/prompt = "Enter Receiver Number"
DEFINE STRING
L_PREFIXITEMS = "122400200580005"
L_PREFIXITEML = "161100200580005"
L_PREFIXDCI = "1J730300015005000"
L_PREFIXDESC = "112200200030015"
L_PREFIXBIN = "112200200350235"
L_TODAY = "JAN 1996"
L_PREFIXITEM = IF LEN(TRUN(po_rhst:ITEM)) > 16
THEN L_PREFIXITEMS
ELSE L_PREFIXITEML
Where po_rhst:po_prefix = l_prefix
and po_rhst:release = l_suffix
LIST/DOMAIN="po_rhst"/PAGELENGTH=0/NODEFAULTS/NOHEADINGS/NOBANNER
L_PREFIXITEM + po_rhst:ITEM/NEWLINE
L_PREFIXDESC + INV_MST:DESC/NEWLINE
IF LEN(TRUN(INV_MST:INDUSTRY)) = 11 THEN L_PREFIXDCI + INV_MST:INDUSTRY/NEWLINE
"E"/NEWLINE
SORTED BY po_rhst:item
/* Must use TOP OF or you won't have the BL and D11 prefixes set-up properly */
TOP OF po_rhst:ITEM
"_L"/NEWLINE
"D11"/NEWLINE
"Q"/col=1
k_barlabels:qty/mask="9999"/width=4/col=2/newline
L_PREFIXBIN
This document provided as a service to AUG members
-Steve Shuman