zOS ConnectEE DB2 Lab-06682k
zOS ConnectEE DB2 Lab-06682k
zOS ConnectEE DB2 Lab-06682k
3. Create API.
4. Test API
REST Client
Some of the steps of this lab require the entering of commands in the Unix System Services ( USS ) part
of z/OS.
The best way to do this is to logon to the USS part of z/OS. To do that you need to use something like
telnet or putty.
To use telnet on Windows start a DOS Command window and then type in telnet at the prompt and you
should see this:
If you get a message saying command telnet not found then follow these steps to see if you can enable
telnet on your Windows PC:
To create a REST service in DB2, you need to use a REST client such as Postman.
When you use Postman to create your REST service in Db2 you will need to send your RACF User ID and
Password in base64 encoded format.
https://www.base64encode.org/
Enter the string to encode in the format Userid:password Note the character between the User ID and
Password is a colon, the one with two vertical dots like this :, not a semi-colan.
And then press the Encode button and display will return the above string in base64 encoded format.
TUZUMTM2OjFRQVoxUUFa
2. Test access to DB2 REST services
Start Postman, set the method to GET and enter the URL http://192.86.33.143:5040/services You will
also need to add two HTTP Headers
Where the string after word Basic is the base64 encoding of your RACF User ID and password from
previous step.
Next you will use Postman to create a REST service in DB2 to query the Employee Table.
"requestType": "createService",
Click the Send button and should get this JSON response
STEP2 - CREATE a NEW DB2 SERVICE PROJECT
Create the API PROJECT and Import the service created above.
Deploy API Deploy the API to the zCEE server in the same way you did in the CICS Lab. Then right click on
the deployed API and select the ‘Open in Swagger UI’ option is same way you did in the CICS Lab and it
should look similar to this:
Scroll down to where the empNumber parameter is and enter a number such as 000020 as shown below
Test API from a browser Copy the URL from the Request URL area as shown below: