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.&nbsp; 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&nbsp; INTEGER*2&nbsp;&nbsp;&nbsp; =
=3D=20
27<BR>DEFINE escape-c&nbsp; CHARACTER*2&nbsp; =3D =
CHARACTER(escape-i)<BR>DEFINE=20
cpi-10&nbsp;&nbsp;&nbsp; CHARACTER*10 =3D escape-c[2:1] + =
"(s10H&nbsp;&nbsp;=20
"<BR>DEFINE cpi-12&nbsp;&nbsp;&nbsp; CHARACTER*10 =3D escape-c[2:1] +=20
"(s12H&nbsp;&nbsp; "<BR>DEFINE cpi-16&nbsp;&nbsp;&nbsp; CHARACTER*10 =3D =

escape-c[2:1] + "(s16.7H "<BR>DEFINE cpi-20&nbsp;&nbsp;&nbsp; =
CHARACTER*10 =3D=20
escape-c[2:1] + "(s20H&nbsp;&nbsp; "<BR>DEFINE high-dens CHARACTER*10 =
=3D=20
escape-c[2:1] + "(s1Q&nbsp;&nbsp;&nbsp; "<BR>DEFINE stnd-dens =
CHARACTER*10 =3D=20
escape-c[2:1] + "(s0Q&nbsp;&nbsp;&nbsp; "<BR>DEFINE stnd-mode =
CHARACTER*10 =3D=20
escape-c[2:1] + "&amp;k0S&nbsp;&nbsp;&nbsp; "<BR>DEFINE comp-mode =
CHARACTER*10 =3D=20
escape-c[2:1] + "&amp;k2S&nbsp;&nbsp;&nbsp; "<BR>DEFINE expd-mode =
CHARACTER*10 =3D=20
escape-C[2:1] + "&amp;k8S&nbsp;&nbsp;&nbsp; "<BR>DEFINE=20
lpi-6&nbsp;&nbsp;&nbsp;&nbsp; CHARACTER*10 =3D escape-c[2:1] +=20
"&amp;l6D&nbsp;&nbsp;&nbsp; "<BR>DEFINE lpi-8&nbsp;&nbsp;&nbsp;&nbsp;=20
CHARACTER*10 =3D escape-c[2:1] + "&amp;l8D&nbsp;&nbsp;&nbsp; "<BR>DEFINE =
displayon=20
CHARACTER*10 =3D escape-c[2:1] + "Y&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
"<BR>DEFINE displayof CHARACTER*10 =3D escape-c[2:1] +=20
"Z&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "<BR>DEFINE perf-sknf =
CHARACTER*10 =3D=20
escape-c[2:1] + "&amp;l1L&nbsp;&nbsp;&nbsp; "</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3D"Courier New">;added codes =
for laserjet=20
printer<BR>DEFINE printer-reset CHAR*5&nbsp;&nbsp; =3D escape-c[2:1] +=20
"E&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "<BR>DEFINE bold-on&nbsp;&nbsp;=20
CHARACTER*5&nbsp; =3D escape-c[2:1] + "(s3B"<BR>DEFINE bold-off&nbsp;=20
CHARACTER*5&nbsp; =3D escape-c[2:1] + "(s0B"<BR>DEFINE under-on&nbsp;=20
CHARACTER*5&nbsp; =3D escape-c[2:1] + "&amp;d3D"<BR>DEFINE under-off=20
CHARACTER*5&nbsp; =3D escape-c[2:1] + "&amp;d@ "<BR>DEFINE =
portrait&nbsp;=20
CHARACTER*5&nbsp; =3D escape-c[2:1] + "&amp;l0O"<BR>DEFINE landscape=20
CHARACTER*5&nbsp; =3D escape-c[2:1] + "&amp;l1O"<BR>DEFINE upperpapr=20
CHARACTER*5&nbsp; =3D escape-c[2:1] + "&amp;l1H"<BR>DEFINE lowerpapr=20
CHARACTER*5&nbsp; =3D escape-c[2:1] + "&amp;l4H"<BR>DEFINE=20
letter&nbsp;&nbsp;&nbsp; CHARACTER*5&nbsp; =3D escape-c[2:1] +=20
"&amp;l2A"<BR>DEFINE legal&nbsp;&nbsp;&nbsp;&nbsp; CHARACTER*5&nbsp; =3D =

