# Open Object Rexx™

## Release Notes

Version 3.1.2 RC1

Copyright © 2005, 2006, 2007 Rexx Language Association. All rights reserved.

March 31, 2007

## 1. About The 3.1.2 Release

Open Object Rexx Version 3.1.2 is based on the previous version of ooRexx™ (3.1.1). Version 3.1.2 has both enhancements and bug fixes.

> IMPORTANT: If you already have an earlier version of Object Rexx or Open Object Rexx installed on your system, you must remove it before starting with the installation of this package. Note that this may change in future releases.

### 1.1. New in this Release

This section describes the enhancements introduced since Open Object Rexx 3.0.0 for Unix/Linux. and 3.0.1 for Windows.

You should refer to the CHANGES document accompanying the release for a complete list of the changes and bug fixes.

#### 1.1.1. New Installation Path for Unix/Linux

The installation path for the Unix/Linux version of ooRexx has been changed from /usr/local to /opt/ooRexx. This will make ooRexx much more compliant with the Linux Standard Base.

#### 1.1.2. Additions to the REXXUTIL Function Package

There are some new functions included in the RexxUtil library. They begin with the prefix SysIs*.

#### 1.1.3. Getting Help Documentation

Each document in the ooRexx documentation set now contains a section on getting help for ooRexx. It is located in the preface of each document.

## 2. Windows Requirements, Installation and Configuration

### 2.1. Hardware Requirements

- 22 MB free disk space for the program

- 13.5 MB free disk space for online documentation

- IBM-compatible, Pentium or AMD processor, or higher

### 2.2. Software Requirements

- Windows 98

- Windows Me

- Windows NT(R) 4.0

- Windows 2000

- Windows 2003

- Windows XP

> Note: Currently, this version of ooRexx does not install correctly on Windows Vista. The development team is working on this problem and we hope to have a solution in the near future.

### 2.3. Installation, Update and Configuration Information

This new version of Open Object Rexx cannot coexist with a previous version of Open Object Rexx or IBM Object REXX in your installation. If you have previously installed Open Object Rexx, you must first uninstall the Open Object Rexx program. If there are two different versions of Open Object Rexx installed, this leads to unpredictable results. The installation program of Open Object Rexx starts and the Open Object Rexx Installation logo appears on your screen (this automatic startup may take a while). Follow the installation program instructions to complete the Open Object Rexx installation. Open Object Rexx can be installed as a common or as a personal program. To install Open Object Rexx as a common program, the current user must have administrator rights.

It is highly recommended that ooRexx be installed into Windows while logged on as a user with Administrator rights. Additional installation steps are performed when an Administrator installs ooRexx that cannot be performed when installed as a user without Administrator rights. They are:

1. The subdirectory that ooRexx is installed into is added to the System PATH environment variable.

2. The file extension REX is added to the System PATHEXT environment variable.

3. The rxapi Service installation page is shown allowing rxapi to be installed as a Windows service.

4. The environment variable REXX_HOME is set for all users.

It is important that if ooRexx is installed by a user with Administrative rights, that ooRexx is uninstalled by a user with Administrative rights, otherwise the installation steps described above will not be undone when ooRexx is uninstalled.

#### 2.3.1. Running the Installation Program on Windows

To install Open Object Rexx with the default settings, simply double-click on ooRexx310.exe from Windows Explorer.

The Windows installer has two options when installing. If you want to specify the options on installation, then open a command prompt or select "Start/Run" from the taskbar and type in ooRexx310.exe with the parameters described below.

/S : Silent mode

  This will install Open Object Rexx without any user intervention with default values for any user-selectable values.

/D : Default directory

  If you wish to install Open Object Rexx into a different directory than the default (C:\Program Files\ooRexx), then specify the directory after this switch. This must be the last parameter used in the command line and must not contain any quotes, even if the path contains spaces.

#### 2.3.2. Windows Uninstallation Information

Select "Start->Settings->Control Panel->Add Remove Programs" on the Windows Desktop. Select "Open Object Rexx for Windows" and then select "Remove".

### 2.4. Running Open Object Rexx as a Child Process of a Service on Windows

