Superscript and subscript

Boyle, Joe Joe.Boyle@cognos.com
Tue, 13 Nov 2001 09:17:39 -0000


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C16C24.0AD331C0
Content-Type: text/plain;
	charset="iso-8859-1"

Hi Shirley,

I found the document below which discusses printing barcodes.  The principle
should be much the same with super/subscripts so long as your printer
supports these.  Typically there would be both an escape sequence to turn on
super/subscripting and an escape sequence to turn this back off; you will
find these in the manual for the printer. 
Each escape sequence would be mapped into a define item and included in the
report line ( or +ed into a longer define) before (turn on) and after (turn
off) the values that you want reported in this way.


Problem Description

Producing Barcoded QUIZ Reports 

Solution Description

The following information describes how to create reports that will extend
the use of barcodes.

For barcodes to be practical, they must contain the right information in the
right format.  This can be a problem in QUIZ as integers are reported with
leading spaces, alphanumerics are reported with trailing spaces, and real
numbers are reported with leading spaces and three decimal places.  To avoid
putting these unwanted characters into a barcode, thereby making it
impossible to read, new data items must be defined.

Numbers (both integer and real) must be converted into characters before
they can be easily barcoded.  The conversion of integers is simple.  The
DEFINE statement should name the new data item, define it as a character
type long enough to contain the integers (6 for IMAGE type I1, 11 for IMAGE
type I2), and convert the integer using QUIZ's ASCII function.  The
following DEFINE statement converts the Item Master's FLTIME item to a
character string:

DEFINE charfltime CHAR*6 = ASCII (fltime)

Accommodating decimal places makes the conversion of real numbers more
complicated.  They length of the DEFINEd item must be determined, the digits
left of the decimal point converted to characters, the decimal point
inserted, and the digits to the right of the decimal point appended.  The
following statement does this for the Item Master?s MCST item (where "#"
represents the number of decimal places desired):

