Application Development Guide


Execution Requirements for REXX

REXX applications are not precompiled, compiled, or linked.

On OS/2, your application file must have a .CMD extension. After creation, you can run your application directly from the operating system command prompt.

On Windows 32-bit operating systems, your application file can have any name. After creation, you can run your application from the operating system command prompt by invoking the REXX interpreter as follows:

      REXX file_name

On AIX, your application file can have any extension. You can run your application using either of the following two methods:

  1. At the shell command prompt, type rexx name where name is the name of your REXX program.
  2. If the first line of your REXX program contains a "magic number" (#!) and identifies the directory where the REXX/6000 interpreter resides, you can run your REXX program by typing its name at the shell command prompt. For example, if the REXX/6000 interpreter file is in the /usr/bin directory, include the following as the very first line of your REXX program:
           #! /usr/bin/rexx 
    

    Then, make the program executable by typing the following command at the shell command prompt:

           chmod +x name 
    

    Run your REXX program by typing its file name at the shell command prompt.

Note:On AIX, you should set the LIBPATH environment variable to include the directory where the REXX SQL library, db2rexx is located. For example:
   export LIBPATH=/lib:/usr/lib:/usr/lpp/db2_07_01/lib

Bind Files for REXX

Five bind files are provided to support REXX applications. The names of these files are included in the DB2UBIND.LST file. Each bind file was precompiled using a different isolation level; therefore, there are five different packages stored in the database.

The five bind files are:

DB2ARXCS.BND
Supports the cursor stability isolation level

DB2ARXRR.BND
Supports the repeatable read isolation level

DB2ARXUR.BND
Supports the uncommitted read isolation level

DB2ARXRS.BND
Supports the read stability isolation level.

DB2ARXNC.BND
Supports the no commit isolation level. This isolation level is used when working with some host or AS/400 database servers. On other databases, it behaves like the uncommitted read isolation level.
Note:In some cases, it may be necessary to explicitly bind these files to the database.

When you use the SQLEXEC routine, the package created with cursor stability is used as a default. If you require one of the other isolation levels, you can change isolation levels with the SQLDBS CHANGE SQL ISOLATION LEVEL API, before connecting to the database. This will cause subsequent calls to the SQLEXEC routine to be associated with the specified isolation level.

OS/2 REXX applications cannot assume that the default isolation level is in effect unless they know that no other REXX programs in the session have changed the setting. Before connecting to a database, a REXX application should explicitly set the isolation level.


[ Top of Page | Previous Page | Next Page ]