The CICS® TS Feature Pack for Dynamic Scripting V2.0
provides an example application that you can deploy to verify that
the installation is successful, and help you understand how you can
start to develop and deploy PHP applications.
Before you begin
Before you can
deploy the example application, the following conditions must be satisfied:
- The CICS TS Feature Pack for Dynamic Scripting V2.0 z/OS® component is fully installed
and configured.
- You understand how to create and deploy bundles in CICS.
- The CICS Explorer® SDK is
started and the following connections are established:
- A CICS Management Interface
connection to the CICSPlex® in
which your target CICS region
is defined.
- A z/OS® FTP connection to the appropriate z/OS system, with sufficient access authority.
About this task
The
CICS TS Feature Pack for Dynamic Scripting V2.0
consists of two components: The z/OS component,
which is installed in your host system by using SMP/E, and the
CICS Explorer SDK which
includes the PHP target platform definition and the PHP example wizard.
The feature pack provides an example application that you can deploy
to verify that the installation is successful, and help you understand
how you can start to develop and deploy PHP applications. The example
application is deployed by using the
CICS Explorer SDK.
The z/OS component must be
fully installed and configured before you deploy the sample application.
Procedure
- Follow the instructions in Setting up the CICS TS Feature Pack for Dynamic Scripting V2.0 target environment to
set the "CICS TS V5.1 Runtime
with PHP" as your target platform in the CICS Explorer SDK
- In the CICS Explorer SDK,
click .
- In the "Select a wizard" window, expand CICS
Examples and PHP.
- Select CICS Dynamic Scripting Example(PHP) and
click Next. A second window
is displayed showing the projects that are created.
- Click Finish. Three
projects are created:
- An OSGi bundle with Web 3.0 support, named com.ibm.cics.server.examples.php.web.
This bundle contains the following files to handle the PHP requests:
- A sample Activator is provided with CICSPHPInitialiser.getInstance().activate(context)
declared in start() method, so that this bundle can be registered
into the PHP engine.
- A MANIFEST.MF configured to add the dependency
on Servlet 3.0 jar, JCICS jar and PHP jar.
- A web.xml configured to use PHPServlet to
handle PHP requests.
- The default php.ini. You can update it according
to your requirements.
- The sample index.php and image, which allow
the JCICS API to echo the region APPLID information to HTML.
- An OSGi Application project, named com.ibm.cics.server.examples.php.app,
which contains the OSGi bundle with Web 3.0 support named com.ibm.cics.server.examples.php.web.
This project can be exported as an eba file to deploy it.
- A CICS Bundle Project,
named com.ibm.cics.server.examples.php.bundle,
which contains an EBABUNDLE resource, which references com.ibm.cics.server.examples.php.app
project. This project is deployed into the sample Liberty
JVM server DFH$PHP.
You can view the bundles in the Package Explorer pane.
- Right-click the CICS Bundle Project named com.ibm.cics.server.examples.php.bundle and
click Export Bundle project to z/OS UNIX File System to export it to
zFS.
- Define and install a BUNDLE resource that
references the CICS bundle
project that is exported in step 6.
For details, see the CICS Explorer SDK help
topic Deploying OSGi bundles in a JVM server.
- Go to the URL http://hostname:port/com.ibm.cics.server.examples.php.web,
where hostname and port are
the host name and port of your CICS region.
Results
A screen is displayed in your browser, which contains the
text "Your CICS Dynamic Scripting
Example (PHP) is now running in CICS Region
APPLID", where APPLID is the APPLID of your CICS region. For more information, see Deploying OSGi bundles in a JVM server.