Sample for creating a CICS service with a properties file
This sample walks you through the steps to create a CICS® service by preparing a properties file for the service and generating the service archive using the build toolkit.
Before you begin
Note: Although the primary use cases are when the source of input is neither COBOL or PL/I, this sample shows you how to recreate the CICSTo create and test the
inquireSingleservice for the Catalog Manager example application (COBOL) for ease of testing.
inquireSingleservice, ensure that the following tasks are complete:
- Install and configure the CICS catalog manager example application. The procedure is described in the scenario Prepare the sample CICS application
- Install IBM z/OS Connect v3.0 or later. For more information, see Installing IBM z/OS Connect.
- Configure and test your IPIC connection to CICS. The
procedure is described in the scenario Create a server and connect to CICS and installs relevant
artifacts using the supplied configuration template
sampleCicsIpicCatalogManager. This includes the
- Use the z/OS Connect API
inquireSingleservice, and then
About this task
In this sample we use the build toolkit to recreate the CICS
inquireSingle service. The service archive file uses an existing CICS COBOL copybook from the catalog manager example application.
In this procedure, substitute the Windows example for the platform of your choice. The build toolkit properties files must be encoded in UTF-8.
- Create a local directory called: C:/CICSSPscenario on the Windows system.
Download the Catalog Manager sample copybook to the local directory
C:/CICSSPscenario created in step 1.
The copybook is supplied by CICS TS in hlq.SDFHSAMP and is called DFH0XCP4, where hlq is the high-level qualifier (HLQ) of your CICS libraries. When you download the file, give it a file type of cpy, for example: DFH0XCP4.cpy.
Download the build toolkit compressed file,
zconbt.zip as a binary file, to the same local directory,
The build toolkit is in the IBM z/OS Connect <installation_path> and is called zconbt.zip.
Extract the zconbt.zip file into a
zconbt sub directory of the
C:/CICSSPscenario local directory.
The directory structure should be as follows.
C:/CICSSPscenario DFH0XCP4.cpy zconbt bin doc ...
- Add the zconbt executable to your path. For example, enter the following command: set PATH=C:/CICSSPscenario/zconbt/bin;%PATH%
Create a service archive file for the Inquire Single service.
Create a build toolkit
properties file called InquireSingle.properties in
the C:/CICSSPscenario directory.
name=inquireSingle provider=cics description=CICS Catalog Manager Inquire Single service version=1.0 program=DFH0XCMN connectionRef=cicsConn language=COBOL programInterface=COMMAREA requestStructure=C:/CICSSPscenario/DFH0XCP4.cpy responseStructure=C:/CICSSPscenario/DFH0XCP4.cpy
Run the build toolkit CLI to
create the service archive file.
In a command prompt window, enter the following command:zconbt --properties=C:/CICSSPscenario/InquireSingle.properties --file=C:/CICSSPscenario/InquireSingle.sar
- Create a build toolkit properties file called InquireSingle.properties in the C:/CICSSPscenario directory.
You can now deploy the service archive file by copying it to the services directory of your server.