IBM Books

Administration Guide


Controlling the Shell Script

You can use environment variables to control the shell script.

Table 107.  
Name Meaning Default
$RAHBUFDIR directory for buffer /tmp/$USER
$RAHBUFNAME filename for buffer rahout
$RAHOSTFILE pathname of file containing list of hosts <db2instance_home_dir>/sqllib/db2nodes.cfg
$RAHOSTLIST list of hosts as a string extracted from $RAHOSTFILE
$RAHCHECKBUF if set to "no", bypass checks not set
$RAHSLEEPTIME time in secs this script will wait for initial output from commands run in parallel 86400 sec for db2_kill, 200 sec for all other
$RAHWAITTIME interval in secs between successive checks that remote jobs are still running and "rah: waiting for <pid> ..." messages. Specify any positive integer. Prefix value with a leading zero to suppress messages for example, export RAHWAITTIME=045. (Note - not necessary to specify a low value as rah does not rely on these checks to detect job completion). 45 sec
$RAHENV specifies filename to be executed if $RAHDOTFILES=E or K or PE or B $ENV
$RAHUSER userid under which the remote command is to be run $USER
Note:For $RAHENV, the value of $RAHENV where rah is run is used, not the value (if any) set by the remote shell.

$RAHDOTFILES

Following are the .files that are run if no prefix sequence is specified:

P
.profile
E
File named in $RAHENV (probably .kshrc)
K
Same as E
PE
profile followed by file named in $RAHENV (probably .kshrc)
B
Same as PE
N
None (or Neither)
Note:If your login shell is not kornshell, any dot files which you specify to be executed will be executed in a kornshell process and so must conform to kornshell syntax. So, for example, if your login shell is csh, then to have your .cshrc environment set up for commands executed by rah, you should either create a kornshell $HOME/.profile equivalent to your .cshrc and specify in your $HOME/.cshrc
   setenv RAHDOTFILES P
or you should create a kornshell $HOME/.kshrc equivalent to your .cshrc and specify in your $HOME/.cshrc
   setenv RAHDOTFILES E
   setenv RAHENV $HOME/.kshrc
Also, it is essential that your .cshrc does not write to stdout if there is no tty (as when invoked by rsh). You can ensure this by enclosing any lines which write to stdout by, for example,
 if { tty -s } then echo "executed .cshrc";
 endif


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]