| Author |
Printing a barcode from MFCOBOL
|
|
| Jason_Thomas 2004-09-17, 8:55 pm |
| Can anyone provide some insight on the best approach to printing a barcode
from MFCOBOL?
Any help would be appreciated.
Jason
| |
| William M. Klein 2004-09-17, 8:55 pm |
| Jason,
Just so you don't get "wrong" answers ...
What do you mean by "MFCOBOL"
- Micro Focus COBOL
or
- Mainframe COBOL (and if so which mainframe)
That abbreviation is used for both - by those who "assume" what or the other
environments.
--
Bill Klein
wmklein <at> ix.netcom.com
"Jason_Thomas" <jthomas@medata.com> wrote in message
news:c9b4feb77f3038a303b597ac045ebf97@lo
calhost.talkaboutprogramming.com...
> Can anyone provide some insight on the best approach to printing a barcode
> from MFCOBOL?
>
> Any help would be appreciated.
>
> Jason
>
| |
| Capomaestro 2004-09-17, 8:55 pm |
| Eons ago I wrote some CoBOL code that drove Printronix barcode printers from CICS. The code built complete data buffers with the
necessary escape characters and printer directives imbedded.
So the answer is, it's a stream with the proper printer commands (barcodes come in all shapes and sizes nowadays) in the correct
place(s).
HTH
"Jason_Thomas" <jthomas@medata.com> wrote in message news:c9b4feb77f3038a303b597ac045ebf97@lo
calhost.talkaboutprogramming.com...
> Can anyone provide some insight on the best approach to printing a barcode
> from MFCOBOL?
>
> Any help would be appreciated.
>
> Jason
>
| |
|
|
| JerryMouse 2004-09-17, 8:55 pm |
| Jason_Thomas wrote:
> Can anyone provide some insight on the best approach to printing a
> barcode from MFCOBOL?
>
> Any help would be appreciated.
There are (at least) two ways to print barcodes:
1. You are printing to a barcode printer. In this case, you must hand-craft
the special codes for each type of printer.
2.
a. You are printing to a general purpose printer (laser, dot-matrix, etc.).
Here you turn the project over to the operating system, such as Windows, by
specifying the font you want to use and letting the OS figure it out.
b. You use some barcode printing software that has the fonts built in (so
you don't have to install the fonts on the target computer).
Sorry I can't be of more specific help; we use PowerForm (part of Fujitsu's
PowerCOBOL) to print to page printers and use it to print barcodes on 3x10
sheets. Trivial.
| |
| Donald Tees 2004-09-18, 3:55 am |
| Jason_Thomas wrote:
> Can anyone provide some insight on the best approach to printing a barcode
> from MFCOBOL?
>
> Any help would be appreciated.
>
> Jason
>
A barcode is simply a font. Treat it pretty well the same as any other
in-line font change. You need the font, of course. I have a public
domain code39 font. If you need it, contact me by email.
Donald
| |
| Richard 2004-09-18, 3:55 am |
| "Jason_Thomas" <jthomas@medata.com> wrote
> Can anyone provide some insight on the best approach to printing a barcode
> from MFCOBOL?
I don't think that there is a 'the best approach'. It depends on your
actual needs.
When printing barcodes using matrix printers for pre-printed dockets
(picking slips, invoices, etc) I have code that will put the bar code
instructions into the print data but this uses printer specific
commands for several different printers that I need to use. Printers
like OKI 521/721 have built in barcode generators which only need a
few bytes of command plus the code to use.
I have also driven older printers by switching to graphics and
calculating the bar code patterns, but I wouldn't recommend this.
These require that the Cobol and the OS don't get in the way and try
to override what _I_ want to do. For example you should check the 'N'
runtime switch if you are using LINE SEQUENTIAL for printing.
For old lasers I have generated the bar code patterns as a series of
black rectangles. Again quite easy even when printing in text mode. I
have one on the wall from a series that I did with A3 sized barcodes
to mark warehouse locations that can be read from 12 feet away (ie
while standing on the ground).
So what may be a 'good' way will depend on the application, how it
prints now, the type of printer, whether the OS will get in the way
and many other things.
| |
| James J. Gavan 2004-09-18, 3:55 am |
| William M. Klein wrote:
>Jason,
> Just so you don't get "wrong" answers ...
>
>What do you mean by "MFCOBOL"
>
> - Micro Focus COBOL
> or
> - Mainframe COBOL (and if so which mainframe)
>
>That abbreviation is used for both - by those who "assume" what or the other
>environments.
>
>
>
Follow-up to Bill's. If it is Micro Focus got to microfocus.com and join
Answer Exchange - see what they come up with.
Jimmy
| |
| Robert Wagner 2004-09-28, 8:55 am |
| On Thu, 23 Sep 2004 19:00:35 -0400, "Jason_Thomas"
<jthomas@medata.com> wrote:
>We are using Micro Focus COBOL Net express 3.1. We are cross platform
>compiling to .dll's and .exe's for windows and .gnt's for UNIX, Linux, AIX
>etc. We use the same source code and copylibs for windows and UNIX, Linux
>etc. With one exception and that are a couple of display copylibs.
>
>We try to stay away from using third party software because we lease our
>product.
>
>Our internal print programs use API calls to windows and escape sequences
>(in hex) for UNIX etc.
You can't count on the operating system to provide a font. Can you
require an HP (PCL) or PostScript printer? They come with (or you can
download) barcode fonts.
|
|
|
|