RDF System Management Manual

Table Of Contents
Operating and Monitoring RDF
HP NonStop RDF System Management Manual524388-003
4-6
Using RDFCOM From a Command File
Using RDFCOM From a Command File
RDFCOM can also read commands from a command file. The command file is a text
file that contains the RDFCOM commands you want to execute, which you prepare
using your standard text editor. You might, for example, create a command file named
RDFSET that contains the following commands:
SET RDF SOFTWARELOC $SYSTEM.RDF
SET RDF LOGFILE $0
SET RDF UPDATERDELAY 10
SET RDF UPDATERTXTIME 60
SET RDF UPDATERRTDWARNING 60
SET RDF UPDATEROPEN PROTECTED
SET RDF NETWORK ON
SET RDF NETWORKMASTER ON
SET RDF UPDATEREXCEPTION OFF
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