RDF/IMP and IMPX System Management Manual (RDF 1.4+)
Operating and Monitoring RDF
HP NonStop RDF/IMP and IMPX System Management Manual—524388-001
4-6
Using RDFCOM From a Command File
using your standard text editor. You might, for example, create a command file named
RDFSET that contains the following commands:
SET RDF PRIMARYSWAP $SWAP
SET RDF BACKUPSWAP $SWAP
ADD RDF
To run RDFCOM and execute the commands in this file, supply the command file
name in the IN option of the command to start RDFCOM:
4> RDFCOM /IN RDFSET/ control-subvolume
When it uses a command file in this way, RDFCOM works in batch mode: RDFCOM
begins the session, reads and executes each command from the command file, and
displays the associated output at your terminal. When RDFCOM reaches the end of
the command file or encounters an EXIT command within that file, RDFCOM
terminates the session and returns control to TACL. If RDFCOM encounters an error
while reading the command file, RDFCOM displays an error message, terminates the
session, and returns control to TACL.
If you include both the IN and OUT options in the RDFCOM command, RDFCOM
reads commands from the command file specified by the IN option and directs all
output to the destination specified by the OUT option. For example, the following
command causes RDFCOM to read commands from the command file COMFILE1 and
list the output to the printer $LP:
5> RDFCOM/IN COMFILE1, OUT $LP/ control-subvolume
In addition, you can execute the contents of a command file within an interactive
RDFCOM session by using the OBEY command. If you regularly use a series of
sequential RDF operations in your interactive sessions, for instance, you might want to
specify these in a command file. Then each time you need these operations, you can
invoke them with a single OBEY command rather than with multiple individual
RDFCOM commands.
As an example, many users find that initializing RDF is much easier and more
consistent when done using command files. Suppose you have created a command
file named RDFINIT that contains the commands for initializing the subsystem. You
could execute all these commands by simply entering:
]OBEY RDFINIT
If you decide later that you want to use different installation parameters, you can
change the command file and then enter the OBEY command again. Using command
files makes performing repeated tasks very convenient.
During processing of an OBEY command, when RDFCOM reaches the end of the
command file, RDFCOM prompts you for another RDFCOM command. If RDFCOM
encounters an EXIT command within the command file, RDFCOM terminates the
session and returns control to TACL. If RDFCOM encounters an error while reading
the command file, RDFCOM displays an error message, and prompts you for another
RDFCOM command.