IBM Books

Administration Guide


Prefix Sequences

A prefix sequence is one or more special characters. Type one or more prefix sequences immediately preceding the characters of the command without any intervening blanks. If you want to specify more than one sequence you can type them in any order, but characters within any multi-character sequence must be typed in order. If you type any prefix sequences, you must enclose the entire command including the prefix sequences in double quotes as shown in the following example:

      rah "};ps -F pid,ppid,etime,args -u $USER"
The prefix sequences are:
Sequence
Purpose
|
Runs the commands in sequence using background rshells.
|&
Runs the commands in sequence using background rshells AND terminates the script after all remote commands have completed even if some rshells are still running (which may be later if for example, child processes are still running). In this case, the script starts a separate background process to retrieve any remote output generated after command termination and writes it back to the originating terminal. For example, if the command is db2start, the rshell will persist until db2stop. All output after the completion of db2start will be retrieved by the process.
Note:Specifying & degrades performance since more rsh commands are required.
||
Runs the commands in parallel using background rshells.
||&
Runs the commands in parallel using background rshells and terminates the script after all remote commands have completed as described for the |& case above.
Note:Specifying & degrades performance since more rsh commands are required.
;
Same as ||& above. It is an alternative shorter form. NOTE - specifying ; degrades performance relative to || since more rsh commands are required.
]
Prepends dot-execution of user's profile before executing command.
}
Prepends dot-execution of file named in $RAHENV (probably .kshrc) before executing command.
]}
Prepends dot-execution of user's profile followed by execution of file named in $RAHENV (probably .kshrc) before executing command.
)
Suppresses execution of user's profile and of file named in $RAHENV.
'
Echoes the command invocation to terminal.
<
Sends to all hosts except this host.
<<-nnn<
Sends to all-but-partition nnn (all partitions in db2nodes.cfg except partition number nnn, see note below).
<<+nnn<
Sends to only partition nnn (the partition in db2nodes.cfg whose partition number is nnn, see note below).
`
Runs the remote command as a daemon, i.e. in background with stdin, stdout and stderr all closed. This option is valid only when using background rshells, i.e. only in a prefix sequence which also includes | or ;. It allows the rshells to complete much sooner (as soon as the remote command has been initiated). If you specify this prefix character on the rah command line, then either enclose the command in single-quotes or enclose the command in double-quotes AND precede the ` by a \. For example,
  rah ';`mydaemon'
or
  rah ";\`mydaemon"
When the command is run as a daemon, rah will never wait for any output to be returned.
>
Substitutes occurrences of <> by hostname.
"
Substitutes occurrences of () by host index, and substitutes occurrences of # by partition number.
Note:When " is specified, duplicates are not eliminated from the list of hosts (see below).

When using <<-nnn< and <<+nnn< prefix sequences, nnn is any 1, 2 or 3 digit decimal partition number which must match the first token in one line of db2nodes.cfg.
Note:Prefix sequences are considered to be part of the command. If you specify a prefix sequence as part of a command, you must enclose the entire command including the prefix sequences in double quotes.


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

[ DB2 List of Books | Search the DB2 Books ]