dbTalk Databases Forums  

PCL5 command in Proc heading D3/NT

comp.databases.pick comp.databases.pick


Discuss PCL5 command in Proc heading D3/NT in the comp.databases.pick forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Corporate apparatchik
 
Posts: n/a

Default PCL5 command in Proc heading D3/NT - 02-08-2007 , 07:58 PM






Folks

I'm trying to get some procs to print their output to a laser printer
but come out in landscape format.

The idea I've had is to use the Heading command in the proc and to
send down the PCL5 command string at the start of the job.

Here's the PCL5 codes:

^[E Reset the printer
^[&l1O Landscape orientation

So in my proc I try Heading " ^[E^[&l1O This is my heading text"

But what I get printed (in portrait) is just: ^[E^[&l1O
This is my heading text
Obviously the PCL5 commands are being taken as literal text.

Is my command syntax wrong ?? Any suggestions appreciated.

John


Reply With Quote
  #2  
Old   
Peter McMurray
 
Posts: n/a

Default Re: PCL5 command in Proc heading D3/NT - 02-08-2007 , 09:07 PM






Hi
Personally I do it in Basic which is very straight forward and execute the
Access command. However have you tried putting extra quotes around the
string I have not looked at this in many years and I must admit that I think
they may be interpreted as things like page and date.
Regards
Peter McMurray
"Corporate apparatchik" <johnmarshall (AT) xtra (DOT) co.nz> wrote

Quote:
Folks

I'm trying to get some procs to print their output to a laser printer
but come out in landscape format.

The idea I've had is to use the Heading command in the proc and to
send down the PCL5 command string at the start of the job.

Here's the PCL5 codes:

^[E Reset the printer
^[&l1O Landscape orientation

So in my proc I try Heading " ^[E^[&l1O This is my heading text"

But what I get printed (in portrait) is just: ^[E^[&l1O
This is my heading text
Obviously the PCL5 commands are being taken as literal text.

Is my command syntax wrong ?? Any suggestions appreciated.

John




Reply With Quote
  #3  
Old   
infoattaloncsdotcomdotau
 
Posts: n/a

Default Re: PCL5 command in Proc heading D3/NT - 02-08-2007 , 11:05 PM



Goo'day,

This worked in UniVerse and AP/PRO. QM doesn't need it... Tee Hee, a
little bit.

If you're talking Winblows here, a "Separator Page" for the printer is
what you need and works a treat. The syntax is very PCL-like, but
Winblows help on "separator page" should show you how...

\H1B = hex '1b' = 27 = Escape
\LE = Literal E = E
therefore \H1B\LE = ESC:"E"

All you need do is have this file and put the path/file name in the
"Separator Page" of the Printer's properties.

report1.sep:

\
\H1B\LE\H1B\L&l26A\H1B\L&l1O\H1B\L&l8D\H1B\L(10U\H 1B\L(s0p16h8v0s1b4099T\H1B\L&l2E\W200

HTH

On 8 Feb 2007 17:58:27 -0800, "Corporate apparatchik"
<johnmarshall (AT) xtra (DOT) co.nz> wrote:

Quote:
Folks

I'm trying to get some procs to print their output to a laser printer
but come out in landscape format.

The idea I've had is to use the Heading command in the proc and to
send down the PCL5 command string at the start of the job.

Here's the PCL5 codes:

^[E Reset the printer
^[&l1O Landscape orientation

So in my proc I try Heading " ^[E^[&l1O This is my heading text"

But what I get printed (in portrait) is just: ^[E^[&l1O
This is my heading text
Obviously the PCL5 commands are being taken as literal text.

Is my command syntax wrong ?? Any suggestions appreciated.

John
Jaye


Reply With Quote
  #4  
Old   
Bruce Nichol
 
Posts: n/a

Default Re: PCL5 command in Proc heading D3/NT - 02-08-2007 , 11:10 PM



Jaye,

Get back here and put everything back the way you found it!

I really don't want to get mistaken for you....


On Fri, 09 Feb 2007 16:05:38 +1100, infoattaloncsdotcomdotau wrote:

Quote:
Goo'day,

This worked in UniVerse and AP/PRO. QM doesn't need it... Tee Hee, a
little bit.
snip
Jaye
Regards,

Bruce Nichol

Talon Computer Services
ALBURY NSW 2640
Australia

If it ain't broke, fix it 'til it is



Reply With Quote
  #5  
Old   
mattydp@yahoo.com
 
Posts: n/a

Default Re: PCL5 command in Proc heading D3/NT - 02-09-2007 , 07:35 AM



Even if you could get the characters into the Heading command it's
very untidy as you will be sending a Printer Reset and Landscape
command each time a new page is listed.


Reply With Quote
  #6  
Old   
Homer L. Hazel
 
Posts: n/a

Default Re: PCL5 command in Proc heading D3/NT - 02-09-2007 , 10:15 AM



Greetings,

Here's how I have been able to get embedded PCL formatting strings in
normal PROCS.

PQ
HSP-ASSIGN whatever
P
HSP-OPEN ;! all stuff goes into 1 spool file
P
HLASERLAND ;! or whatever formatting stuff you want
P
H SORT STUFF WITH THIS AND WITH THAT BY THEN BLA BLA BLA (P
P
HSP-CLOSE
P

What happens is that unless I do the SP-OPEN and the SP-CLOSE, I get two
spools
the first gets printed and it happily sets the printer to landscape or
whatever, but the
printer immediately resets itself - or maybe the system does. I have never
learned
what resets it. Anyway, it resets. The next job is printed without the PCL
formats.

So, the program LASERLAND or whatever you want to call it will issue all of
the
various PCL commands needed and because of the SP-OPEN, the following
report will get the benefit.

Larry Hazel

"Corporate apparatchik" <johnmarshall (AT) xtra (DOT) co.nz> wrote

Quote:
Folks

I'm trying to get some procs to print their output to a laser printer
but come out in landscape format.

The idea I've had is to use the Heading command in the proc and to
send down the PCL5 command string at the start of the job.

Here's the PCL5 codes:

^[E Reset the printer
^[&l1O Landscape orientation

So in my proc I try Heading " ^[E^[&l1O This is my heading text"

But what I get printed (in portrait) is just: ^[E^[&l1O
This is my heading text
Obviously the PCL5 commands are being taken as literal text.

Is my command syntax wrong ?? Any suggestions appreciated.

John




Reply With Quote
  #7  
Old   
DaveG
 
Posts: n/a

Default Re: PCL5 command in Proc heading D3/NT - 02-12-2007 , 09:46 AM



I've created record in my tables file for various font sizes and
orientations - these records contain the actual PCL escape sequences
needed with embedded char(27)'s as needed. I then use the U01AD user
exit to place them into the header. Under each font size I have two
attributes - one for Portrait and the second for landscape.

TABLES 12CPI:
E (10U (s0p12h0s3b4099T
E &l1O (10U (s0p12h0s3b4099T

Proc:
....
H HEADING "
IF A1 = T G 45 *** check if displaying on terminal
U01AD
TABLES 12CPI 1 S *** change the one to a two for landscape
45 H
....

Dave Gordon

On Feb 8, 8:58 pm, "Corporate apparatchik" <johnmarsh... (AT) xtra (DOT) co.nz>
wrote:
Quote:
Folks

I'm trying to get some procs to print their output to a laser printer
but come out in landscape format.

The idea I've had is to use the Heading command in the proc and to
send down the PCL5 command string at the start of the job.

Here's the PCL5 codes:

^[E Reset the printer
^[&l1O Landscape orientation

So in my proc I try Heading " ^[E^[&l1O This is my heading text"

But what I get printed (in portrait) is just: ^[E^[&l1O
This is my heading text
Obviously the PCL5 commands are being taken as literal text.

Is my command syntax wrong ?? Any suggestions appreciated.

John



Reply With Quote
  #8  
Old   
Corporate apparatchik
 
Posts: n/a

Default Re: PCL5 command in Proc heading D3/NT - 02-14-2007 , 01:45 AM



Hi Dave

I tried what you suggested in a similar fashion to your example below
and everything worked except that I found that the PCL5 codes were
still being interpreted as text in the resultant heading and just
printed out as part of the heading.
I suspect that I have not embedded the char(27) characters correctly
in the record I have created of the PCL5 string. How did you enter
the string in your example below - using the line editor?

John


On Feb 13, 4:46 am, "DaveG" <daveg_0... (AT) iwon (DOT) com> wrote:
Quote:
I've created record in my tables file for various font sizes and
orientations - these records contain the actual PCL escape sequences
needed with embedded char(27)'s as needed. I then use the U01AD user
exit to place them into the header. Under each font size I have two
attributes - one for Portrait and the second for landscape.

TABLES 12CPI:
E (10U (s0p12h0s3b4099T
E &l1O (10U (s0p12h0s3b4099T

Proc:
...
H HEADING "
IF A1 = T G 45 *** check if displaying on terminal
U01AD
TABLES 12CPI 1 S *** change the one to a two for landscape
45 H
...

Dave Gordon

On Feb 8, 8:58 pm, "Corporate apparatchik" <johnmarsh... (AT) xtra (DOT) co.nz
wrote:



Folks

I'm trying to get some procs to print their output to a laser printer
but come out in landscape format.

The idea I've had is to use the Heading command in the proc and to
send down the PCL5 command string at the start of the job.

Here's the PCL5 codes:

^[E Reset the printer
^[&l1O Landscape orientation

So in my proc I try Heading " ^[E^[&l1O This is my heading text"

But what I get printed (in portrait) is just: ^[E^[&l1O
This is my heading text
Obviously the PCL5 commands are being taken as literal text.

Is my command syntax wrong ?? Any suggestions appreciated.

John- Hide quoted text -

- Show quoted text -



Reply With Quote
  #9  
Old   
DaveG
 
Posts: n/a

Default Re: PCL5 command in Proc heading D3/NT - 02-14-2007 , 08:53 AM



I wrote a couple line program to write the string to the record.
I have a single record that contains all the PCL codes I need in
basic programs - The core of which was originally posted by Alan
Gruskoff many years back.


ESC = CHAR(27)
PCL.PC8 = ESC:"(10U"
PCL.RESET = ESC:"E"
PCL.PORTRAIT = ESC:"&l0O"
PCL.LANDSCAPE = ESC:"&l1O"
PCL.17CPI = PCL.PC8:ESC:'(s0p17h0s3b4099T' ;* LP 17 CPI

REC = PCL.RESET:PCL.PORTRAIT:PCL.17CPI
REC<2> = PLC.RESET:PCL.LANDSCAPE:PCL.17CPI
WRITE REC ON TABLES,'12CPI'


On Feb 14, 2:45 am, "Corporate apparatchik" <johnmarsh... (AT) xtra (DOT) co.nz>
wrote:
Quote:
Hi Dave

I tried what you suggested in a similar fashion to your example below
and everything worked except that I found that the PCL5 codes were
still being interpreted as text in the resultant heading and just
printed out as part of the heading.
I suspect that I have not embedded the char(27) characters correctly
in the record I have created of the PCL5 string. How did you enter
the string in your example below - using the line editor?

John

On Feb 13, 4:46 am, "DaveG" <daveg_0... (AT) iwon (DOT) com> wrote:



I've created record in my tables file for various font sizes and
orientations - these records contain the actual PCL escape sequences
needed with embedded char(27)'s as needed. I then use the U01AD user
exit to place them into the header. Under each font size I have two
attributes - one for Portrait and the second for landscape.

TABLES 12CPI:
E (10U (s0p12h0s3b4099T
E &l1O (10U (s0p12h0s3b4099T

Proc:
...
H HEADING "
IF A1 = T G 45 *** check if displaying on terminal
U01AD
TABLES 12CPI 1 S *** change the one to a two for landscape
45 H
...

Dave Gordon

On Feb 8, 8:58 pm, "Corporate apparatchik" <johnmarsh... (AT) xtra (DOT) co.nz
wrote:

Folks

I'm trying to get some procs to print their output to a laser printer
but come out in landscape format.

The idea I've had is to use the Heading command in the proc and to
send down the PCL5 command string at the start of the job.

Here's the PCL5 codes:

^[E Reset the printer
^[&l1O Landscape orientation

So in my proc I try Heading " ^[E^[&l1O This is my heading text"

But what I get printed (in portrait) is just: ^[E^[&l1O
This is my heading text
Obviously the PCL5 commands are being taken as literal text.

Is my command syntax wrong ?? Any suggestions appreciated.

John- Hide quoted text -

- Show quoted text -- Hide quoted text -

- Show quoted text -



Reply With Quote
  #10  
Old   
Corporate apparatchik
 
Posts: n/a

Default Re: PCL5 command in Proc heading D3/NT - 02-15-2007 , 11:00 PM



Thanks Dave

I did as you suggested and wrote the escape codes and PCL stuff via
Basic and when I called it into the proc heading via the user exit as
you showed earlier it worked fine.

John



On Feb 15, 3:53 am, "DaveG" <daveg_0... (AT) iwon (DOT) com> wrote:
Quote:
I wrote a couple line program to write the string to the record.
I have a single record that contains all the PCL codes I need in
basic programs - The core of which was originally posted by Alan
Gruskoff many years back.

ESC = CHAR(27)
PCL.PC8 = ESC:"(10U"
PCL.RESET = ESC:"E"
PCL.PORTRAIT = ESC:"&l0O"
PCL.LANDSCAPE = ESC:"&l1O"
PCL.17CPI = PCL.PC8:ESC:'(s0p17h0s3b4099T' ;* LP 17 CPI

REC = PCL.RESET:PCL.PORTRAIT:PCL.17CPI
REC<2> = PLC.RESET:PCL.LANDSCAPE:PCL.17CPI
WRITE REC ON TABLES,'12CPI'



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.