Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!ames!ucbcad!ucbvax!SPCA.BBN.COM!gwalker From: gwalker@SPCA.BBN.COM.UUCP Newsgroups: comp.os.vms Subject: Re: redirection of stdio, et al. Message-ID: <8704272220.AA01440@ucbvax.Berkeley.EDU> Date: Sun, 26-Apr-87 21:28:36 EDT Article-I.D.: ucbvax.8704272220.AA01440 Posted: Sun Apr 26 21:28:36 1987 Date-Received: Wed, 29-Apr-87 01:11:26 EDT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 41 The following are the ways I know of to get stdio redirection on VMS. This is just a summary and doesn't give a lot of details. Whether these work out for you may depend on what programs you are trying to use this way and even what language they are written in. 1. For all programs that use SYS$OUTPUT (stdout for VMS) for their output (as most do) you can either a) use ASSIGN/USER somefile SYS$OUTPUT just before running the program to make everything directed to SYS$OUTPUT go to the file "somefile" instead OR b) Put the call to your program in a command file and invoke it with @commandfile /OUTPUT=somefile to redirect the output. (If the program takes input from the terminal you need to ASSIGN/USER SYS$COMMAND SYS$INPUT before running the program from the command file.) There may be some cases where the file comes out funny if the program is one that believes its output is always a terminal, or anything like that. I guess the best way to know if these will meet your needs is to try them. On the input side (SYS$INPUT), method (a) can be used: ASSIGN/USER myinfile SYS$INPUT also in command files you can follow the call to the program with the input itself (the input data lines just don't start with a '$' sign.) 2. For VMS commands, many of them now have a /OUTPUT switch to allow you to redirect their output to a file. 3. If what you really want is to have your programs accept ">somefile" or "