Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing Graphics in COBOL

Status
Not open for further replies.

jmanj

Programmer
May 20, 2003
298
US
Here I am again trying to see if anyone has done graphics printing in COBOL. This means printing boxes, shading, font sizing etc just like printing pay stubs. I have done this but in different language. I'm trying to convert paycheck printing in unix environment using micro focus server express 2.2 cobol.

Appreciate any help.
 
Flexus has a product called PrintForm that allows printing with shading and I think it works with micro focus cobol.

bawstl
 
Well you can fool around with ascii special characters for box drawing and shading and printer escape codes for fonts. However this can be very tedious. A far better way, especially if you know HTML and CSS, is to inject HTML tags into the output stream. To position things in exact places use CSS "position:absolute". To draw boxes use HTML "tables" and for shading use CSS "background:". See faq209-4552

Clive
 
I have written a program that functions exactly as CliveC says.

It reads a record, and then proceeds to draw a table and cells, shadings where appropriate and other pieces of data where needed.

The program uses HTML tags stored in the WORKING-STORAGE SECTION to produce neat looking graphical outputs.
 
Well I did'nt know that this can pose a greater challenge than expected. Anyway, I was just trying my client to get rid of a third party software that extract data and use their product just to print paychecks and advices. I was thinking if there is a way to have cobol issue PCL escape sequences(which usually is the case of creating graphics, fonts, micr and embedded signatures etc).

In this case it would be better for me to offer them far cheaper solution to their printing needs. I used to program in SQR which is a high level SQL language. This product is way cheaper to own than the third party software they have now. This product can do graphics and whatever commands any printer can understand and what I like about it it's database connectivity. It can connect to almost any type of database all in a single program. All I have to do is simply extract the data and sent it to an SQR program to print it.

By the way I have installed this SQR product in PC clients, AS400, Tandem, Sun servers(unix) and NTs.
 
You can definitely intermix hex escape sequences and data in a cobol print file, we do it all the time.
 
HTML would be a better solution in general, but if you are talking about programing for a specific client who has standardized its printers (at least for the given application), escape sequences are probably easier.

I have a great deal writing HP PCL escape sequences from Micro Focus COBOL. I also use such sequences in ascii text editors.

I have tried writing both HTML and RTF from COBOL with limited success. If anyone has a source of good documentation for either, I would be glad.

I have a software package I sell written in Micro Focus COBOL. Most reports are fine with standard COBOL Advancing syntax, but things like checks require graphics. I have programs which write checks (requires MICR toner cartriges) and barcodes using PCL6, but I would really like a more generic method.
 
RmCobol for windows has real control over the windows printer dialog. I have print programs that draw boxes,
do shading, Change fonts on the fly, duplexing, and I can print right side up and upside down on the same page so it can be folded into and envelope.

Enjoy Bob
 
Hello all

I work with AcuCobol, and have faced similar problems when trying to print graphics within reports (and printing a stream of cheques could qualify as a type of report). The best thing we found out there was Active Reports by DataDynamics. It's just an OCX that you plug into your app, and then you can use it very much like Crystal Reports to connect to a database, retrieve your data, and print it in several differnt ways.

We also tried Crystal, but found that Active weas much easier to use (especially since its an OCX and it plugs in more easily into the app).

You can find demo version of Active on
.DaviD.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top