Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ucbvax.BERKELEY.EDU Path: utzoo!decvax!ittatc!dcdwest!sdcsvax!ucbvax!info-vax From: info-vax@ucbvax.UUCP Newsgroups: mod.computers.vax Subject: Re: Calling PRINT from a C program Message-ID: <8602102230.AA29266@tcville.uucp> Date: Mon, 10-Feb-86 17:30:15 EST Article-I.D.: tcville.8602102230.AA29266 Posted: Mon Feb 10 17:30:15 1986 Date-Received: Sat, 15-Feb-86 14:49:47 EST References: <8602032142.AA02106@ia-sun2.uucp> Sender: daemon@ucbvax.BERKELEY.EDU Organization: ISPL, Hughes AC, El Segundo, CA Lines: 28 Approved: info-vax@sri-kl.arpa In article <8602032142.AA02106@ia-sun2.uucp> you write: >I am trying to print a file "foo.bar" from C under VMS 3.6. >I have been successful at using LIB$SPAWN to spawn the command >"print foo.bar" BUT this will ONLY work with an interactive session. >It fails as a detached process and a batch job. I had originally >hoped that there would be a "print.exe" that I could use SYS$CREPRC >on but alas there is none. > >Could anyone give me pointers on how to print a file given a string >containing the file name and the appropriate options. It MUST >be able to run as either a batch job or a detached process. > > -David Robinson > ia-sun2!david@csvax.caltech.edu > seismo!cit-vax!ia-sun2!david This LIB$SPAWN silliness of only working interactively got fixed in VMS 4.1. Your code should work in a batch file just fine if you can get your system manager to convert to VMS 4.1 [Lots of other stuff will probably break though] tom campbell -- UUCP: 1st choice: allegra!scgvaxd!tcville!tc 2nd choice: {ucbvax | allegra | decvax }!sun!tsunami!tcville!tc MaBell: (213) 616-0237