After you install the CICS® TS Feature Pack for Dynamic Scripting V2.0
on your z/OS® system,
you must configure it to complete the setup.
Before you begin
You must understand how to create and configure a Liberty
JVM server that is running in CICS.
For more information, see Getting started with Java web applications.
You must have the permissions to create and install CICS resources in the region.
About this task
Different configuration steps are required, depending on
the value you specify for -Dcom.ibm.cics.jvmserver.wlp.autoconfigure.
If you specify -Dcom.ibm.cics.jvmserver.wlp.autoconfigure=true
,
the server.xml file is generated automatically
when you install and start the liberty JVM server, and some parameters
in server.xml are automatically updated. If you
specify -Dcom.ibm.cics.jvmserver.wlp.autoconfigure=false
,
the server.xml file is not generated automatically,
and you must create it. For more information, see Configuring a Liberty JVM server for web applications.
Procedure
- Copy sample JVMPROFILE DFHPHP from @phpinst@/JVMProfiles to
the directory named on the SIT option JVMPROFILEDIR,
where @phpinst@ is the location of the feature
pack. Rename the copied DFHPHP JVMPROFILE to DFHPHP.jvmprofile.
- In the DFHPHP.jvmprofile JVMPROFILE
that you copied and renamed in step 1, specify a value for -Dcom.ibm.cics.jvmserver.wlp.autoconfigure according
to your requirements. For more information, see JVM system properties.
- In the DFHPHP.jvmprofile JVMPROFILE
that you copied and renamed in step 1, specify a value for -Djava.util.Arrays.useLegacyMergeSort according
to your requirements. Because of a change in the sort algorithm that
is used by java.util.Arrays.sort in Java™ 7,
to make some PHP functions such as
sort()
behave
in a manner consistent with PHP from php.net, specify -Djava.util.Arrays.useLegacyMergeSort=true
.
- In the DFHPHP.jvmprofile JVMPROFILE
that you copied and renamed in step 1, specify a value for JAVA_HOME according
to your requirements. Substitute the location of your Java installation
for the string
///&JAVA_HOME///
.
- Check the JVMPROFILE and ensure that it
contains a LIBPATH_SUFFIX statement for php extensions.
For example:
LIBPATH_SUFFIX=@phpinst@/lib
Substitute
@phpinst@ for
the location of the feature pack.
- Create or generate, and then customize, a server.xml file,
and specify the necessary parameters:
If you
specify
-Dcom.ibm.cics.jvmserver.wlp.autoconfigure=true
in
step 2, the server.xml file
is generated automatically, and you must complete the following steps:
- Specify values for -Dcom.ibm.cics.jvmserver.wlp.server.host,
and -Dcom.ibm.cics.jvmserver.wlp.server.http.port or
-Dcom.ibm.cics.jvmserver.wlp.server.https.port according
to your own environment.
- Install the liberty JVM server to generate the server.xml file.
The JVM server requires the configuration files to be in the WLP_USER_DIR/servers/server_name directory
in the working directory, where WLP_USER_DIR is
the value of the WLP_USER_DIR option and server_name is
the value of the -Dcom.ibm.cics.jvmserver.wlp.server.name property.
If you want to install the sample application, you must install the
sample group DFH$PHP.
If you specify -Dcom.ibm.cics.jvmserver.wlp.autoconfigure=false
,
in step 2, the server.xml is
not generated automatically, and you must complete the following steps
instead:
- Create a server.xml file. For more
information about creating this file, see Configuring a Liberty JVM server for web applications.
Ensure that
the features that are required by CICS to
run PHP applications are defined in the servers.xml file.
These features are cicsts:core-1.0, jsp-2.2, and blueprint-1.0.
- Specify the HTTP endpoint attribute host name and port
numbers that you require.
For example:
<httpEndpoint host="winmvs2c.example.com" httpPort="28216" httpsPort="28217"
id="defaultHttpEndpoint"/>
- Specify other parameters according to your requirements.
For more information, see The Liberty profile server.xml file
for a JVM server.
- Update the server.xml file in the CICS Liberty profile of JVM server
DFH$PHP to add the com.ibm.cics.php OSGi bundle
to a shared bundle repository.
For example:
<bundleRepository id="php">
<fileset dir="@phpinst@/repository" includes="com.ibm.cics.php_1.0.0.jar"/>
</bundleRepository>
Where
@phpinst@ is
the location of the feature pack.
Note: JVMSERVER
DFH$PHP and JVMPROFILE DFHPHP are the samples that are provided with
the feature pack. If you are using your own JVMSERVER and JVMPROFILE,
you must update them as shown in steps
3 and
5.
- Optional: Use a URIMAP of type JVMSERVER, and
change the default CJSA transaction to a user transaction where CICS transaction security can be
applied. Sample URIMAP and transaction definitions are provided in
the resource group DFH$PHP in com.ibm.cics.server.examples.php.web.
DFH$PURI is the sample URIMAP definition, and CPTN is the transaction.
- Optional: Implement Liberty security. For more
information about implementing Liberty security, see Configuring security.
Results
Your CICS region is
ready to run dynamic scripting applications.