Subject: | |
From: | |
Reply To: | |
Date: | Tue, 18 Jan 2000 20:03:07 +0100 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
John,
on my system I have a similar situation. A PC application has
data that I want to import into an HP 3000 application without
having to do manual file transfer and the like.
Being a Samba/iX user I have taken the following route...
I have configured a "dummy" printer in smb.conf that does not
use the default setup and forward incoming PC data into the
MPE spooler, but runs a custom little shell command (or program)
that takes the incoming data and pumps it into my MPE program.
Now I can simply feed (formatted) PC data into the 3000 by
printing to the dummy printer, which uses a "Generic/Text Only"
driver on the PC side.
Example in smb.conf:
[myImport]
comment = Dummy printer to import into MPE app
browseable = no
print ok = yes
write ok = no
guest ok = yes
guest only = yes
path = /usr/local/samba/spool
create mode = 0644
print command = /APP/PUB/IMPORT "%s %m"
The PC maps \\my3000\myImport as printer (using the Generic
Text Only" driver to prevent fancy-schmancy PCL additions).
The IMPORT.PUB.APP program gets two parameters in the INFO
string, first is the input filename (that has been created by
SMBD to buffer the PC data), and second is the NetBIOS name
of the sending PC (which I need for identification purposes
as I don't want to parse that info from the data sent). The
IMPORT program purges the input file after processing.
The %s and %m macros in smb.conf tell SMBD to supply the
actual values of filename and PC name when launchign the
"print command" for processing each PC "printout". There
are others, eg PC user name, etc. (see smb.conf docs for
details in /SAMBA/PUB/html/@).
Lars "your milage may vary"
|
|
|