The memory manager of Open Object Rexx can share out some resources among all the Open Object Rexx processes to enable global functions, system exits, subcommand handlers, and global queues to take place. If you start Open Object Rexx from a service, two or more Open Object Rexx processes might run under different user accounts. Therefore it is required that the memory manager is not protected and can be accessed by every user. This means that Open Object Rexx global data is system global and unsecured.

If you want Open Object Rexx to be started from a service, Open Object Rexx must be installed as a common program or you must modify the system path manually to include the directory where Open Object Rexx has been installed.

If you are writing a service that calls RexxStart(), ensure that the SERVICE_INTERACTIVE_PROCESS flag is set for your service. To prevent access violations, use a NULL security descriptor and assign it to your service process.

### 2.5. Open Object Rexx and Other Rexx Interpreters

If you have other Rexx interpreters installed, you may have to set the PATH manually because Open Object Rexx and the other Rexx interpreters may both use the name "rexx" for invoking the interpreter. Interpreter error messages that begin with "Rexx: " indicate that another Rexx interpreter was called instead of Open Object Rexx. You can verify which Rexx interpreter is running either by the form of the error messages, by running `rexxtry.rex` and executing SAY VERSION, or by invoking `rexx /V`, which then should display information about the Rexx interpreter that is invoked. If no information is displayed, it is not Open Object Rexx. If you don't want the other Rexx interpreter to be invoked, you should remove it from the PATH, delete it, or rename `rexx.exe` in the ObjRexx directory to `orx.exe` and use `orx` to invoke the interpreter.

### 2.6. Exploring Open Object Rexx

Once you have installed the Open Object Rexx files you can run Object Rexx scripts by issuing the command REXX followed by your Object Rexx script at the command prompt. To interactively try Object Rexx statements, enter `rexx rexxtry.rex`on the command line. Enter `exit` to end the program.

To help you explore programming in Open Object Rexx, the following sample programs are provided :

`ccreply.rex`

  concurrent program using REPLY

`complex.rex`

  complex number class

`deskicon.rex`

  AddDesktopIcon method of the WindowsProgramManager class

`desktop.rex`

  uses the WindowsProgramManager class

`drives.rex`

  demonstrates the usage of Sys functions

`eventlog.rex`

  uses the WindowsEventLog class

`factor.rex`

  factorial program

`greply.rex`

  concurrent program using WAIT and NOWAIT

`guess.rex`

  a guessing game

`makestring.rex`

  demonstrated the usage of the makestring method

`ktguard.rex`

  concurrent program using START and GUARD

`month.rex`

  displays a calendar for the month of January

`philfork.rex`

  program that demonstrates Open Object Rexx concurrency

`pipe.rex`

  a pipeline implementation

`qdate.rex`

  date query program

`qtime.rex`

  time query program

`registry.rex`

  uses the WindowsRegistry class

`rexxtry.rex`

  interactively try out Rexx statements

`semcls.rex`

  semaphore class

`stack.rex`

  program that uses a stack class

`usecomp.rex`

  program that uses the complex number class (see note below)

`usepipe.rex`

  program that uses the pipeline implementation (see note below)

`usewmgr.rex`

  program that uses the WindowsManager class

> Note: To run these programs, you must either add the `samples` directory to the PATH or execute them directly from the `samples` directory.