escape-c[2:1] + "&amp;l3A"<BR>DEFINE line84pg&nbsp; CHARACTER*6&nbsp; =
=3D=20
escape-c[2:1] + "&amp;l84P"<BR>DEFINE font0239&nbsp; CHARACTER*7&nbsp; =
=3D=20
escape-c[2:1] + "(0239X"<BR>DEFINE font3015&nbsp; CHARACTER*7&nbsp; =3D=20
escape-c[2:1] + "(3015X"<BR>DEF ESC CHAR*1 =3D ESCAPE-C[2:1]<BR>DEFINE=20
font02&nbsp;&nbsp;&nbsp; CHARACTER*26 =3D &amp;<BR>&nbsp;&nbsp; esc + =
"&amp;l10" +=20
esc + "(8u" + esc + "(s0p12h10v0s3b8T"<BR>DEFINE =
font05&nbsp;&nbsp;&nbsp;=20
CHARACTER*26 =3D &amp;<BR>&nbsp;&nbsp; esc + "&amp;l10" + esc + "(8u" + =
esc +=20
"(s0p16.67h8.5v0s3b0T"<BR>DEFINE font10&nbsp;&nbsp;&nbsp; CHARACTER*26 =
=3D=20
&amp;<BR>&nbsp;&nbsp; esc + "&amp;l10" + esc + "(8u" + esc +=20
"(s0p15h8.5v0s3b0T"<BR>DEFINE=20
SIMPLEX&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
CHARACTER*5=20
=3D ESC + "&amp;l0S"<BR>DEFINE DUPLEX-LONG-EDGE&nbsp; CHARACTER*5 =3D =
ESC +=20
"&amp;l1S"<BR>DEFINE DUPLEX-SHORT-EDGE CHARACTER*5 =3D ESC +=20
"&amp;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 &lt;<A=20
href=3D"mailto:palandri@eug4ja.lane.edu">palandri@eug4ja.lane.edu</A>&gt;=
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>To: Grace, Jim &lt;<A=20
href=3D"mailto:graceji@ccac-casc.on.ca">graceji@ccac-casc.on.ca</A>&gt;; =
<A=20
href=3D"mailto:'powerh-l@lists.swau.edu'">'powerh-l@lists.swau.edu'</A> =
&lt;<A=20
href=3D"mailto:powerh-l@sphere.swau.edu">powerh-l@sphere.swau.edu</A>&gt;=
</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>&gt; 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.&nbsp; Here's a =
sample=20
command file.&nbsp; I can post the cobol code if you want, it is only =
about 360=20
lines.<BR>&gt; <BR>&gt; <BR>&gt; FILE SCHED=3DOIR0103A;TEMP<BR>&gt; FILE =

HARD;REC=3D-130<BR>&gt; =
LCC0001.RUN;INFO=3D"RS,LA,8L,PL60,CO,MW08"<BR>&gt; FCOPY=20
FROM=3D*SCHED;TO=3D$HARD &gt; $NULL<BR>&gt; =
LCC0001.RUN;INFO=3D"RS"<BR>&gt; <BR>&gt;=20
<BR>&gt; <BR>&gt; At 02:33 PM 08/30/2000 -0400, Grace, Jim =
wrote:<BR>&gt; &gt;I=20
am trying to compress the text in a quiz report to print out on an =
HP<BR>&gt;=20
&gt;laser jet 8000N.&nbsp; I am trouble getting the on and off codes to=20
work.&nbsp; I have<BR>&gt; &gt;an example from Cognos on how to do =
it.&nbsp; Has=20
anyone been successful with<BR>&gt; &gt;this.<BR>&gt; &gt;<BR>&gt; =
&gt;Please=20
let me know.<BR>&gt; &gt;<BR>&gt; &gt;Thanks<BR>&gt; &gt;<BR>&gt; =
&gt;The=20
example below should cause a compressed font to be used by th =
printer.<BR>&gt;=20
&gt;<BR>&gt; &gt;Quiz <BR>&gt; &gt;<BR>&gt; &gt;&gt;DEF escn int*1 =3D =
27;=20
<BR>&gt; &gt;&gt;def esc char*1 =3D char(escn)[2:1]; this will send the =
Esc=20
sequence to the<BR>&gt; &gt;printer<BR>&gt; &gt;&gt;def =
COMPRESSION&nbsp; char*2=20
=3D esc + "&lt;on code&gt;"; see printer manual for this<BR>&gt; =
&gt;code<BR>&gt;=20
&gt;&gt;def COMPRESSOFF char*2 =3D esc + "&lt;off code&gt;"; see printer =
manual=20
for this<BR>&gt; &gt;code<BR>&gt; &gt;&gt;REPORT COMPRESSION&nbsp; =
"Compressed"=20
COMPRESSOFF "NOT Compressed"<BR>&gt; &gt;<BR>&gt; &gt;If this works, the =

string,"compressed", should appear in small fonts.<BR>&gt; &gt;<BR>&gt; =
&gt;If=20
it does not then the escape sequence code selected is wrong for =
the<BR>&gt;=20
&gt;printer. Each printer has its own set of printer control code=20
sequences.<BR>&gt; &gt;Refer to your printer manual or call the=20
manufacturer/vendor.<BR>&gt; &gt;<BR>&gt; &gt;If it is necessary to have =
the=20
page headings compressed, add the COMPRESSION<BR>&gt; &gt;item to the =
beginning=20
of the page heading, or to the initial page heading.<BR>&gt; &gt;Turn =
off the=20
compression setting sent to the printer, by reporting the<BR>&gt;=20
&gt;COMPRESSOFF item in the final footing of the report.<BR>&gt; =
&gt;<BR>&gt;=20
&gt;=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>&gt; &gt;Subscribe: "subscribe powerh-l" in message body to <A=20
href=3D"mailto:majordomo@lists.swau.edu">majordomo@lists.swau.edu</A><BR>=
&gt;=20
&gt;Unsubscribe: "unsubscribe powerh-l" in message to <A=20
href=3D"mailto:majordomo@lists.swau.edu">majordomo@lists.swau.edu</A><BR>=
&gt;=20
&gt;This list is closed, thus to post to the list, you must be a=20
subscriber.<BR>&gt; &gt;<BR>&gt; <BR>&gt; 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.