Code Comments
Programming Forum and web based access to our favorite programming groups.Can anyone provide some insight on the best approach to printing a barcode from MFCOBOL? Any help would be appreciated. Jason
Post Follow-up to this messageJason, 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 >
Post Follow-up to this messageEons 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 c ome in all shapes and sizes nowadays) in the correct place(s). HTH "Jason_Thomas" <jthomas@medata.com> wrote in message news:c9b4feb77f3038a303b597ac045ebf97@ localhost.talkaboutprogramming.com... > Can anyone provide some insight on the best approach to printing a barcode > from MFCOBOL? > > Any help would be appreciated. > > Jason >
Post Follow-up to this messageA quick search gave me a few possibilities for you: For .NET: http://www.barcodenet.net/download.htm GNU Barcode : Linux/Unix http://arcana.linux.it/software/index.html#barcode KBarcode for Linux : http://www.kbarcode.net/ Java based API: http://barbecue.sourceforge.net/ Win32 Article/Source Code: http://www.codeguru.com/Cpp/misc/mi...icle.php/c3825/ The search I used: http://www.google.com/search?source...%2Bapi--Stephen"Jason_Thomas" <jthomas@medata.com> wrote in messagenews:c9b4 feb77f3038a303b597ac045ebf97@localhost.talkaboutprogramming.com...> Can anyo ne provide some insi ght on the best approach to printing a barcode> from MFCOBOL?>> Any help wou ld be appreciated.>> Jason>
Post Follow-up to this messageJason_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.
Post Follow-up to this messageJason_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
Post Follow-up to this message"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.
Post Follow-up to this messageWilliam 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 othe r >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
Post Follow-up to this messageOn 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.
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.