CA1S: REST support in CICS using PHP for use with CICS TS for z/OS V3
Downloadable files
Abstract
This SupportPac 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.
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 (see www.projectzero.org).
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 users 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
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: http://www.ibm.com/developerworks/forums/forum.jspa?forumID=1537
IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.
Rate this page
Please take a moment to complete this form to help us better serve you.