From: Nitin Kothari on
Hi,

I am using MFCOBOL 4.5 (DOS/Novell Version) to develop commercial
application from last 18 years. I have done lot of development during
this tenure. Around 40 large softwares has been developed by me
individually. I am heading community of users in India. It works fine
on all windows operating system upto from 98 to VISTA.

I came to know about this group recently and happy to know that people
are actively contributing to keep COBOL alive. I always call myself as
"Its not COBOL Over.... but I am COBO Lover.....

Many of my customer has now bought laser printer, They would like to
print output on laser printer instead of DOT Matrix printer.

There may be print out of large sheet paper of 132 column, which needs
to be condensed from software to print correctly on laser printer,
which we can easily do on dot matrix printer.

Can any one share their knowledge on same?

Awaiting your response to the earliest.

Nitin Kothari
Mumbai, India
9867696515

From: Michael Mattias on
"Nitin Kothari" <nitkot(a)gmail.com> wrote in message
news:8a8711d3-2898-4129-90a1-695c8818b1e4(a)b2g2000prf.googlegroups.com...

> am using MFCOBOL 4.5 (DOS/Novell Version) ....
> Many of my customer has now bought laser printer, They would like to
> print output on laser printer instead of DOT Matrix printer.
>
> There may be print out of large sheet paper of 132 column, which needs
> to be condensed from software to print correctly on laser printer,
> which we can easily do on dot matrix printer.
>
> Can any one share their knowledge on same?

There should be an escape sequence you can send to the printer to throw it
into "condensed" mode. This will be documented in the printer's owner's
manual or reference manual. (Just like it works on your dot matrix).

That is, assuming this printer is NOT a 'Windows only' printer, in which
case it will print only thru the Windows' driver. If a printer connects via
USB port, good chance it's a "Windows-only" printer. Excellent chance
actually. Um, make that a virtual "lock."

If you can 'copy filename LPT1:' from a command prompt and it prints (you
may have to manually hit the 'form feed' button to eject the sheet), you are
OK.

If this is a Windows'-only printer, you should be able to find a utilty
which prints text files thru Windows facilities ....and you could call that
as an external program from your COBOL program after generating your report
to a disk file. (I know such utilities exist.... eg in my "other language'
group someone posted one for free use for others to use. These utilities
should offer an option for you to specify the font to be used, and selecting
the correct font size/characteristics will handle the 'condensed'
requirement.

--
Michael C. Mattias
Tal Systems Inc.
Racine WI
mmattias(a)talsystems.com





















From: Howard Brazee on
On Thu, 11 Sep 2008 07:52:41 -0500, "Michael Mattias"
<mmattias(a)talsystems.com> wrote:

>That is, assuming this printer is NOT a 'Windows only' printer, in which
>case it will print only thru the Windows' driver. If a printer connects via
>USB port, good chance it's a "Windows-only" printer. Excellent chance
>actually. Um, make that a virtual "lock."

My wife's USB printer works similarly with Mac drivers. I don't know
how it works with Linux. I suppose the driver accepts the same
commands.

--
"In no part of the constitution is more wisdom to be found,
than in the clause which confides the question of war or peace
to the legislature, and not to the executive department."

- James Madison
From: Richard on
On Sep 12, 12:52 am, "Michael Mattias" <mmatt...(a)talsystems.com>
wrote:
> "Nitin Kothari" <nit...(a)gmail.com> wrote in message
>
> news:8a8711d3-2898-4129-90a1-695c8818b1e4(a)b2g2000prf.googlegroups.com...
>
> > am using MFCOBOL 4.5 (DOS/Novell Version) ....
> > Many of my customer has now bought laser printer, They would like to
> > print output on laser printer instead of DOT Matrix printer.
>
> > There may be print out of large sheet paper of 132 column, which needs
> > to be condensed from software to print correctly on laser printer,
> > which we can easily do on dot matrix printer.
>
> > Can any one share their knowledge on same?
>
> There should be an escape sequence you can send to the printer to throw it
> into "condensed" mode. This will be documented in the printer's owner's
> manual or reference manual. (Just like it works on your dot matrix).
>
> That is, assuming this printer is NOT a 'Windows only' printer, in which
> case it will print only thru the Windows' driver. If a printer connects via
> USB port, good chance it's a "Windows-only" printer. Excellent chance
> actually. Um, make that  a virtual "lock."

Not true. There is no relationship between the printer being a 'GDI'
device and the interface used. GDI may be parallel port, USB or
network, but full PCL or PS printers will also use these.

In fact just yesterday I installed a new OKI B4600 PCL page printer
using USB.

> If you can 'copy filename LPT1:'   from a command prompt and it prints (you
> may have to manually hit the 'form feed' button to eject the sheet), you are
> OK.

It is unlikely that this will work without first setting the printer
to 'capture' LPT1.


> If this is a Windows'-only printer, you should be able to find a utilty
> which prints text files thru Windows facilities ....and you could call that
> as an external program from your COBOL program after generating your report
> to a disk file.  (I know such utilities exist.... eg in my "other language'
> group someone posted one for free use for others to use.  These utilities
> should offer an option for you to specify the font to be used, and selecting
> the correct font size/characteristics will handle the 'condensed'
> requirement.
>
> --
> Michael C. Mattias
> Tal Systems Inc.
> Racine WI
> mmatt...(a)talsystems.com

From: Richard on
On Sep 12, 12:26 am, Nitin Kothari <nit...(a)gmail.com> wrote:
> Hi,
>
> I am using MFCOBOL 4.5 (DOS/Novell Version) to develop commercial

That is probably MicroSoft COBOL 4.5 which is a version of Microfocus
(MF) 3.x.

> application from last 18 years. I have done lot of development during
> this tenure. Around 40 large softwares has been developed by me
> individually. I am heading community of users in India. It works fine
> on all windows operating system upto from 98 to VISTA.
>
> I came to know about this group recently and happy to know that people
> are actively contributing to keep COBOL alive. I always call myself as
> "Its not COBOL Over.... but I am COBO Lover.....
>
> Many of my customer has now bought laser printer, They would like to
> print output on laser printer instead of DOT Matrix printer.

If it is an HP or emulates it and supports PCL then the hex codes that
I would use are:

0x1B451B266C314F
0x1B2838551B2873307031362E363668382E3576307330623054
0x1B266C3844
0x1B266131354C

Note that 1B is escape and starts a string that ends with an upper
case letter that is the actual command. Lower case letters are also
commands but don't end the string. Escape indicated by @:

@E reset
@&l1O orientation landscape
@(8U can't remember
@(s0p16.66h8.5v0s0b0T 16.66 cpi 8.5 lpi fixed font
@&l8D top margin ??
@&a15L left margin 15

I have these strings in a control file that has different settings
depending on what the user requires.

If the printer is not PCL then it may have emulations that could be
used instead, such as IBM Proprinter.

The printer will need to be set to 'capture' a port that the program
can access, such as 'LPT1'. Some GDI drivers can, some will not. Most
real printer (non GDI) drivers can, after setting them to share, with

net use LPT1 \\server\sharename

(may not work on XP Home or other limited version, with Vista: don't
know, don't care, don't want to know)

You may need to ensure that the print driver has a 'raw' setting for
these to pass through.


> There may be print out of large sheet paper of 132 column, which needs
> to be condensed from software to print correctly on laser printer,
> which we can easily do on dot matrix printer.
>
> Can any one share their knowledge on same?
>
> Awaiting your response to the earliest.
>
> Nitin Kothari
> Mumbai, India
> 9867696515