The directory `samples\ole\` contains samples for the Open Object Rexx OLE/ActiveX Interface. Open the sample programs; They contain comments. The directory `samples\wsh\` contains samples for Windows Scripting Host.

Open Object Rexx also installs several samples that demonstrate the use of OODialog. You can explore these samples by launching the "OODialog Samples" icon in the Object Rexx for Windows\Samples group.

To help you with programming external function libraries, the WPIPE samples are provided in the `samples\api\wpipe` directory. See the README.TXT in this directory.

## 3. Unix/Linux Requirements, Installation and Configuration

### 3.1. Hardware Requirements

- 12 MB free disk space for the program (20 MB for AIX)

- 13.5 MB free disk space for online documentation

- IBM-compatible, Pentium or AMD processor, or higher for an x86 platform

- Power 4 processor or higher for a PPC platform

- Sparc processor for a SUN Solaris (Sparc) platform

### 3.2. Software Requirements

- Linux ELF system (i386) and your kernel must support System V IPC. Open Object Rexx must run with Linux kernel version 2.4.1 or higher.

- SUN Sparc system running Solaris V2.8 or higher.

### 3.3. Installation, Update and Configuration Information

This new version of Open Object Rexx cannot coexist with a previous version of Open Object Rexx or IBM Object REXX in your installation. If you have previously installed Object Rexx, you must first deinstall this Object Rexx program. If there are two different versions of Object Rexx installed, this leads to unpredictable results. The installation program of Object Rexx starts and the Object Rexx Installation logo appears on your screen (this automatic startup may take a while). Follow the installation program instructions to complete the Object Rexx installation. Object Rexx can be installed as a common or as a personal program. To install Object Rexx as a common program, the current user must have administrator rights.

#### 3.3.1. Installation/Removal of the RPM Package

> Note: The installation of Open Object Rexx requires that all steps be run with root authority.

To install the 'rpm' package, use your rpm-package-manager. Select the 'ooRexx-3.1.n.0-n.i386.rpm' package for the installation. Refer to your package manager for further information. The package manager adds orexx to your local rpm-database. The command with the command line rpm-package-manager is:

       rpm -i ooRexx-3.1.n-n.i386.rpm

Open Object Rexx is installed in the directory `/opt/ooRexx`. Links are created in `/usr/lib` and `/usr/bin` for the ooRexx shared libraries and executables respectively. An additional link is created in `/usr/include` for the `rexx.h`header file.

The command `rpm` can also be used to remove the package from the database if it is entered at the command line:

       rpm -e ooRexx-3.1.n-n

#### 3.3.2. Installation of the 'tgz' Package

> Note: The installation of Open Object Rexx requires that all steps be run with root authority.

If you have the package maintenance tool 'pkgtool' on your system, you can use it to install or deinstall Open Object Rexx via a graphical tool. Start pkgtool as 'root' and install the 'ooRexx-3.1.n-n.i386.tgz' package. All files will be copied to the directory '/opt/ooRexx/'.

If 'pkgtool' is not available, you can install Open Object Rexx by copying the ooRexx-3.1.n-n.i386.tgz file to the root directory ( / ) and decompress the package with the following command:

      tar -zxvf ooRexx-3.1.n-n.i386.tgz

You must manually add the following links:

    cd /opt/ooRexx/bin
    ln -sf ./rexx /usr/bin/rexx
    ln -sf ./rexxc /usr/bin/rexxc
    ln -sf ./rxqueue /usr/bin/rxqueue
    ln -sf ./rxsubcom /usr/bin/rxsubcom
    ln -sf ./rxdelipc /usr/bin/rxdelipc
    ln -sf ./rxmigrate /usr/bin/rxmigrate
    ln -sf ./rexx.img /usr/bin/rexx.img
    ln -sf ./rexx.cat /usr/bin/rexx.cat
    ln -sf ./rxregexp.cls /usr/bin/rxregexp.cls
    ln -sf ./rxftp.cls /usr/bin/rxftp.cls
    cd /opt/ooRexx/%{_lib}
    ln -sf ./librexx.so.%{version} %{_libdir}/librexx.so.3
    ln -sf ./librexx.so.%{version} %{_libdir}/librexx.so
    ln -sf ./librexxapi.so.%{version} %{_libdir}/librexxapi.so.3
    ln -sf ./librexxapi.so.%{version} %{_libdir}/librexxapi.so
    ln -sf ./librxsock.so.%{version} %{_libdir}/librxsock.so.3
    ln -sf ./librxsock.so.%{version} %{_libdir}/librxsock.so
    ln -sf ./librxmath.so.%{version} %{_libdir}/librxmath.so.3
    ln -sf ./librxmath.so.%{version} %{_libdir}/librxmath.so
    ln -sf ./librxregexp.so.%{version} %{_libdir}/librxregexp.so.3
    ln -sf ./librxregexp.so.%{version} %{_libdir}/librxregexp.so
    ln -sf ./librexxutil.so.%{version} %{_libdir}/librexxutil.so.3
    ln -sf ./librexxutil.so.%{version} %{_libdir}/librexxutil.so
    cd /opt/ooRexx/man
    ln -sf ./rexx.1 /usr/share/man/man1/rexx.1
    ln -sf ./rexxc.1 /usr/share/man/man1/rexxc.1
    ln -sf ./rxsubcom.1 /usr/share/man/man1/rxsubcom.1
    ln -sf ./rxqueue.1 /usr/share/man/man1/rxqueue.1
    ln -sf ./rxmigrate.1 /usr/share/man/man1/rxmigrate.1
    cd /opt/ooRexx/include
    ln -sf ./rexx.h /usr/include/rexx.h
    cd /opt/ooRexx/samples
    ln -sf ./rexxtry.rex /usr/bin/rexxtry.rex
    ldconfig

#### 3.3.3. Installation/Removal of the PKG Package

> Note: The installation of Open Object Rexx requires that all steps be run with root authority.

To install the 'pkg' package, use your package-manager. Select the 'ooRexx-3.1.n-sparc-sun-solaris2.8.pkg' package for the installation. Refer to your package manager for further information. The package manager adds orexx to your local pkg-database. The command with the command line package-manager is:

       pkgadd -d ooRexx-3.1.0-n-sparc-sun-solaris2.8.pkg

Open Object Rexx is installed in the directory `/opt/ooRexx`.

The command `pkgrm` can also be used to remove the package from the database if it is entered at the command line:

       pkgrm ooRexx

### 3.4. Configuration

There is nothing to configure for a Unix/Linux installation.

### 3.5. Open Object Rexx and Other Rexx Interpreters

If you have other Rexx interpreters installed, you may have to set the PATH manually because Open Object Rexx and the other Rexx interpreters may both use the name "rexx" for invoking the interpreter. Interpreter error messages that begin with "Rexx: " indicate that another Rexx interpreter was called instead of Open Object Rexx. You can verify which Rexx interpreter is running either by the form of the error messages, by running `rexxtry` and executing SAY VERSION, or by invoking `rexx -v`, which then should display information about the Rexx interpreter that is invoked. If no information is displayed, it is not Open Object Rexx. If you don't want the other Rexx interpreter to be invoked, you should remove it from the PATH, delete it, or rename the "rexx" binary in the `/usr/bin` directory to "orx" and use `orx` to invoke the interpreter.

### 3.6. Exploring Open Object Rexx for Unix/Linux

Once you have installed the Open Object Rexx files you can run Object Rexx scripts by issuing the command `rexx` followed by your Object Rexx script at the command prompt. To interactively try Object Rexx statements, open a command window and type `rexx rexxtry`. Enter `exit` to end the program.

To help you explore programming in Open Object Rexx, the following sample programs are provided in the `/opt/ooRexx/share/ooRexx`:

`ccreply.rex`

  concurrent program using REPLY

`complex.rex`

  complex number class

`factor.rex`

  factorial program

`greply.rex`

  concurrent program using WAIT and NOWAIT

`guess.rex`

  a guessing game

`ktguard.rex`

  concurrent program using START and GUARD

`makestring.rex`

  demonstrated the usage of the makestring method

`month.rex`

  displays a calendar for the month of January

`pipe.rex`

  a pipeline implementation

`qdate.rex`

  date query program

`qtime.rex`

  time query program

`semcls.rex`

  semaphore class

`rexxcps.rex`

  measure Rexx clauses per second

`rexxtry.rex`

  interactively try out Rexx statements

`semcls.rex`

  implements a semaphore class on ooRexx

`stack.rex`

  program that uses a stack class

`usecomp.rex`

  program that uses the complex number class (see note below)

`usepipe.rex`

  program that uses the pipeline implementation

> Note: To run these programs, you must either add the `/opt/ooRexx/share/ooRexx` directory. to the PATH or execute them directly from the `/opt/ooRexx/share/ooRexx` directory.

To help you with programming external function libraries, the WPIPE samples are provided in the `/opt/ooRexx/share/ooRexx/api/wpipe` directory. See the README in this directory.

## 4. Known Limitations, Problems and Workarounds

- The global directory .environment is process local.

- When you start Open Object Rexx, a file called RXAPI (RXAPI.EXE on Windows) is started. The process executing this file remains open after your Open Object Rexx program terminates if:

  - an external function is registered (including REXXUTIL),

  - a queue contains data entries,

  - a named queue exists,

  - a system exit is installed,

  - a subcommand handler is installed, or

  - a macro space is loaded.

  If you need RXAPI to be closed, remove any global data (see list above) before leaving your program. Don't forget to call SysDropFuncs().

- Windows Scripting Host

  The support for the Windows Scripting Host has the following limitations:

  - Do not rely on a global availability of objects provided by the host.

  - Running ActiveX objects, like the Open Object Rexx scripting engine, may pose a security threat. If you do not want the engine to be enabled on your machine, do not select the ActiveX component at installation time ("ApplicationFiles\WSHFiles"). You can manually unregister the scripting DLL from the system by stating "regsvr32 /u orxscrpt.dll" on the command line (re-registration can be done with "regsvr32 orxscrpt.dll").

  - You will find several sample scripts that describe how to use Open Object Rexx with the Windows Scripting Host (WSH) in the directory SAMPLES\WSH\.

- Under Unix/Linux only piped "|" input and redirected output (">") can be evaluated by Open Object Rexx. Redirected input ("<") can not be evaluated.

- Open Object Rexx on Unix/Linux uses a shared memory for function registration and data exchange between different Rexx processes. If a running Rexx process must be interrupted (by using the command "kill -9 pid"), the shared memory might be left in disorder. In this case, the interpreter tries to restore the shared memory. If this fails, use the binary "rxdelipc" to delete the shared memory.

## 5. Documentation

All documentation is now contained in PDF files and zipped HTML package files and is available online at http://www.oorexx.org/docs.html.

The following documents are available:

rexxref.pdf

  This is the Open Object Rexx: Reference.

rexxpg.pdf

  This is the Open Object Rexx: Programming Guide.

oodialog.pdf

  This is the Open Object Rexx: Windows OODialog Reference.

rxsock.pdf

  This is the Open Object Rexx: TCP/IP Socket Library Functions Reference.

rxftp.pdf

  This is the Open Object Rexx: FTP Class Library Reference.

rxmath.pdf

  This is the Open Object Rexx: Mathematical Functions Reference.

readme.pdf

  This document is in PDF and HTML format.

## 6. Getting Help

The Open Object Rexx Project has a number of methods to obtain help for ooRexx. These methods, in no particular order of preference, are listed below.

### 6.1. The Rexx Language Association Mailing List

The Rexx Language Association maintains a mailing list for its members. This mailing list is only available to RexxLA members thus you will need to join RexxLA in order to get on the list. The dues for RexxLA membership are small and are charged on a yearly basis. For details on joining RexxLA please refer to the RexxLA Home Page or the RexxLA Membership Application page.

### 6.2. The Open Object Rexx SourceForge Site

The Open Object Rexx Project utilizes SourceForge to house the ooRexx Project source repositories, mailing lists and other project features. Here is a list of some of the most useful facilities.

The ooRexx Forums

  The ooRexx project maintains a set of forums that anyone my contribute to or monitor. They are located on the ooRexx Forums page. There are currently three forums available: Help, Developers and Open Discussion. In addition, you can monitor the forums via email.

The Developer Mailing List

  You can subscribe to the oorexx-devel mailing list at ooRexx Mailing List Subscriptions page. This list is for discussing ooRexx project development activities. It also supports a historical archive of past messages.

The Users Mailing List

  You can subscribe to the oorexx-users mailing list at ooRexx Mailing List Subscriptions page. This list is for discussing using ooRexx. It also supports a historical archive of past messages.

The Announcements Mailing List

  You can subscribe to the oorexx-announce mailing list at ooRexx Mailing List Subscriptions page. This list is only used to announce significant ooRexx project events.

The Bug Mailing List

  You can subscribe to the oorexx-bugs mailing list at ooRexx Mailing List Subscriptions page. This list is only used for monitoring changes to the ooRexx bug tracking system.

Support Requests

  You can create a support request at ooRexx Support Request page. Please be sure to log in to Sourceforge before creating the request so that it will record your e-mail address. This will allow SourceForge (and the ooRexx developers) a way to contact you when updates are made to your request. Otherwise you will need to manually check back on this page to track any updates to the request.

  Also, please try to provide as much information in the support request as possible so that the developers can determine the problem as quickly as possible.

Bug Reports

  You can create a bug report at ooRexx Bug Report page. Please be sure to log in to Sourceforge before creating the report so that it will record your e-mail address. This will allow SourceForge (and the ooRexx developers) a way to contact you when updates are made to your report. Otherwise you will need to manually check back on this page to track any updates to the report.

  Also, please try to provide as much information in the bug report as possible so that the developers can determine the problem as quickly as possible.

Patch Reports

  If you create an enhancement patch for ooRexx please post the patch using the ooRexx Patch Report page. Please be sure to log in to Sourceforge before creating the report so that it will record your e-mail address. This will allow SourceForge (and the ooRexx developers) a way to contact you when updates are made to your report. Otherwise you will need to manually check back on this page to track any updates to the report.

  Also, please try to provide as much information in the patch report as possible so that the developers can evaluate the enhancement as quickly as possible.

  Please do not post bug patches here, instead you should open a bug report and attach the patch to it.

### 6.3. comp.lang.rexx Newsgroup

The comp.lang.rexx newsgroup is a good place to obtain help from many individuals within the Rexx community. You can obtain help on Open Object Rexx or on any number of other Rexx interpreters and tools.

# A. Notices

Any reference to a non-open source product, program, or service is not intended to state or imply that only non-open source product, program, or service may be used. Any functionally equivalent product, program, or service that does not infringe any Rexx Language Association (RexxLA) intellectual property right may be used instead. However, it is the user's responsibility to evaluate and verify the operation of any non-open source product, program, or service.

Any performance data contained herein was determined in a controlled environment. Therefore, the results obtained in other operating environments may vary significantly. Some measurements may have been made on development-level systems and there is no guarantee that these measurements will be the same on generally available systems. Furthermore, some measurement may have been estimated through extrapolation. Actual results may vary. Users of this document should verify the applicable data for their specific environment.

Information concerning non-open source products was obtained from the suppliers of those products, their published announcements or other publicly available sources. RexxLA has not tested those products and cannot confirm the accuracy of performance, compatibility or any other claims related to non-RexxLA packages. Questions on the capabilities of non-RexxLA packages should be addressed to the suppliers of those products.

All statements regarding RexxLA's future direction or intent are subject to change or withdrawal without notice, and represent goals and objectives only.

This information contains examples of data and reports used in daily business operations. To illustrate them as completely as possible, the examples include the names of individuals, companies, brands, and products. All of these names are fictitious and any similarity to the names and addresses used by an actual business enterprise is entirely coincidental.

## A.1. Trademarks

Open Object Rexx™ and ooRexx™ are trademarks of the Rexx Language Association.

The following terms are trademarks of the IBM Corporation in the United States, other countries, or both:

1-2-3
AIX
IBM
Lotus
OS/2
S/390
VisualAge

AMD is a trademark of Advance Micro Devices, Inc.

Intel, Intel Inside (logos), MMX and Pentium are trademarks of Intel Corporation in the United States, other countries, or both.

Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the Unites States, other countries, or both.

Linux is a trademark of Linus Torvalds in the United States, other countries, or both.

Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft Corporation in the United States, other countries, or both.

UNIX is a registered trademark of The Open Group in the United States and other countries.

Other company, product, or service names may be trademarks or service marks of others.

## A.2. Source Code For This Document

The source code for this document is available under the terms of the Common Public License v1.0 which accompanies this distribution and is available in the appendix Common Public License Version 1.0. The source code itself is available at `http://sourceforge.net/project/showfiles.php?group_id=119701`.

The source code for this document is maintained in DocBook SGML/XML format.

# B. Common Public License Version 1.0

THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.

## B.1. Definitions

"Contribution" means:

1. in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and

2. in the case of each subsequent Contributor:

   1. changes to the Program, and

   2. additions to the Program;

where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.

"Contributor" means any person or entity that distributes the Program.

"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.

"Program" means the Contributions distributed in accordance with this Agreement.

"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.

## B.2. Grant of Rights

1. Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.

2. Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.

3. Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.

4. Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.

## B.3. Requirements

A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:

1. it complies with the terms and conditions of this Agreement; and

2. its license agreement:

   1. effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;

   2. effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;

   3. states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and

   4. states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.

When the Program is made available in source code form:

1. it must be made available under this Agreement; and

2. a copy of this Agreement must be included with each copy of the Program.

Contributors may not remove or alter any copyright notices contained within the Program.

Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.

## B.4. Commercial Distribution

Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.

For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.

## B.5. No Warranty

EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.

## B.6. Disclaimer of Liability

EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

## B.7. General

If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.

If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed. In addition, if Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.

All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.

Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. IBM is the initial Agreement Steward. IBM may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.

This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.