[Info-vax] Porting logical name applications to Unix

PR paul.raulerson at gmail.com
Thu Oct 1 13:26:22 EDT 2009


On Sep 28, 10:05 am, ChaosLess <ja... at enduring.com> wrote:
> 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

Just for fun, I looked at the execution environment of a Linux program
today. It is amusing what is actually in the environment when the
program is ran.
For your enjoyment:

15406 ?        S      0:00 /cti/V250/WBIN/WS05 LESSKEY=/etc/
lesskey.bin DSMI_DIR=/opt/tivoli/tsm/client/api/bin NNTPSERVER=news
INFODIR=/usr/local/info:/usr/share/info:/usr/info MANPATH=/usr/share/
man:/usr/local/man:/usr/local/share/man:/usr/X11R6/man:/opt/gnome/
share/man HOSTNAME=zlin040 COSORT_HOME=/cti/cosort GNOME2_PATH=/usr/
local:/opt/gnome:/usr XKEYSYMDB=/usr/X11R6/lib/X11/XKeysymDB
HOST=zlin040 TERM=dtterm SHELL=/bin/bash PROFILEREAD=true
HISTSIZE=1000 SSH_CLIENT=::ffff:10.10.15.23 2109 22 DSMSERV_CONFIG=/
opt/tivoli/tsm/server/bin/dsmserv.opt QTDIR=/usr/lib/qt3 SSH_TTY=/dev/
pts/9 JRE_HOME=/usr/lib/java/jre USER=root LS_COLORS= DSM_LOG=/opt/
tivoli/tsm/logs CTIPATH=/cti DSM_DIR=/opt/tivoli/tsm/client/ba/bin
DSMSERV_ACCOUNTING_DIR=/opt/accounting XNLSPATH=/usr/X11R6/lib/X11/nls
HOSTTYPE=s390 DSMSERV_DIR=/opt/tivoli/tsm/server/bin PAGER=less
MINICOM=-c on MAIL=/var/mail/root PATH=/sbin:/usr/sbin:/usr/local/
sbin:/root/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/
opt/gnome/bin:/opt/kde3/bin:/usr/lib/java/jre/bin:/cti/cosort/bin:.
CPU=s390 JAVA_BINDIR=/usr/lib/java/jre/bin INPUTRC=/etc/inputrc PWD=/
root JAVA_HOME=/usr/lib/java/jre EDITOR=/usr/bin/the DSM_CONFIG=/opt/
tivoli/tsm/client/ba/bin/dsm.opt DSMI_LOG=/opt/tivoli/tsm/logs
TEXINPUTS=:/root/.TeX:/usr/share/doc/.TeX:/usr/doc/.TeX SHLVL=1 HOME=/
root DSMI_CONFIG=/opt/tivoli/tsm/client/api/bin/dsm.opt
LESS_ADVANCED_PREPROCESSOR=no OSTYPE=linux LS_OPTIONS=-a -N --
color=none -T 0 no_proxy=localhost XCURSOR_THEME=crystalwhite
WINDOWMANAGER=/usr/X11R6/bin/kde GTK_PATH=/usr/local/lib/gtk-2.0:/opt/
gnome/lib/gtk-2.0:/usr/lib/gtk-2.0 LESS=-M -I MACHTYPE=s390-suse-linux
LOGNAME=root LC_CTYPE=en_US.UTF-8 SSH_CONNECTION=::ffff:10.10.15.23
2109 ::ffff:10.10.10.40 22 PKG_CONFIG_PATH=/opt/gnome/lib/pkgconfig
LESSOPEN=lessopen.sh %s ACLOCAL_PATH=/opt/gnome/share/aclocal
INFOPATH=/usr/local/info:/usr/share/info:/usr/info:/opt/gnome/share/
info LESSCLOSE=lessclose.sh %s %s G_BROKEN_FILENAMES=1 JAVA_ROOT=/usr/
lib/java COLORTERM=1 _=/usr/bin/nohup




More information about the Info-vax mailing list