" NETSMB -- A network print spooler.  J      NETSMB allows several VAX/VMS machines to share a single line printerO without having to resort to getting a cluster.  NETSMB is a user modified print = symbiont that replaces the output and job_trailer routines.     J      The output routine simply takes the formatted print job and shoves itN across DECnet to the network object NETSMBSVR on the node specified in the /ONL qualifier when you started the queue.  When a flag is set by the job_trailerM routine, the output routine tells the remote node to print the file and waits N for a return status.  If the user specifies /PARAMETER=<remote-queue-name> theH job will be printed on the queue specified, otherwise it will be sent toN SYS$PRINT.  Note:  The DECnet connection is not maintained permanently, but isN set up once per job.  This solves many problems of trying to figure out when aN node goes down, of keeping the network process on the printing end alive 'tillP it gets something to do, etc., etc...  If NETSMB attempts to set up a connectionK that fails because the status SS$_UNREACHABLE is returned (i.e. the node is O unreachable through DECnet), the queue waits for 5 minutes and tries again (and K again...) till it gets through. (NOTE: There is a bug in this routine which K causes the symbiont, but not the Job Controler, to crash, thus stopping the L queue.  The simple workaround for this problem is to restart the queue after2 the printing node becomes reachable. -rcy 4/24/87)  N      The job_trailer routine waits 'till it sees PSM$K_CLOSE at which point itM sets a flag which tells the remote server to go ahead and print the file.  In J all cases, the job_trailer routine passes control back to PSM$JOB_TRAILER.M Please note that this approach *REQUIRES* that this queue be initialized with M at least trailing job pages (job pages are set up by starting or initializing O the queue /SEPARATE=(<options>) ).  Unfortunately this was the only way to tell & when we get to the end of a print job.  L      On the receiving and printing end, the network object NETSMBSVR acceptsM the file, and essentially does a PRINT/NOFLAG/NOBURST/NOTRAILER/DELETE of the N temporary file once it gets an entire print job.  Currently the code waits forN the job to finish printing before it sends a status back.  This is so that theK default decnet account doesn't overflow (actually, it will only help to cut J down on this possibility, if you have 42 nodes sharing the same printer itM would be quite easy to fill a disk!).  If you really want everything to flush J over immediately, NETSMB_SERVER.BLI has comments in it to tell you what to comment out to do so.   L      You may also set up things so that NETSMBSVR is a known DECnet object. M Make the appropriate change to NETSMB.BLI or NETSMB.MAR, and add NETSMBSVR to K your permenant DECnet database as a known object.  This will allow printing ; over the net without resorting to a default decnet account.   H      If you have the MACRO source, replace all BLISS commands with MACRO	 commands.   J      I use the following queue initializations in SYSTARTUP for the queues SYS$PRINT and REMOTE:    $REMOTE:F $	initialize/queue/default=(feed,flag,form=default)/processor=netsmb -> 		/norecord_blocking/separate=(burst,flag,trailer)/on=Fenris -	 			REMOTE  $	goto done  $ !  $SYS$PRINT: - $	initialize/queue/generic=(REMOTE) SYS$PRINT  $	goto done   J      For those of you who don't have MMS, the following DCL code fragments illustrate what goes on.  ' $ bliss/optimize=(level:3,speed) netsmb 
 $ link netsmb ' $ copy netsmb.exe sys$system:netsmb.exe   M Note: you want to put netsmb.exe into sys$system: on every node that is going * to be sending print jobs over the network.  . $ bliss/optimize=(level:3,speed) netsmb_server $ message netsmb_err $ link netsmb_server,netsmb_err 6 $ copy netsmb_server.exe sys:[decnet]netsmb_server.exe. $ copy netsmbsvr.com sys:[decnet]netsmbsvr.com  P Note:  You want to put both netsmb_server.exe and netsmbsvr.com into the defaultM DECnet account on each system with a printer that you want to print on.  Also L note, NETSMB depends on each printing node to have a default DECnet account.  N      The queue setups on the printing end are pretty much standard.  Note thatM if you have a /separate=(burst,flag,trailer) on the physical print queue, you I will get an extra set of job pages that tell you the print job was called J NETSMB_JOB_FILE.TMP and that it was printed by DECNET.  There is no way toL change the setting of job pages on a queue other than initializing the queueO that way.  There are three ways around this problem.  1) You can do the hacking I that I didn't want to do and have NETSMB_SERVER (the receiving task) do a N STOP/NEXT on the queue that puts job pages on the job, START a queue that doesO not put job pages on the job, print the job, reverse the procedure.  2) You can J not put job pages on your physical printer queue.  3) You can tear off theK extra job pages.  We use option 3, because we figure that our operators are M going to be separating the jobs anyway and we need job pages on the node with  the printer.  K      Good luck!  If you have any problems or questions, I can be reached by J email at chris%engvax.hac.com@usc-oberon.usc.edu.  My work number is (213)K 615-7445 and I can (usually) be counted on to be in between 8 and 4 Pacific O time, excluding lunch.  As with all public domain software, please feel free to O give away this code to anyone who wants it, selling it will earn you the Weenie G of the Year Award, and no warranties, implied, expressed, or verbal are O granted.  Though this software is in daily use here, use of this software is at L your own risk, GM, Hughes, and I refuse any responsibility for any harm thatM comes to your system from use of this software.  If you find any bugs, or add N any features, I would greatly appreciate it if you would send the code back to me.   @ -- Chris Yoder		UUCP -- {allegra or ihnp4}!scgvaxd!engvax!chris D    Hughes Aircraft  Internet -- chris%engvax.scg.hac.com@ymir.bitnet9 	Company		ARPA -- chris%engvax.scg.hac.com@oberon.usc.edu 