HP3000-L Archives

May 2021, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"James B. Byrne" <[log in to unmask]>
Reply To:
Date:
Wed, 12 May 2021 12:12:43 -0400
Content-Type:
multipart/mixed
Parts/Attachments:
text/plain (4 kB) , empty.txt (4 kB)

On Wed, May 12, 2021 09:47, Keven Miller \(3kG\) wrote:
>> If I transfer the source file via FCOPY to a virtual printer defined in
NPCONFIG then the data comes across fine, but there is a preface string
added
>> to the first record which looks like this:
>
>> <esc>%-12345X<esc>Z<esc>E<esc>&l0V<esc>&l0o2a6d3e60f(s10H<esc>&l7H
>
>
>> I am guessing that this line in NPCONFIG just might be the culprit:
>>
>> setup_file=LJ2PORT.HPENV.SYSLOCAL
>>
>> I have commented this out for the virtual printers and I will see if that
removes the sting.
>>
>
>
> That does look like what would be in LJ2PORT.
> Although I don't have that file to confirm.
>
>
> As I recall, would have to review the printing, and spooler manuals,
>
> The spooler/prinit process would
> 1. if  "pjl_supported"   is true (which I think is the default)
>     the spooling process will sent PJL things to printer.

We turned that off.

> 2. if a  "setup_file"  is defined, sent that to the printer.
> 3. (not sure if both, a global setup_file, and a device setup_file are sent
>    or if the device setup_file replaces the global one)

My investigation indicates that both are sent.  The global prepended to the
device setup.

> 4. Then the data is sent.
> 5. if  "pjl_supported" is true, then cleanup PJL commands are sent. 6. if 
"pjl_supported" is true, I believe their is PJL feedback to the
>    spooler, so 2-way communication from printer.
> 7. if  "snmp_enabled" is true, there would be 2-way communication
>    from printer.

Both are off here.  We originally had this set up to work with LJII's and never
bothered with it as the printer models changed.

> Long ago, I believe we setup our macro overlays in the setup_file. This
allowed our "ASK" Invoices, POs, etc, to print with
> overlays,signatures,etc,
> without changing the FORTRAN code.
>
> Keven Miller
>
>

Ah, if only I knew then what I know now.

In this case both the ENV file and the spooler were prepending PCL commands. 
The spooler was setting the reset commands.  I determined this by removing the
ENV clause and examining the result.

So, what I did was handle this on the virtual end.  The remote command that I
am using at the moment, and which successfully merges the print file with the
invoice overlay, is this:

socat TCP4-LISTEN:9101,bind=192.168.216.179,fork,reuseaddr,su=hp3000 \
      SYSTEM:'sed -r '1s/^.{42}//' | \
      cat /var/spool/hp3000/forms/hll_inv_ljiii_85.ovl - | \
      gpcl6 -dNOSAFE -dNOPAUSE -sDEVICE=pdfwrite \
      -sOutputFile=/var/spool/hp3000/np4178/HP3000-INV-\"$(date
-Iseconds)\"-%03u.pdf -' &

The sed utility strips off the first 42 characters, which comprise all of the
PCL added to the HP SPOOL file, and pipes the STDOUT result to cat.  The cat
utility prepends the PCL auto macro overlay file to the STDIN stream ( - ) from
sed and pipes that to gpcl6 which then reads cat's STDOUT from its STDIN ( - ).

The rest of it just sets the output to pdf, timestamps the result, and
identifies the data source (hp3000/np4178).

At this point I can create regular reports as pdfs and merged invoice form pdfs
directly from the HP3000 and place them on our WebDAV resource. Which is a long
way from where I started with this.  I just was looking for a PC utility to
read spool files.  Talk about falling down the rabbit hole.

If you ever run across the details of how this is done entirely on the HP3000
using an ENV file then I would appreciate having that information.  Is it just
as simple as pointing the ENV to the overlay file?

Regards,

P.S. respecting FCOPY.

Is there a parm to turn of the file size mismatch warning?  In jobs I use
HPMSGFENCE, but that nukes everything.  I just want FCOPY to shut up.  I
suppose I could write a UDC, but, . .  meh.

I cannot find such an option in the FCOPY manual. But, that usually means I am
either looking in the wrong place or that I do not understand what I have
found.

Thanks.

-- 
***          e-Mail is NOT a SECURE channel          ***
        Do NOT transmit sensitive data via e-Mail
   Unencrypted messages have no legal claim to privacy
 Do NOT open attachments nor follow links sent by e-Mail

James B. Byrne                mailto:[log in to unmask]
Harte & Lyne Limited          http://www.harte-lyne.ca
9 Brockley Drive              vox: +1 905 561 1241
Hamilton, Ontario             fax: +1 905 561 0757
Canada  L8E 3C3

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *


* To join/leave the list, search archives, change list settings, * * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2