This is an example of using a properties file to create a two-way IBM® MQ stock query service that drives the stock query application.
zosConnect-2.0 Applies to zosConnect-2.0.
Before you begin
Ensure that the following tasks are complete:
Procedure
In this procedure, substitute the Windows
example for the operating system of your choice. The build toolkit properties file must be encoded
in UTF-8.
-
Create a local directory such as C:/DevOpsScenarios on the Windows system.
-
Download the build toolkit compressed file,
zconbt.zip as a binary file, to the local directory created in step 1.
The build toolkit is in
the z/OS Connect
<installation_path> and is called zconbt.zip.
-
Extract the zconbt.zip file into a zconbt sub
directory of the C:/DevOpsScenarios local directory.
-
Add the
zconbt executable file to your path. For example, enter
the following command:
set PATH=C:/DevOpsScenarios/zconbt/bin;%PATH%
-
Create a properties file, called stockQuery.properties, that defines the
stock query service in C:/DevOpsScenarios.
The file contains the following
properties.
provider=mq
name=stockQuery
version=1.0
description=A stock query service based on IBM MQ.
connectionFactory=jms/cf1
destination=jms/stockRequestQueue
replyDestination=jms/stockResponseQueue
waitInterval=10000
language=COBOL
requestStructure=C:/DevOpsScenarios/STOCKREQ.COPY
responseStructure=C:/DevOpsScenarios/STOCKRES.COPY
operationName=STOCKQRY
mqmdFormat=MQSTR
-
Create a file called STOCKREQ.COPY in
C:/DevOpsScenarios.
This file contains the COBOL copybook that is used for the request payload of the stock query
service and contains the
following:
01 SQREQ.
05 ITEM-ID PIC 9(6).
-
Create a file called STOCKRES.COPY in
C:/DevOpsScenarios.
This file contains the COBOL copybook that is used for the response payload of the stock query
service and contains the following
lines:
01 SQRESP.
05 ITEM-ID PIC 9(6).
05 ITEM-DESC PIC X(20).
05 ITEM-COUNT PIC 9(6).
05 ITEM-COST PIC 9(6).
-
Run the build toolkit CLI to create the service archive file.
Enter the following
command:
zconbt -p=C:/DevOpsScenarios/stockQuery.properties -f=C:/DevOpsScenarios/stockQuery.sar
The response from this command contains the following messages:
BAQB0000I: z/OS Connect Enterprise Edition Build Toolkit Version 1.1.
BAQB0001I: Creating service archive from configuration file C:/DevOpsScenarios/stockQuery.properties.
BAQB1022I: IBM MQ for z/OS plugin for IBM z/OS Connect V3.0 build toolkit, code level is 3.0.21.0(20190417-1944).
BAQB0002I: Successfully created service archive file C:/DevOpsScenarios/stockQuery.sar.
Results
You created a service archive file that defines the stock query
service.
What to do next
Deploy the stock query service to the z/OS Connect server