Compressed Text
Dave Knispel
dave.knispel@frequencymarketing.com
Wed, 30 Aug 2000 16:05:57 -0400
This is a multi-part message in MIME format.
------=_NextPart_000_0178_01C0129C.2EF0B920
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Below is what we do here. We have this in a file that we "USE" inside =
Quiz.
;Following are escape sequences for printer controls...
DEFINE escape-i INTEGER*2 =3D 27
DEFINE escape-c CHARACTER*2 =3D CHARACTER(escape-i)
DEFINE cpi-10 CHARACTER*10 =3D escape-c[2:1] + "(s10H "
DEFINE cpi-12 CHARACTER*10 =3D escape-c[2:1] + "(s12H "
DEFINE cpi-16 CHARACTER*10 =3D escape-c[2:1] + "(s16.7H "
DEFINE cpi-20 CHARACTER*10 =3D escape-c[2:1] + "(s20H "
DEFINE high-dens CHARACTER*10 =3D escape-c[2:1] + "(s1Q "
DEFINE stnd-dens CHARACTER*10 =3D escape-c[2:1] + "(s0Q "
DEFINE stnd-mode CHARACTER*10 =3D escape-c[2:1] + "&k0S "
DEFINE comp-mode CHARACTER*10 =3D escape-c[2:1] + "&k2S "
DEFINE expd-mode CHARACTER*10 =3D escape-C[2:1] + "&k8S "
DEFINE lpi-6 CHARACTER*10 =3D escape-c[2:1] + "&l6D "
DEFINE lpi-8 CHARACTER*10 =3D escape-c[2:1] + "&l8D "
DEFINE displayon CHARACTER*10 =3D escape-c[2:1] + "Y "
DEFINE displayof CHARACTER*10 =3D escape-c[2:1] + "Z "
DEFINE perf-sknf CHARACTER*10 =3D escape-c[2:1] + "&l1L "
;added codes for laserjet printer
DEFINE printer-reset CHAR*5 =3D escape-c[2:1] + "E "
DEFINE bold-on CHARACTER*5 =3D escape-c[2:1] + "(s3B"
DEFINE bold-off CHARACTER*5 =3D escape-c[2:1] + "(s0B"
DEFINE under-on CHARACTER*5 =3D escape-c[2:1] + "&d3D"
DEFINE under-off CHARACTER*5 =3D escape-c[2:1] + "&d@ "
DEFINE portrait CHARACTER*5 =3D escape-c[2:1] + "&l0O"
DEFINE landscape CHARACTER*5 =3D escape-c[2:1] + "&l1O"
DEFINE upperpapr CHARACTER*5 =3D escape-c[2:1] + "&l1H"
DEFINE lowerpapr CHARACTER*5 =3D escape-c[2:1] + "&l4H"
DEFINE letter CHARACTER*5 =3D escape-c[2:1] + "&l2A"
DEFINE legal CHARACTER*5 =3D escape-c[2:1] + "&l3A"
DEFINE line84pg CHARACTER*6 =3D escape-c[2:1] + "&l84P"
DEFINE font0239 CHARACTER*7 =3D escape-c[2:1] + "(0239X"
DEFINE font3015 CHARACTER*7 =3D escape-c[2:1] + "(3015X"
DEF ESC CHAR*1 =3D ESCAPE-C[2:1]
DEFINE font02 CHARACTER*26 =3D &
esc + "&l10" + esc + "(8u" + esc + "(s0p12h10v0s3b8T"
DEFINE font05 CHARACTER*26 =3D &
esc + "&l10" + esc + "(8u" + esc + "(s0p16.67h8.5v0s3b0T"
DEFINE font10 CHARACTER*26 =3D &
esc + "&l10" + esc + "(8u" + esc + "(s0p15h8.5v0s3b0T"
DEFINE SIMPLEX CHARACTER*5 =3D ESC + "&l0S"
DEFINE DUPLEX-LONG-EDGE CHARACTER*5 =3D ESC + "&l1S"
DEFINE DUPLEX-SHORT-EDGE CHARACTER*5 =3D ESC + "&l2S"
David Knispel
dave.knispel@frequencymarketing.com
Phone: 513-248-5029
Fax: 513-248-2672
----- Original Message -----=20
From: Mike Palandri <palandri@eug4ja.lane.edu>
To: Grace, Jim <graceji@ccac-casc.on.ca>; 'powerh-l@lists.swau.edu' =
<powerh-l@sphere.swau.edu>
Sent: Wednesday, August 30, 2000 4:01 PM
Subject: Re: Compressed Text
> When I worked on an HP 3000, we used a cobol program to send the =
appropriate control codes to the laser printer, then fcopied the report =
from a disk text file to the printer. Here's a sample command file. I =
can post the cobol code if you want, it is only about 360 lines.
>=20
>=20
> FILE SCHED=3DOIR0103A;TEMP
> FILE HARD;REC=3D-130
> LCC0001.RUN;INFO=3D"RS,LA,8L,PL60,CO,MW08"
> FCOPY FROM=3D*SCHED;TO=3D$HARD > $NULL
> LCC0001.RUN;INFO=3D"RS"
>=20
>=20
>=20
> At 02:33 PM 08/30/2000 -0400, Grace, Jim wrote:
> >I am trying to compress the text in a quiz report to print out on an =
HP
> >laser jet 8000N. I am trouble getting the on and off codes to work. =
I have
> >an example from Cognos on how to do it. Has anyone been successful =
with
> >this.
> >
> >Please let me know.
> >
> >Thanks
> >
> >The example below should cause a compressed font to be used by th =
printer.
> >
> >Quiz=20
> >
> >>DEF escn int*1 =3D 27;=20
> >>def esc char*1 =3D char(escn)[2:1]; this will send the Esc sequence =
to the
> >printer
> >>def COMPRESSION char*2 =3D esc + "<on code>"; see printer manual =
for this
> >code
> >>def COMPRESSOFF char*2 =3D esc + "<off code>"; see printer manual =
for this
> >code
> >>REPORT COMPRESSION "Compressed" COMPRESSOFF "NOT Compressed"
> >
> >If this works, the string,"compressed", should appear in small fonts.
> >
> >If it does not then the escape sequence code selected is wrong for =
the
> >printer. Each printer has its own set of printer control code =
sequences.
> >Refer to your printer manual or call the manufacturer/vendor.
> >
> >If it is necessary to have the page headings compressed, add the =
COMPRESSION
> >item to the beginning of the page heading, or to the initial page =
heading.
> >Turn off the compression setting sent to the printer, by reporting =
the
> >COMPRESSOFF item in the final footing of the report.
> >
> >=3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =
=3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =
=3D =3D =3D
> >Subscribe: "subscribe powerh-l" in message body to =
majordomo@lists.swau.edu
> >Unsubscribe: "unsubscribe powerh-l" in message to =
majordomo@lists.swau.edu
> >This list is closed, thus to post to the list, you must be a =
subscriber.
> >
>=20
> Mike
------=_NextPart_000_0178_01C0129C.2EF0B920
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Below is what we do here. We have =
this in a=20
file that we "USE" inside Quiz.</FONT></DIV>
<DIV><BR><FONT face=3D"Courier New" size=3D2>;Following are escape =
sequences for=20
printer controls...<BR>DEFINE escape-i INTEGER*2 =
=3D=20
27<BR>DEFINE escape-c CHARACTER*2 =3D =
CHARACTER(escape-i)<BR>DEFINE=20
cpi-10 CHARACTER*10 =3D escape-c[2:1] + =
"(s10H =20
"<BR>DEFINE cpi-12 CHARACTER*10 =3D escape-c[2:1] +=20
"(s12H "<BR>DEFINE cpi-16 CHARACTER*10 =3D =
escape-c[2:1] + "(s16.7H "<BR>DEFINE cpi-20 =
CHARACTER*10 =3D=20
escape-c[2:1] + "(s20H "<BR>DEFINE high-dens CHARACTER*10 =
=3D=20
escape-c[2:1] + "(s1Q "<BR>DEFINE stnd-dens =
CHARACTER*10 =3D=20
escape-c[2:1] + "(s0Q "<BR>DEFINE stnd-mode =
CHARACTER*10 =3D=20
escape-c[2:1] + "&k0S "<BR>DEFINE comp-mode =
CHARACTER*10 =3D=20
escape-c[2:1] + "&k2S "<BR>DEFINE expd-mode =
CHARACTER*10 =3D=20
escape-C[2:1] + "&k8S "<BR>DEFINE=20
lpi-6 CHARACTER*10 =3D escape-c[2:1] +=20
"&l6D "<BR>DEFINE lpi-8 =20
CHARACTER*10 =3D escape-c[2:1] + "&l8D "<BR>DEFINE =
displayon=20
CHARACTER*10 =3D escape-c[2:1] + "Y =20
"<BR>DEFINE displayof CHARACTER*10 =3D escape-c[2:1] +=20
"Z "<BR>DEFINE perf-sknf =
CHARACTER*10 =3D=20
escape-c[2:1] + "&l1L "</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3D"Courier New">;added codes =
for laserjet=20
printer<BR>DEFINE printer-reset CHAR*5 =3D escape-c[2:1] +=20
"E "<BR>DEFINE bold-on =20
CHARACTER*5 =3D escape-c[2:1] + "(s3B"<BR>DEFINE bold-off =20
CHARACTER*5 =3D escape-c[2:1] + "(s0B"<BR>DEFINE under-on =20
CHARACTER*5 =3D escape-c[2:1] + "&d3D"<BR>DEFINE under-off=20
CHARACTER*5 =3D escape-c[2:1] + "&d@ "<BR>DEFINE =
portrait =20
CHARACTER*5 =3D escape-c[2:1] + "&l0O"<BR>DEFINE landscape=20
CHARACTER*5 =3D escape-c[2:1] + "&l1O"<BR>DEFINE upperpapr=20
CHARACTER*5 =3D escape-c[2:1] + "&l1H"<BR>DEFINE lowerpapr=20
CHARACTER*5 =3D escape-c[2:1] + "&l4H"<BR>DEFINE=20
letter CHARACTER*5 =3D escape-c[2:1] +=20
"&l2A"<BR>DEFINE legal CHARACTER*5 =3D =
escape-c[2:1] + "&l3A"<BR>DEFINE line84pg CHARACTER*6 =
=3D=20
escape-c[2:1] + "&l84P"<BR>DEFINE font0239 CHARACTER*7 =
=3D=20
escape-c[2:1] + "(0239X"<BR>DEFINE font3015 CHARACTER*7 =3D=20
escape-c[2:1] + "(3015X"<BR>DEF ESC CHAR*1 =3D ESCAPE-C[2:1]<BR>DEFINE=20
font02 CHARACTER*26 =3D &<BR> esc + =
"&l10" +=20
esc + "(8u" + esc + "(s0p12h10v0s3b8T"<BR>DEFINE =
font05 =20
CHARACTER*26 =3D &<BR> esc + "&l10" + esc + "(8u" + =
esc +=20
"(s0p16.67h8.5v0s3b0T"<BR>DEFINE font10 CHARACTER*26 =
=3D=20
&<BR> esc + "&l10" + esc + "(8u" + esc +=20
"(s0p15h8.5v0s3b0T"<BR>DEFINE=20
SIMPLEX =
CHARACTER*5=20
=3D ESC + "&l0S"<BR>DEFINE DUPLEX-LONG-EDGE CHARACTER*5 =3D =
ESC +=20
"&l1S"<BR>DEFINE DUPLEX-SHORT-EDGE CHARACTER*5 =3D ESC +=20
"&l2S"<BR></FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>David Knispel<BR><A=20
href=3D"mailto:dave.knispel@frequencymarketing.com">dave.knispel@frequenc=
ymarketing.com</A><BR>Phone:=20
513-248-5029<BR>Fax: 513-248-2672</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>----- Original Message ----- </FONT>
<DIV><FONT face=3DArial size=3D2>From: Mike Palandri <<A=20
href=3D"mailto:palandri@eug4ja.lane.edu">palandri@eug4ja.lane.edu</A>>=
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>To: Grace, Jim <<A=20
href=3D"mailto:graceji@ccac-casc.on.ca">graceji@ccac-casc.on.ca</A>>; =
<A=20
href=3D"mailto:'powerh-l@lists.swau.edu'">'powerh-l@lists.swau.edu'</A> =
<<A=20
href=3D"mailto:powerh-l@sphere.swau.edu">powerh-l@sphere.swau.edu</A>>=
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Sent: Wednesday, August 30, 2000 4:01=20
PM</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Subject: Re: Compressed =
Text</FONT></DIV></DIV>
<DIV><BR></DIV><FONT face=3DArial size=3D2>> When I worked on an HP =
3000, we used=20
a cobol program to send the appropriate control codes to the laser =
printer, then=20
fcopied the report from a disk text file to the printer. Here's a =
sample=20
command file. I can post the cobol code if you want, it is only =
about 360=20
lines.<BR>> <BR>> <BR>> FILE SCHED=3DOIR0103A;TEMP<BR>> FILE =
HARD;REC=3D-130<BR>> =
LCC0001.RUN;INFO=3D"RS,LA,8L,PL60,CO,MW08"<BR>> FCOPY=20
FROM=3D*SCHED;TO=3D$HARD > $NULL<BR>> =
LCC0001.RUN;INFO=3D"RS"<BR>> <BR>>=20
<BR>> <BR>> At 02:33 PM 08/30/2000 -0400, Grace, Jim =
wrote:<BR>> >I=20
am trying to compress the text in a quiz report to print out on an =
HP<BR>>=20
>laser jet 8000N. I am trouble getting the on and off codes to=20
work. I have<BR>> >an example from Cognos on how to do =
it. Has=20
anyone been successful with<BR>> >this.<BR>> ><BR>> =
>Please=20
let me know.<BR>> ><BR>> >Thanks<BR>> ><BR>> =
>The=20
example below should cause a compressed font to be used by th =
printer.<BR>>=20
><BR>> >Quiz <BR>> ><BR>> >>DEF escn int*1 =3D =
27;=20
<BR>> >>def esc char*1 =3D char(escn)[2:1]; this will send the =
Esc=20
sequence to the<BR>> >printer<BR>> >>def =
COMPRESSION char*2=20
=3D esc + "<on code>"; see printer manual for this<BR>> =
>code<BR>>=20
>>def COMPRESSOFF char*2 =3D esc + "<off code>"; see printer =
manual=20
for this<BR>> >code<BR>> >>REPORT COMPRESSION =
"Compressed"=20
COMPRESSOFF "NOT Compressed"<BR>> ><BR>> >If this works, the =
string,"compressed", should appear in small fonts.<BR>> ><BR>> =
>If=20
it does not then the escape sequence code selected is wrong for =
the<BR>>=20
>printer. Each printer has its own set of printer control code=20
sequences.<BR>> >Refer to your printer manual or call the=20
manufacturer/vendor.<BR>> ><BR>> >If it is necessary to have =
the=20
page headings compressed, add the COMPRESSION<BR>> >item to the =
beginning=20
of the page heading, or to the initial page heading.<BR>> >Turn =
off the=20
compression setting sent to the printer, by reporting the<BR>>=20
>COMPRESSOFF item in the final footing of the report.<BR>> =
><BR>>=20
>=3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =
=3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =
=3D =3D=20
=3D<BR>> >Subscribe: "subscribe powerh-l" in message body to <A=20
href=3D"mailto:majordomo@lists.swau.edu">majordomo@lists.swau.edu</A><BR>=
>=20
>Unsubscribe: "unsubscribe powerh-l" in message to <A=20
href=3D"mailto:majordomo@lists.swau.edu">majordomo@lists.swau.edu</A><BR>=
>=20
>This list is closed, thus to post to the list, you must be a=20
subscriber.<BR>> ><BR>> <BR>> Mike</FONT></BODY></HTML>
------=_NextPart_000_0178_01C0129C.2EF0B920--
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
This list is closed, thus to post to the list, you must be a subscriber.