Sie sind auf Seite 1von 2

1.

Create or choose a library where you want to transfer the savefile containing
the packages.

CRTLIB MYLIB

2. Create a SAVEFILE in that library in which to receive the savefile.

CRTSAVF MYLIB/DDOV6R1

3. FTP the CfODBC DB2 SQL Package savefile to the host system into the SAVEFILE
that you created in step 2.
Be sure to FTP in binary format
There is a file for each specific version of AS400
V6R1: DDOV6R1.savf
V5R4: DDOV5R4.savf
V5R3: DDOV5R3.savf
V5R2: DDOV5R2.savf

example:
ftp> bin
200 Representation type is binary IMAGE.
ftp> put DDOV6R1.savf /qsys.lib/mylib.lib/DDOV6R1.savf
200 PORT subcommand request successful.
150-NAMEFMT set to 1.
150150 Sending file to member DDOV6R1 in file DDOV6R1 in library MYLIB.
226 File transfer completed successfully.
ftp: 1605120 bytes sent in 89.56Seconds 17.92Kbytes/sec.
ftp>

4. (optional) Login to your host system and execute the DSPSAVF command to display
the packages. This will verify that the SAVEFILE was correctly transferred to the
host system.

DSPSAVF MYLIB/DDOV6R1

Results:

Display Saved Objects

Library saved . . . . . . . : NULLID

Type Options press Enter.


5=Display

Opt Object Type Attribute Owner Size (K) Data


DDOC510A *SQLPKG PACKAGE NCDDTEK 96 YES
DDOC510B *SQLPKG PACKAGE NCDDTEK 100 YES
DDON510A *SQLPKG PACKAGE NCDDTEK 96 YES
DDON510B *SQLPKG PACKAGE NCDDTEK 100 YES
DDOR510A *SQLPKG PACKAGE NCDDTEK 96 YES
DDOR510B *SQLPKG PACKAGE NCDDTEK 100 YES
DDOS510A *SQLPKG PACKAGE NCDDTEK 96 YES
DDOS510B *SQLPKG PACKAGE NCDDTEK 100 YES
DDOU510A *SQLPKG PACKAGE NCDDTEK 96 YES
DDOU510B *SQLPKG PACKAGE NCDDTEK 100 YES

5. Execute the RSTOBJ restore object command on the savefile using NULLID as your
destination library.

Note: You may have to create the NULLID library

ex.

RSTOBJ OBJ(*ALL) SAVLIB(NULLID) DEV(*SAVF) SAVF(MYLIB/DDOV6R1)

6. Grant privileges to the PUBLIC group so that all users have access to the
packages.

GRANT EXECUTE ON PACKAGE NULLID.DDOR510A TO PUBLIC


GRANT EXECUTE ON PACKAGE NULLID.DDOR510B TO PUBLIC
GRANT EXECUTE ON PACKAGE NULLID.DDOS510A TO PUBLIC
GRANT EXECUTE ON PACKAGE NULLID.DDOS510B TO PUBLIC
GRANT EXECUTE ON PACKAGE NULLID.DDOU510A TO PUBLIC
GRANT EXECUTE ON PACKAGE NULLID.DDOU510B TO PUBLIC
GRANT EXECUTE ON PACKAGE NULLID.DDOC510A TO PUBLIC
GRANT EXECUTE ON PACKAGE NULLID.DDOC510B TO PUBLIC
GRANT EXECUTE ON PACKAGE NULLID.DDON510A TO PUBLIC
GRANT EXECUTE ON PACKAGE NULLID.DDON510B TO PUBLIC

Das könnte Ihnen auch gefallen