Application Building Guide

REXX

You do not precompile or bind REXX programs.

To run DB2 REXX/SQL programs on AIX, you must set the LIBPATH environment variable to include sqllib/lib under the DB2 install directory.

Enter:

   export LIBPATH=$LIBPATH:/lib:/usr/lib:/usr/lpp/db2_07_01/sqllib/lib

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

  1. At the shell command prompt, enter 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 entering 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 entering the following command at the shell command prompt:

       chmod +x name
    

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

REXX sample programs are in the directory sqllib/samples/rexx. To run the sample REXX program updat.cmd, do one of the following:

For further information on REXX and DB2, refer to the chapter, "Programming in REXX", in the Application Development Guide.


[ Top of Page | Previous Page | Next Page ]