IBM Books

Quick Beginnings for DB2 Extended Enterprise Edition for UNIX


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 multicharacter sequence must be typed in order. If you type any prefix sequences, you must enclose the entire command, including the prefix sequences in double quotation marks, as in the following example:

  rah "};ps -F pid,ppid,etime,args -u $USER"

The prefix sequences are:

Sequence
Purpose

|
Runs the commands in sequence in the background.

|&
Runs the commands in sequence in the background and terminates the command after all remote commands have completed, even if some are still running (which may be later if for example, child processes are still running). In this case, the command starts a separate background process to retrieve any remote output generated after command termination and writes it back to the originating machine.
Note:Specifying & degrades performance, because more rsh commands are required.

||
Runs the commands in parallel in the background.

||&
Runs the commands in parallel in the background and terminates the command after all remote commands have completed as described for the |& case above.
Note:Specifying & degrades performance, because more rsh commands are required.

;
Same as ||& above. This is an alternative shorter form.
Note:Specifying ; degrades performance relative to ||, because 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 the machine.

<
Sends to all the machines except this one.

<<-nnn<
Sends to all-but-database partition server nnn (all database partition servers in db2nodes.cfg except for node number nnn, see the note below).

<<+nnn<
Sends to only database partition server nnn (the database partition server in db2nodes.cfg whose node number is nnn, see the note below).

`
Runs the remote command in the background with stdin, stdout and stderr all closed. This option is valid only when running the command in the background, that is, only in a prefix sequence which also includes | or ;. It allows the command 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 quotation marks, or enclose the command in double quotation marks, and precede the ` by \. For example,
  rah ';`mydaemon'

or

  rah ";\`mydaemon"

When run as a background process, the rah command will never wait for any output to be returned.

>
Substitutes occurrences of <> with the machine name.

"
Substitutes occurrences of () by the machine index, and substitutes occurrences of # by the node number.

Notes:

  1. The machine index is a number that associated with a machine in the database system. If you are not running multiple logical nodes, the machine index for a machine corresponds to the node number for that machine in the node configuration file. To obtain the machine index for a machine in a multiple logical node environment, do not count duplicate entries for those machines that run multiple logical nodes. For example, if MACH1 is running two logical nodes and MACH2 is also running two logical nodes, the node number for MAC3 is 5 in the node configuration file. The machine index for MACH3, however, would be 3.

  2. When " is specified, duplicates are not eliminated from the list of machines. See "Eliminating Duplicate Entries from the List of Machines" if you want to eliminate duplicates.

When using the <<-nnn< and <<+nnn< prefix sequences, nnn is any 1-, 2- or 3-digit partition number which must match the nodenum value in the db2nodes.cfg file.
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 quotation marks.


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

[ DB2 List of Books | Search the DB2 Books ]