Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!ames!ucbcad!zen!ucbvax!CITHEX.CALTECH.EDU!carl From: carl@CITHEX.CALTECH.EDU (Carl J Lydick) Newsgroups: comp.os.vms Subject: Re: Redirection of IO... Message-ID: <870820155443.01l@CitHex.Caltech.Edu> Date: Thu, 20-Aug-87 19:00:34 EDT Article-I.D.: CitHex.870820155443.01l Posted: Thu Aug 20 19:00:34 1987 Date-Received: Sat, 22-Aug-87 19:48:38 EDT Sender: usenet@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 21 > I have a question for all the VMS gods out there. How do I do this, > > $ define/user sys$input input.dat > $ define/user sys$output output.dat > $ run the_program > > within a program (.EXE as opposed to .COM). The following call will not work > > LIB$SPAWN('run the_program','input.dat','output.dat',...) > > because after executing 'run the_program' LIB$SPAWN tries to execute > INPUT.DAT I'm working on a program to do general redirection of IO and this > problem has me at a stand still. Could someone help me? The problem is that the logical names created by LIB$SPAWN aren't USER_MODE. The only simple workaround I know of is to create a file with the commands: $ define/user sys$input input.dat $ define/user sys$output output.dat $ run the_program in it, then use lib$spawn to create a process with that file as its input.