Appendix C. AIX administrative client in OS/400 PASE sample programs 403
Adding a new administrator to IBM Tivoli Storage Manager
In our example, we created a new IBM Tivoli Storage Manager administrator called
auto_operator, which is used to run all IBM Tivoli Storage Manager commands from the
OS/400 RUNTSMCMD command. To add a new administrator to the IBM Tivoli Storage
Manager server, enter the following commands from the IBM Tivoli Storage Manager Web
Server Command window:
register admin auto_operator ibmrochester
grant authority auto_operator classes=system
Sample code for the RUNTSMCMD command
You can use the sample code shown in Example C-3 to compile into the RUNTSMCMD
command.
Example: C-3 Sample RUNTSMCMD CLP code
PGM PARM(&TSMCMD)
/**/
DCL VAR(&CMD) TYPE(*CHAR) LEN(230)
DCL VAR(&TSMCMD) TYPE(*CHAR) LEN(180)
DCL VAR(&SHELL) TYPE(*CHAR) LEN(25) +
VALUE('/QOpenSys/usr/bin/ksh')
DCL VAR(&ACCESS) TYPE(*CHAR) LEN(50) +
VALUE('dsmadmc -id=auto_operator -pa=ibmrochester')
DCL VAR(&NULL) TYPE(*CHAR) LEN(1) VALUE(X'00')
/**/
CHGVAR VAR(&CMD) VALUE(&ACCESS *CAT &TSMCMD)
CHGVAR VAR(&CMD) VALUE(&CMD *TCAT &NULL)
CHGVAR VAR(&SHELL) VALUE(&SHELL *TCAT &NULL)
/**/
CHGCURDIR DIR('/usr/tivoli/tsm/client/ba/bin')
/**/
CALL PGM(QP2SHELL) PARM(&SHELL &CMD)
/**/
ENDPGM
You can use the sample command source shown in Example C-4 to create the
RUNTSMCMD command linked to the previously created RUNTSMCMD program.
Important: The program must have an IBM Tivoli Storage Manager administrative user
and password hardcoded in the program. Make sure that the program and command are
adequately secured by OS/400 security to ensure that only the authorized people are
allowed to use this function.
Important: The code in Example C-3 is case sensitive. You must type the directory
references in lowercase as shown in this example.

Get Integrating Backup Recovery and Media Services and IBM Tivoli Storage Manager on the IBM eServer iSeries Server now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.