Tivoli Storage Manager for Sun Solaris Administrator's Reference

MACRO (Invoke a Macro)

Use this command to invoke a file from the administrative command line that contains one or more TSM administrative commands to be performed.

This command is used with administrative command-line clients only.

A macro is a file that contains one or more TSM administrative commands. You can only issue a macro from the administrative client in batch or interactive mode. A macro is stored as a file on the administrative client machine (or system). Macros are not distributed across servers and cannot be scheduled on the server.

Creating a macro to enter commands can be helpful when you want to issue commands that are used repeatedly, to issue commands that contain several parameters, or to process related commands in a specific order. After you create a macro, you can update the information it contains and use it again, or you can copy the macro file, make changes to the copy, and then run the copy.

For detailed information on macros, how to use them, and the differences between command scripts and administrative command-line client macros, refer to the Administrator's Guide.

Privilege Class

Any administrator can issue this command.

Syntax

>>-MACRO--macro_name----+----------------------------+---------><
                        |  .-,--------------------.  |
                        |  V                      |  |
                        '----substitution_value---+--'
 

Parameters

macro_name (Required)
Specifies the name of the macro.

substitution_value
Specifies the value for a substitution variable in a macro. When you use a substitution variable, you can reuse a macro whenever you need to perform the same task for different objects or with different parameter values. Each substitution value must be delimited with a comma. To specify a value that contains blanks, you must enclose the value in quotation marks. This parameter is optional.

Examples

Task 1

Create a macro file named REGNG. Use the macro to register and grant authority to a new administrator. Write the macro as follows:

/* Register and grant authority to a new administrator */
REGister Admin jones passwd        -
CONtactinfo="x1235"
GRant AUTHority jones              -
CLasses=Policy

Command:
macro regng.mac

Task 2

Create a macro file named AUTHRG, containing substitution variables, to register and grant authority to a new administrator. Write the macro as follows:

/*   Register and grant authority to a new administrator */
REGister Admin %1 %2  -        /*  Enter userid and password  */
CONtact=%3         /* Enter contact info (in quotes if nec.) */
GRant AUTHority %1  -        /*  Server uses variable already */
-                                         /*  defined by you */
CLasses=%4                     /*  Enter the privilege class  */

Enter the values you want to pass to the server to process the command when you run the macro.

Command:
macro authrg.mac jones passwd x1235 Policy

Related Commands

Table 144. Commands Related to MACRO

Command Description
COMMIT Makes changes to the database permanent.
ROLLBACK Discards any uncommitted changes to the database since the last COMMIT was executed.


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