Change the CCSID  Chapter 5: Installing DirectConnect

Chapter 4: Getting Ready to Install

Create the Sybase collection on the AS/400 (DC for DB2 UDB)

The access service requires certain files on the AS/400. DirectConnect for DB2 UDB access service looks for these files in a collection called “SYBASE.” You must create this collection and name it “SYBASE” before installing the access service.

NoteThe owner of the SYBASE collection must have QSECOFR privileges.

The SYBASE collection contains a package for the DC DB2 UDB driver that is created when the drivers are installed. Once you create the packages, you need to grant permissions to PUBLIC for the end users to access the Sybase collection located on the target AS/400. This can be done with isql (which comes with the DirectConnect installation), or directly on the AS/400 machine.

StepsTo grant permissions from isql

  1. Issue the following command:

    GRANT EXECUTE ON PACKAGE SYBASE.DEF000x TO PUBLIC
    

    The DirectConnect service used to issue this command must be in sybase mode for SQL transformation (SQL transformation is an access service property with one of two settings, passthrough or sybase). To ensure this, enter the following command in the isql session before you issue the GRANT EXECUTE command:

    set sqltransformation sybase
    

Because the AS/400 allows you to change security levels and ownership of objects, you can use another user ID to create the SYBASE collection. For example, you can use one ID to create the SYBASE collection, then grant other users create and execute authorization for the collection and its objects.You can create the SYBASE collection in one of two ways:

StepsTo grant permissions directly on the AS/400

  1. Log on to the AS/400 at the main console, a 5250 terminal, or a 5250 terminal emulator, using the user ID that will be the owner of the SYBASE collection.

  2. To display the Sybase packages, on the command line, enter:

    WRKOBJOWN SYBASE
    
  3. On the Work with Object by Owner window, locate and select a package from the attribute column and in the corresponding OPT column, enter the following:

    2
    
  4. On the Edit Object Authority window, in the User column, locate *PUBLIC, and in the corresponding Object Authority column, enter:

    ALL
    
  5. Press F12 to return to the Work with Object by Owner window, and repeat steps 2 and 3 until all packages are completed. To exit, press F3 repeatedly, followed by 90.

Creating the SYBASE collection through the AS/400 SEU utility

The user ID for creating the SYBASE collection must have a valid CCSID for your language installation. For more information, see "Change the CCSID" section.

StepsTo create the SYBASE collection through the AS/400 SEU utility

  1. Log on to the AS/400 at the main console, a 5250 terminal, or a 5250 terminal emulator, using the user ID that is to be the owner of the SYBASE collection.

  2. Start the SEU program by entering the following command:

    STRSEU
    
  3. Press F4 to display the Work With Members Using SEU window.

  4. Provide the following information:

  5. Press Enter to list the members of the source file.

  6. Build the query that creates the collection by creating a source member for the query:

  7. Press Enter to display the Edit window.

  8. Create the query member by entering the following in the first line of the source file:

    CREATE COLLECTION SYBASE
    
  9. Press F3, and verify that the Change/Create Member field is set to Y, and the Member field is SYBASE. Press Enter to exit the editor.Now you can work with the query you created.

  10. Press F3 to exit and return to the Main menu.

StepsTo build the query that creates the SYBASE collection

  1. Enter the following on the command line:

    CRTQMQRY QMQRY(QGPL/SYBASE) SRCFILE(QGPL/QQMQRYSRC)
    
  2. Press Enter. The AS/400 utility creates the query.You might receive a warning message that the source length exceeds 79 characters. Disregard this message, as it does not affect the access service.

  3. To run the query that creates the SYBASE collection, enter the following on the command line:

    STRQMQRY QMQRY(QGPL/SYBASE)
    
  4. Press Enter. The SYBASE collection is created.

Building the collection might take a few minutes. During this time, you will receive messages indicating the status of the operation.

Creating the SYBASE collection through DB2 or DB2/AS400 Query Manager and SDK

The user ID for creating the SYBASE collection must have a valid CCSID for your language installation. For more information, see "Change the CCSID" section in the Installation Guide.

StepsTo create the SYBASE collection through SQL/400

  1. Log on to the AS/400 at the main console, a 5250 terminal, or a 5250 terminal emulator, using the ID that you want to own the collection (usually SYBASE).

  2. On the command line, enter:

    STRSQL
    
  3. On the SQL command line, enter:

    CREATE COLLECTION SYBASE
    

    The collection process requires a few minutes to complete. You can create other collections by using this same syntax and substituting the name of the collection for "SYBASE."

Authorizing users for the SYBASE collection

You must have the following minimum authorizations to access the AS/400 through the access service:

StepsTo confirm that authorizations are set properly

  1. Verify that the *SQLPKG objects in SYBASE are set to *PUBLIC, *USE, or higher authorization level.

  2. Verify that the journal objects are set to *PUBLIC, *CHANGE, or higher authorization level.





Copyright © 2005. Sybase Inc. All rights reserved. Chapter 5: Installing DirectConnect

View this book as PDF