Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!lll-crg!mordor!dual!ucbvax!info-vax From: KVC@ENGVAX.UUCP (Kevin Carosso) Newsgroups: mod.computers.vax Subject: User-modified print symbionts. Message-ID: <8602250741.AA05066@csvax.caltech.edu> Date: Mon, 24-Feb-86 23:09:43 EST Article-I.D.: csvax.8602250741.AA05066 Posted: Mon Feb 24 23:09:43 1986 Date-Received: Wed, 26-Feb-86 21:03:36 EST Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 57 Approved: info-vax@sri-kl.arpa Ok, here's a nasty problem I hope someone has solved... I've written a print symbiont using the PSM$ routines (if you don't know what those are, you probably oughta skip the rest of this message) to enable me to create a server queue on one machine that outputs across DECnet to another machine that has all our printers on it. With the exception of the following little problem, this is actually quite easy to do. (PRINT/REMOTE doesn't do the job, it requires that the file already be on the remote node.) The way my code works is as follows: When NETSMB.EXE is started up running as the symbiont processor for the queue called REMOTE, it establishes a DECnet connection to a server I've written. Now, when a file is printed it first tells the server what remote queue to finally send the file to for printing, then it sends the data. The server squirrels the data coming over the net into a temp file. At the end of the file, the symbiont tells the server it's done and the server then queues the temp file for printing on the requested remote printer. The problem I've got is how can you get your PSM replacement routines to know when the end of the print job has occured. If you think about it, you never really need to know this if you are sending to a stupid printer, you just output when it tells you to output. In my case, though, I have to know. Now, I have managed to use PSM$REPLACE to replace PSM$K_JOB_COMPLETION with my own routine. I duplicated what it does on the fiche (only a few lines) and also set my own flag saying that after the next PSM$K_WRITE call to my user-written output routine, we are done. Unfortunately, JOB_COMPLETION is really file completion. If I print one file, it works perfectly. Even if I have job separation trailers enabled, I can correctly sense that I'm done after the job trailer page has been sent. Unfortunately, if I print multiple files with a single print command (which VMS calls a single print "job") I incorrectly detect completion of the job after every file, except for the last file, for which I detect completion after the job trailer page. Since the one on the fiche really only prints a form-feed, it's not really a bug that it prints a form-feed between each file in the job, though I think it is incorrect behaviour, FILE_COMPLETION (or whatever) should do that! While I can live with this behaviour, it is tacky, since I will be taking one print job (with nice job headers and trailers and burst pages) and breaking it up by file. When actually printed on the remote end, someone else's print job could get mingled in between the files that constitute my remotely printed job, making the job separation stuff worthless. Anyone out there use the PSM stuff? Any suggestions? /Kevin Carosso engvax!kvc @ csvax.caltech.edu Hughes Aircraft Co. ps. I refuse to look at the data I'm sending to see if it resembles a VMS job trailer page in order to detect EOJ!!! pps. Oh, and another thing... Anyone else get the standard VMS 4.2 print symbiont into a COM bound loop using PRINT/PASSALL? Stopping the queue doesn't help, you have to nail the SYMBIONT_xxxx process.