IBM Books

Administration and Programming Guide for OS/400


Copying the Net.Data Program Object to Your CGI-BIN Library

Before using Net.Data, you must copy the Net.Data program object to the CGI-BIN library and provide access rights to the object.

To copy the Net.Data program object:

  1. Using the Create Duplicate Object (CRTDUPOBJ) command, copy the Net.Data program object, DB2WWW, from the QTCP library to a CGI-BIN library.

    OS/400 V4R3 users: Use the program object in library QHTTPSVR; the program object in the QTCP library routes Net.Data requests to the QHTTPSVR library.

  2. Change the DB2WWW program object in the CGI-BIN directory so that the user profile that CGI programs run under has access to the program object.

    By default, the DB2WWW program object authority for *PUBLIC users is set to *EXCLUDE. To provide access to the program object, change the program object's authority for *PUBLIC users to *USE, or specifically give the user profile access to the DB2WWW program object.

You can copy the Net.Data program object to multiple libraries for different applications. This allows you to have more than one version of the Net.Data initialization file or multiple protection schemes. See Customizing the Net.Data Initialization File for more information about the Net.Data initialization file; see Using Authentication for information on authentication.

To copy the Net.Data program object to multiple libraries:

  1. Copy the Net.Data program object, DB2WWW, to a library using the steps listed above.
  2. Associate the Net.Data program object with a CL program in each library.
    1. Create a CL program that calls the Net.Data program object located in the library specified in step 1.
    2. Copy the CL program to each library.

    In effect, the CL program you created becomes the Net.Data program object. If you do not associate the program object with a CL program, and copy the Net.Data program object DB2WWW to the different libraries, you get a -901 SQL code when using the SQL language environment.

    In the following sections, the CL program you created should be treated as the Net.Data program object, if you chose to create the CL program to call Net.Data.


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