Tivoli Header
Tivoli Storage Manager Using the Application Program Interface
- Note:
- The installation instructions for OS/400 are included in this section for
your convenience. Installation instructions for other operating
systems, such as Windows, are included in the Tivoli Storage Manager
Installing and Using the Backup-Archive Client for your operating
system.
If you are installing the Tivoli Storage Manager API for OS/400 product
from the CD, place the CD in the CD-ROM drive and enter the following OS/400
command where OPT1 is the device name for the CD-ROM drive:
RSTLICPGM LICPGM(5733197) DEV(OPT1) LNG(2924)
If you are installing the Tivoli Storage Manager API for OS/400 product
from a "save file", enter the following OS/400 command where
MYLIB/MYSAVEFILE is the name of your save file:
RSTLICPGM LICPGM(5733197) DEV(*SAVF) SAVF(MYLIB/MYSAVEFILE) LNG(2924)
The files that are listed in Table 6 include the source files and other files that you need to
build the sample application that is included with the API package.
Table 6. Files That You Need to Build the OS/400 API Sample Application
File Names
|
| Description
|
readme.api
|
| Readme file
|
crtapismp.clp
|
| A CL program file to build dapismp for your application.
|
dsmrc.h
dsmapitd.h
dsmapips.h
dsmapifp.h
release.h
|
|
Return codes header file
Common type definitions header file
Operating system-specific type definitions header file
Function prototype header file
Release values header file
|
dapibkup.c
dapidata.h
dapiinit.c
dapint64.h
dapint64.c
dapipref.c
dapiproc.c
dapiproc.h
|
dapipw.c
dapiqry.c
dapirc.c
dapismp.c
dapitype.h
dapiutil.h
dapiutil.c
| Source code files for a sample application that demonstrates the use of
the primary API functions
|
caller1.c
caller2.c
|
| Simple example modules
|
callmt1.c
callmt2.c
|
| Multi-threaded sample files
|
Follow these steps to compile the sample application, and test the
installation in the QShell environment:
- To start the QShell environment, enter QSH from the OS/400
command line.
- To change your directory to the API sample installation directory,
enter:
cd /usr/tivoli/tsm/client/api/bin/sample
- Run the makeapi.os400.sh shell script. This shell
script compiles the modules, creates the sample application, and binds it to
the API service program. The shell script takes one optional parameter
of the library in which you would like the modules and program placed.
If you do not enter a library name, the QANSAPI library is used. For
example, to compile the sample API modules and create the program into library
MYLIB, enter:
makeapi.os400.sh mylib
- After you build the sample, set up your environment variables, your
DSMI_DIR file, and your options files. For more information, see "Understanding Configuration Files and Options Files" and Tivoli Storage Manager Installing and Using the
Backup-Archive Client for your operating system. You can use the
Work with Object Links (WRKLNK) and Edit File (EDTF) commands to edit the
options files.
- To run dapismp, enter:
dapismp
The makeapi.os400.sh script creates a symbolic link from the
directory to the dapismp program.
Continue with "Running the Sample Application".
Follow these steps to compile the sample application and test the
installation in the OS/400 command line environment:
- Copy the crtapismp.clp CL program source into a source file.
For example, if your source file is QCLSRC in library MYLIB, enter:
CPYFRMSTMF FROMSTMF('/usr/tivoli/tsm/client/api/bin/sample/crtapismp.clp') \
TOMBR('/qsys.lib/mylib.lib/qclsrc.file/crtapismp.mbr')
- To compile the CL program, MYLIB/QCLSRC(CRTAPISMP), enter:
CRTCLPGM PGM(MYLIB/CRTAPISMP) SRCFILE(MYLIB/QCLSRC)
- Start CRTAPISMP. This program compiles the sample application
modules, creates the sample application, and binds it to the API service
program. The library is the only required parameter in which you want
to place the modules and program. Enter:
CALL MYLIB/CRTAPISMP PARM(MYLIB)
- After you build the sample, set up your environment variables, your
DSMI_DIR file, and your options files. For more information, see "Understanding Configuration Files and Options Files" and Tivoli Storage Manager Installing and Using the
Backup-Archive Client for your operating system. You can use the
Work with Object Links (WRKLNK) and Edit File (EDTF)
commands to edit the options files.
- Use the Add Environment Variable (ADDENVVAR) command to set the
environment variables.
- To run dapismp, enter:
CALL MYLIB/DAPISMP
Continue with "Running the Sample Application".
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]