CA1S: REST support in CICS using PHP for use with CICS TS for z/OS V3

Downloadable files


SupportPac CA1S permits PHP scripting language capabilities, based on IBM WebSphere sMash technology, to extend the range of CICS assets that can be exposed as REST services.

Download Description

PHP (a recursive acronym for "PHP: Hypertext Preprocessor") is a very popular scripting language used by many developers all over the world. It is included in IBM WebSphere sMash alongside Groovy. With this SupportPac IBM is offering the capability to use PHP scripts as part of a RESTful enablement of CICS applications. PHP has outstanding productivity characteristics and a simple yet powerful programming model and development paradigm. By offering PHP on CICS Transaction Server for z/OS (CICS TS) V3.2, this SupportPac provides another option for opening up even more of an enterprise's CICS applications to simple HTTP access from a diverse range of service requesters.

This SupportPac complements SupportPac CA8K: Delivering Atom feeds from CICS by using PHP scripting language capabilities, shared with WebSphere sMash, to extend the range of CICS assets that can be exposed as REST services. This provides the ability to deploy and execute PHP scripts as CICS services accessing existing CICS programs and a range of CICS resources. Atom Feeds and PHP provide ways to explore the use of RESTful and Web 2.0-style interfaces to enterprise application assets.

If you use CICS TS V4.1, then the CICS TS and WebSphere Application Server Feature Packs for Dynamic Scripting provide REST support. Note that the base code of CICS TS V4.1 provides support for Atom feeds.

The PHP technology provided by this SupportPac is a subset of the function provided by WebSphere sMash, which is itself a complete Web application platform for developing and running modern Web applications. The technology behind WebSphere sMash, including a PHP runtime, has been developed following a community-driven commercial development model, under the name "ProjectZero". This development program has now ceased. However, the WebSphere sMash Developer's Guide, developed as part of that program, is still available from IBM.

By exploiting the Java™ Virtual Machine (JVM) used in CICS TS V3.2, PHP script execution employs zAAP processors in System z. Using continuous mode JVMs in CICS allows the PHP implementation in this SupportPac to exploit fully the efficiency of the Just-In-Time (JIT) compiler to optimize script execution. An exclusive feature of the PHP implementation in this SupportPac is direct same-process interaction with Java classes and objects via a 'PHP-Java Bridge'. As well as the CICS runtime services, this SupportPac provides many standard extensions to the base engine which make PHP so powerful.

Facilities provided by this SupportPac allow RESTful services to be created easily that exploit existing CICS COMMAREA applications. As well as existing application components, this SupportPac allows PHP scripts to access DB2 tables via PHP Data Objects (PDO) using the CICS Java Database Connectivity (JDBC) driver.

Employing selected development and deployment paradigms from WebSphere sMash, this SupportPac provides easy-to-install PHP support into CICS TS V3.2, using PHP and dynamic scripting concepts to deploy those applications. Standard CICS support for HTTP transport and Pipeline configuration is used in conjunction with this SupportPac to provide flexibility to chose to deploy a business service using SOAP, Atom, or sMash-style REST interfaces.

The User Guide that accompanies this SupportPac (see link below) provides full information on the installation, configuration and exploitation of REST support in CICS using PHP.

Possible Uses
The SupportPac allows you to:

  • Write PHP scripts that are started in response to inbound HTTP requests.
  • Access DB2 tables via PHP Data Objects (PDO) using the CICS JDBC driver from PHP code.
  • Exploit existing CICS COMMAREA applications from PHP code.
  • Create sMash-style RESTful services.

Skill level required
Intermediate: Familiarity with CICS, either as a system administrator or as a system or application programmer, and some knowledge of the PHP programming language and concepts.

What's New in release V1.1
  • Removed dependency on IBM z/OS V1.9 to allow compatibility with IBM z/OS V1.8.
  • Performance enhancement to json_encode() and json_decode() that reduce IO operations during code-page conversions within those functions.
  • Fix to ensure line endings are encoded correctly in responses that include a content-type header starting with "application/" and a charset parameter suffix.
  • Several minor improvements and corrections to the documentation

Authors: CICS Development, Hursley
Category: 2
Released: 26Mar09
Current Version: 1.1


This SupportPac requires:

This SupportPac also requires installation of the following PTFs:
  • PTF UK35003, for APAR PK59577: Providing Support for Java 5
  • PTF UK34459, for APAR PK58721: Changes to Pipeline and Web support processing

In addition:
  • CICS Web Support must be available
  • CICS LOCALCCSID must be set to 037 or 1047
  • TCPIP must be open in the CICS region
  • ICSF must be started on the z/OS system

Installation Instructions

To download the SupportPac:
1. Click on the FTP link below and save the compressed file to your local machine.
2. Extract the saved file to a temporary directory on your local machine. This will create the necessary installation, documentation and license files
3. Follow the instructions in the included documentation to complete installation of this SupportPac on your host system.

Download package

Download RELEASE DATE LANGUAGE SIZE(Bytes) Download Options
ca1s User Guide 26/03/2009 US English 634657 FTP
ca1s 26/03/2009 US English 6659051 HTTP

Technical support

SupportPacs in this category are available at no charge to all licensed users of the CICS family products on the platforms specified in the SupportPac description. These SupportPacs are provided "AS-IS" (under the terms and conditions of the IBM International License Agreement for Non-Warranted Programs and of the associated License Information and other documentation). The terms and conditions of this license DO NOT provide for any entitlement to defect correction.

To determine if you want to use this SupportPac, read the accompanying license file.

User Forum
A user forum has been set up to allow users of this SupportPac to interact with other users and the CICS PHP development team. The user forum can be used as a repository of information to gain a better understanding of PHP in CICS, learn how to debug problems, make requests and give feedback:

CICS SupportPacs
To view the complete portfolio of CICS SupportPacs, go to the CICS SupportPacs Home Page:

Product Alias/Synonym

CICS/TS CICS TS CICS Transaction Server

Rate this page:

(0 users)Average rating

Document information

More support for:

CICS Transaction Server

Software version:


Operating system(s):


Reference #:


Modified date:


Translate my page

Machine Translation

Content navigation