You can create and deploy the example application that
is supplied and installed with the CICS® TS Feature Pack for Dynamic Scripting V2.0
to verify that the feature pack is installed correctly and can access CICS.
Before you begin
Before
you can verify that the installation is successful, the following
conditions must be satisfied:
- The CICS TS Feature Pack for Dynamic Scripting V2.0 z/OS® components are installed and
customized.
- The JVMPROFILE DFHPHP and server.xml file
for the Liberty JVM server DFH$PHP are configured, and JVMPROFILE
DFHPHP is renamed to DFHPHP.jvmprofile.
- CICS sample group DFH$PHP
is installed and the resources are enabled.
- 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.
Procedure
- Follow the instructions in Making the CICS TS Feature Pack for Dynamic Scripting V2.0 target platform available to set the 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 as specified in your Liberty JVM server profile.
Results
The screen that is shown in
Figure 1 is displayed in your browser.
The screen shows the message
"Your CICS Dynamic Scripting Example
(PHP) is now running in CICS Region region_name",
where
region_name is the APPLID of your CICS region.
Figure 1. Dynamic scripting example screen
If an error message is issued, or if the example application
fails to start, see Gathering diagnostic information to
help diagnose the cause of the problem.