DEFINE charmcst CHAR*9 = &
  ASCII (mcst) + "." + & 
  ASCII ((mcst * 10^#) - FLOOR (mcst*10^#))

The first ASCII function reports only the characters to the left of the
decimal, the literal "." Inserts the decimal point, and the second ASCII
function then isolates and appends the desired number of decimal places.

After the numeric expressions have been make into character strings, they
can be barcoded.  To prevent the inclusion of trailing spaces, you must do
this in another DEFINE statement that contains the printer escape sequences
for printing barcodes.  For HP?s 256X series printers, the basic escape
sequence is:

27*z1c<barcode text>Z

Where 27 is ESCAPE (decimal 27) and "barcode text" is the text to be
barcoded.  The number preceding the lowercase "c" indicates the column in
which the barcode will start (see the technical reference manual for HP 256X
printers for more information on these escape sequences).

The DEFINE statement to barcode the MCST item of the Item Master would look
like this:

DEFINE barmcst CHAR*17 = "?27*z1c<" + &
  TRUNC (charmcst) + ">Z"

The length of 17 is derived from adding all the characters in the escape
sequence and the maximum length of the defined item CHARMCST (see above).
This would be reported by the simple statement:

REPORT barmcst

More than one barcode can be printed on a single report line by simply
changing the final character of the escape sequence of the first barcode and
changing the starting column number of the second barcode.  To report the
item number together with the material cost, the QUIZ statements would be:

DEFINE baritno CHAR*26 = "?27*z1c<" + &
  TRUNC (itno) + ">Z"
DEFINE barcmst CHAR*18 = "?27*z51c<" + &
  TRUNC (charmcst) + ">"
REPORT baritno barmcst

The barcode for the item number will begin in column one, and the barcode
for the material cost will begin in column fifty-one.  Note that the final
letter in the escape sequence for the first reported item is now lowercase.
Only the last letter of the escape sequence for the final barcode on a line
should be uppercase; all other escape sequence letters should be in
lowercase.

If you wish to combine barcodes and text on a line, it works best to specify
and position (with TAB) the literal string and then include the defined item
that prints the barcode in one report statement.  Also, the defined item
containing the barcode escape sequence should begin with a carriage return
(decimal 13) to reposition the print cursor at the left margin (ensuring
accurate placement of the barcode).  The following statements will properly
report the text "Item number:" and the barcoded item on one line:

DEFINE baritno CHAR*28 = "?13?27*z26x<" + &
  TRUNC (itno) + ">Z"
REPORT TAB 11 "Item number: " baritno



-----Original Message-----
From: Shirley Phillips [mailto:SPhillips@CONTDISC.com]
Sent: 09 November 2001 21:33
To: PowerHouse List (E-mail)
Subject: Superscript and subscript


We are using Powerhouse on a HP Unix Box with an Oracle database with the
Visibility ERP software.  I have a need to be able to store superscripts and
subscripts  using Quick for input and Quiz for output to various printers,
primarily HP laserjets.  I have been told by Visibility that this cannot be
done as it is a limitation of the Powerhouse character set.

Can anyone offer any suggestions on how we can accomplish this?

Shirley Phillips
Information Systems Manager
Continental Disc Corporation
3160 W. Heartland Drive
Liberty, MO 64068
(816) 407-5562


= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l@lists.swau.edu
Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu
Unsubscribe: "unsubscribe" in message body to
powerh-l-request@lists.swau.edu
http://lists.swau.edu/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.

This message may contain privileged and/or confidential information.  If you
have received this e-mail in error or are not the intended recipient, you
may not use, copy, disseminate or distribute it; do not open any
attachments, delete it immediately from your system and notify the sender
promptly by e-mail that you have done so.  Thank you.

------_=_NextPart_001_01C16C24.0AD331C0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">



RE: Superscript and subscript



Hi Shirley,

I found the document below which discusses printing = barcodes.  The principle should be much the same with = super/subscripts so long as your printer supports these.  = Typically there would be both an escape sequence to turn on = super/subscripting and an escape sequence to turn this back off; you = will find these in the manual for the printer.

Each escape sequence would be mapped into a define = item and included in the report line ( or +ed into a longer define) = before (turn on) and after (turn off) the values that you want reported = in this way.


Problem Description

Producing Barcoded QUIZ Reports

Solution Description

The following information describes how to create = reports that will extend the use of barcodes.

For barcodes to be practical, they must contain the = right information in the right format.  This can be a problem in = QUIZ as integers are reported with leading spaces, alphanumerics are = reported with trailing spaces, and real numbers are reported with = leading spaces and three decimal places.  To avoid putting these = unwanted characters into a barcode, thereby making it impossible to = read, new data items must be defined.

Numbers (both integer and real) must be converted = into characters before they can be easily barcoded.  The = conversion of integers is simple.  The DEFINE statement should = name the new data item, define it as a character type long enough to = contain the integers (6 for IMAGE type I1, 11 for IMAGE type I2), and = convert the integer using QUIZ's ASCII function.  The following = DEFINE statement converts the Item Master's FLTIME item to a character = string:

DEFINE charfltime CHAR*6 =3D ASCII (fltime)

Accommodating decimal places makes the conversion of = real numbers more complicated.  They length of the DEFINEd item = must be determined, the digits left of the decimal point converted to = characters, the decimal point inserted, and the digits to the right of = the decimal point appended.  The following statement does this for = the Item Master?s MCST item (where "#" represents the number = of decimal places desired):

DEFINE charmcst CHAR*9 =3D &
  ASCII (mcst) + "." + &
  ASCII ((mcst * 10^#) - FLOOR = (mcst*10^#))

The first ASCII function reports only the characters = to the left of the decimal, the literal "." Inserts the = decimal point, and the second ASCII function then isolates and appends = the desired number of decimal places.

After the numeric expressions have been make into = character strings, they can be barcoded.  To prevent the inclusion = of trailing spaces, you must do this in another DEFINE statement that = contains the printer escape sequences for printing barcodes.  For = HP?s 256X series printers, the basic escape sequence is:

27*z1c<barcode text>Z

Where 27 is ESCAPE (decimal 27) and "barcode = text" is the text to be barcoded.  The number preceding the = lowercase "c" indicates the column in which the barcode will = start (see the technical reference manual for HP 256X printers for more = information on these escape sequences).

The DEFINE statement to barcode the MCST item of the = Item Master would look like this:

DEFINE barmcst CHAR*17 =3D "?27*z1c<" + = &
  TRUNC (charmcst) + ">Z"

The length of 17 is derived from adding all the = characters in the escape sequence and the maximum length of the defined = item CHARMCST (see above).  This would be reported by the simple = statement:

REPORT barmcst

More than one barcode can be printed on a single = report line by simply changing the final character of the escape = sequence of the first barcode and changing the starting column number = of the second barcode.  To report the item number together with = the material cost, the QUIZ statements would be:

DEFINE baritno CHAR*26 =3D "?27*z1c<" + = &
  TRUNC (itno) + ">Z"
DEFINE barcmst CHAR*18 =3D "?27*z51c<" = + &
  TRUNC (charmcst) + ">"
REPORT baritno barmcst

The barcode for the item number will begin in column = one, and the barcode for the material cost will begin in column = fifty-one.  Note that the final letter in the escape sequence for = the first reported item is now lowercase.  Only the last letter of = the escape sequence for the final barcode on a line should be = uppercase; all other escape sequence letters should be in = lowercase.

If you wish to combine barcodes and text on a line, = it works best to specify and position (with TAB) the literal string and = then include the defined item that prints the barcode in one report = statement.  Also, the defined item containing the barcode escape = sequence should begin with a carriage return (decimal 13) to reposition = the print cursor at the left margin (ensuring accurate placement of the = barcode).  The following statements will properly report the text = "Item number:" and the barcoded item on one line:

DEFINE baritno CHAR*28 =3D = "?13?27*z26x<" + &
  TRUNC (itno) + ">Z"
REPORT TAB 11 "Item number: " = baritno



-----Original Message-----
From: Shirley Phillips [mailto:SPhillips@CONTDISC.com= ]
Sent: 09 November 2001 21:33
To: PowerHouse List (E-mail)
Subject: Superscript and subscript


We are using Powerhouse on a HP Unix Box with an = Oracle database with the
Visibility ERP software.  I have a need to be = able to store superscripts and
subscripts  using Quick for input and Quiz for = output to various printers,
primarily HP laserjets.  I have been told by = Visibility that this cannot be
done as it is a limitation of the Powerhouse = character set.

Can anyone offer any suggestions on how we can = accomplish this?

Shirley Phillips
Information Systems Manager
Continental Disc Corporation
3160 W. Heartland Drive
Liberty, MO 64068
(816) 407-5562


=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
Mailing list: powerh-l@lists.swau.edu
Subscribe: "subscribe" in message body to = powerh-l-request@lists.swau.edu
Unsubscribe: "unsubscribe" in message body = to powerh-l-request@lists.swau.edu
http://lists.swau.edu/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you = must be a subscriber.

This message may contain privileged and/or = confidential information.  If you have received this e-mail in = error or are not the intended recipient, you may not use, copy, = disseminate or distribute it; do not open any attachments, delete it = immediately from your system and notify the sender promptly by e-mail = that you have done so.  Thank you.

------_=_NextPart_001_01C16C24.0AD331C0--