Enabling spatial support for the first time

If you are a new customer and want to start using IBM® Spatial Support for Db2 for z/OS®, you need to enable your Db2 subsystem for spatial support.

Before you begin

Before you enable the Db2 subsystem for spatial support, your TSO user ID must have SYSADM authority on the Db2 subsystem.

Procedure

To enable a Db2 subsystem for spatial support:

  1. Customize and submit the DSNTIJCL job from the SDSNSAMP library.
    This job binds the Db2 ODBC application plan. The prolog for the DSNTIJCL job contains instructions for modifying the job.
  2. Customize and submit the DSN5SENB job from the SDSNSAMP library.
    This job creates the spatial catalog tables, catalog views, and stored procedures. In addition, this job binds all of the spatial packages, and it invokes the DSN5SCLP program, which uses the enable_spatial command to create the spatial user-defined functions and to populate the spatial catalog tables with initial values.

    Before you submit the DSN5SENB job, you also must customize the DSNAOINI initialization file in the SDSNSAMP library. The prolog for the DSN5SENB job contains instructions for modifying the job.

  3. Customize and submit the DSN5SBND job from the SDSNSAMP library.
    The expected return code for this job is 0 (zero).

Results

The expected return codes are 0 (zero) and 4 for both the DSNTIJCL job and the DSN5SENB job.

What to do next

Now, the Db2 subsystem is enabled for spatial support. You can submit the DSN5SCMD JCL in the SDSNSAMP library to verify that the Spatial functions are correctly enabled.