D3/Linux - D3-to-Linux communication to print spooler

D3/Linux - D3-to-Linux communication to print spooler

Post by Gordon Durne » Wed, 17 Apr 2002 23:50:50

I have successfully created a bash script to convert printer output to
HTML, but I need a way to communicate to the script the D3 user that
created the report.

The shared printer is started this way:

startshp 99,99,0,p87,lp.unix,(/usr/local/bin/d3_print_to_html) (s

The bash script contains the following (code is simplified here):


DATETIME=`date +"%Y%m%d%H%M%S"`

cat >>$TEXT_FILE

echo "<PRE>"                                         >>$HTML_FILE
cat $TEXT_FILE | sed "s/^L/\<\/PRE\>\<HR\>\<PRE\>/g" >>$HTML_FILE
echo "</PRE>"                                        >>$HTML_FILE

Now, all I need is a way to communicate the D3 user name to the bash
script associated with print queue 99.  That way I can (a) put each
file into a separate directory for each user and (b) send email to
that user that the file is ready.  [Eventually I will put all this
stuff into a MySQL database with PHP code to build web pages to view
and manipulate the print files.]

I have tried something like this in the bash script:
    USER_NAME=`who am i`  (or   who -m)
but this returns nothing.  Is there a separate Linux user that runs
the spooler stuff -- or should the user from 'who' be the Linux user
that started this print job???

I have a large amount of legacy RPL and BASIC code that I have to
support and really can't change every program.  I'm hoping I can use
this method and simply change the default printer to 99 (with
"SP-ASSIGN F99" in the startup).

Any ideas how to pass data to Linux with minimal (if any) PICK code

Trying to be truly paperless,
Gordon Durnell


1. D3 7.0 to D3 7.1 Incompatibility problem with c functions on D3/Linux


I am trying to port an application from D3/SCO 7.0 to D3/Linux 7.1 and am
running into problems when calling user defined C functions.

I have successfully run addbi and the Makefile and created the new D3
executable using the same C function library that is running with D3/SCO.

I can then load the filesave from the D3/SCO 7.1 server and the basic
programs calling the C functions run normally.

BUT, when I re-compile the basic programs (without making any changes) that
call the C functions, they no longer work and give a variety of errors
including core dumps.

It would seem that if the basic program is running the pcode created on
D3/SCO 7.0, all is OK, but running the pcode created on D3/Linux 7.1 it no
longer works.

Anybody got any clues what is going on.

Thanks for any advice you can give.


Adam Easterbrook

2. How can I make a copy of one of my table ?

3. Dire&#1089;&#1077;rtly sending E-mail From D3 (D3/NT ior D3/Linux)

4. Looking for Oracle Tutor Users

5. Max number of spooler entries in D3/Linux

6. Sample Oracle/DBAnywhere code needed

7. D3 linux capturing spooler entry number in proc.

8. US-FL-Orlando Informix 4GL Connectivity to Web (Internet/WWW)

9. D3 linux capturing the currently open spooler entry # in Basic

10. Odd Spooler Behaviour - D3/Linux

11. linux d3 spooler problem

12. Infolink - D3/Sco to D3/Linux

13. Calling d3 from perl where d3 is on another linux machine inside a firewall