Enterprise IT Consultant Views on Technologies and Trends

Apr 28 2011   2:25AM GMT

Dynamic Scripting in CICS – brings best of both worlds

Sasirekha R Profile: Sasirekha R

Dynamic Scripting in CICS – brings best of both worlds

The CICS Dynamic Scripting Feature Pack (optional product) seems to bring the best of both worlds – benefits of quickly developing scripted, Web 2.0 applications with simple and secured access to CICS application and data resources. The Dynamic Scripting Feature Pack basically embeds and integrates technology from WebSphere sMash into CICS TS run time and includes a PHP 5.2 runtime along with Groovy language support. Access to CICS resources is achieved using the JCICS APIs.

Dynamic Scripting Feature Packs can be used to:

  • Rapidly develop, evolve, and deploy rich web applications, using dynamic scripting languages.
  • Expose RESTful web services and widgets for use in mashups and consoles.
  • Compose composite services, widgets, and applications that combine Web 2.0- style public and enterprise data feeds.

CICS dynamic scripting is part of project Zero (ref http://www-01.ibm.com/software/htp/cics/scripting/).  The idea of Project Zero is to provide a powerful development and runtime environment for dynamic web applications at the same time having the overall experience of being radically simple.

From a Project Zero developer’s perspective, the application is the server. Each dynamic scripting application is a standard (well-known) directory structure containing content within that structure. All you have to do is create an application, add application code, then start the application. The capabilities such as listening on a specified port and responding to HTTP, interacting with a database, using email, and so on are added to the application by adding dependencies.

In CICS Dynamic Scripting, all applications depend on zero.cics.core module. The zero.cics.core module provides much of the base functionality for a CICS-based Zero Application. The desired characteristics of the TCPIPSERVICE, URIMAP, PIPELINE, and JVMSERVER resources, can be specified in the zero.config and the zerocics.config files. If the application depends on additional features or capabilities that are related to HTTP, database interactions, Dojo support, email, and more, the dependencies are specified in the application’s ivy.config file in the application’s config directory.

With CICS Dynamic Scripting, developers can now use Web 2.0 technologies, such as Asynchronous JavaScript and XML (AJAX), Representational State Transfer (REST), Atom, JavaScript Object Notation (JSON), and Really Simple Syndication (RSS) to unleash and reuse enterprise content. The built-in Zero Resource Model (ZRM) provides a simplified way to create RESTful resource handlers with a data store that can be mapped to DB2 and Derby with improved resilience, security, and performance. Good samples are available at Refer to http://www.projectzero.org/wiki/Development/CicsSamples.

For persons who are new to CICS , to effectively write and implement a Project Zero application using the CICS Dynamic Scripting Feature Pack points to be noted are:

  • Most CICS options and services that are traditionally accessed using EXEC CICS API are available to Java programs through JCICS. For example, the programs can be accessed using link(), xctl(), SetNextTransaction(), setNextCOMMAREA() and setNextChannel(). For complete list of JCICS Commands, refer to http://publib.boulder.ibm.com/infocenter/cicsts/v4r1/index.jsp?topic=/com.ibm.cics.ts.java.doc/topics/dfhpjla.html.
  • The interface to the Project Zero technology, both in WebSphere sMash and in CICS Dynamic Scripting, is through a command-line interface (CLI). The CICS-provided CLI communicates to an associated CICS region using EXCI. Each ZERO command issued from the CLI, and each dynamic scripting application runs in its own CICS-based JVMServer resource.
  • Data passed to or from CICS is in byte arrays whereas a Java program wants access to the data in an object-oriented fashion using getters and setters.
  • When interacting with a CICS resource such as a VSAM file, Rational Application Developer can be very useful as it provides the ability to analyze a COBOL copybook and generate a corresponding Java object containing getters and setters for each field in the COBOL-like data structure.
  • JZOS toolkit (i.e., additional Java support classes) included with the z/OS distribution of Java can be used to generate data objects to interface with CICS resources.

To reiterate, CICS Dynamic Scripting can be used to:

  • Create reports, dashboards and widgets
  • Expose CICS assets in mash-ups
  • Quickly front end existing applications
  • Create productivity applications
  • Develop without a dedicated budget
  • Quickly try out new business ideas
  • Port existing unmanaged PHP into CICS
  • Introduce new IT staff to CICS via PHP.

Speed, Simplicity and Agility are the keywords in dynamic scripting. It is important to note that while traditional CICS applications are expected to handle large number of concurrent users and high volume with rigorous availability requirements, the dynamic scripting applications (that is developed in days or weeks with low cost – by anybody with basic scripting skills) are expected to be tactical with fewer concurrent users, with low volumes and fit for purpose availability requirements.

 Comment on this Post

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

Share this item with your network: