[Info-vax] Porting logical name applications to Unix
ChaosLess
james at enduring.com
Mon Sep 28 11:05:11 EDT 2009
On Sep 27, 10:24 pm, "Richard B. Gilbert" <rgilber... at comcast.net>
wrote:
> JF Mezei wrote:
> > Paul Raulerson wrote:
> >> The
> >> idea of course is to use generic file names in the programs, and
> >> attach them at runtime.
>
> > Ok, what is the best way to achieve this ? VMS has logical names, and
> > MVS has DD statements in JCL and their equivalent in TSO. With Unix, do
> > you open "input.dat" and then create a link in the directory called
> > "input.dat" which points to the actual file ?
>
> Try stdin and stdout. I think that they are predefined. It's been
> quite a while since I did any serious work with any Unix so take this
> with a tiny grain of salt.
this is a widely used feature in unix.
if you are wanting to feed input to an application - or connect output
from a program - then stdin and stdout are always already defined and
opened.
so from the shell you can connect these programs, e.g. for myexe:
yourexe < input.dat
myexe > output.dat
myexe | yourexe > output.dat
these are widely used in unix and some shell notations allow inline
input a bit like you can in DCL.
myexe <<< EOF
this is input
fed to the executable
until the end is found
EOF
More information about the Info-vax
mailing list