Try Java in your environment
If you already have a CICS® environment, you can play with different functions using CICS-provided sample code.
This table summarizes the basic Java™ samples in CICS. Choose one that matches your learning objective to get started:
Learning objectives | Samples |
---|---|
Understand the most common functions of the JCICS API |
JCICS samples for an OSGi environment
RESTful web application sample, Extending RESTful web application sample, and Link to Liberty sample for a Liberty environment |
Understand the most common functions of the JCICSX API | JCICSX samples |
How to map data between Java and other languages, such as COBOL | |
Understand Spring Boot basics in CICS Java applications | Spring Boot sample |
How to access a database by using the Java Database Connectivity (JDBC) API | JDBC web application sample |
For each sample, find out where to get it, a brief description of what the sample does, and a summary of the Design choices for Java in CICS (or technologies) that it demonstrates.
JCICS samples
Find the samples: cics-java-jcics-samples
- Most common functions of the JCICS API, such as program linking, serialization, or accessing data from CICS transient data queues (TDQs), CICS temporary storage queues (TSQs), or VSAM files.
- Deploy the application in a CICS bundle by using an Eclipse-based IDE with the IBM® CICS SDK for Java.
API | IDE | JVM server | Application type | Packaging | Deployment |
---|---|---|---|---|---|
JCICS | Any Eclipse-based IDE with the IBM CICS SDK for Java installed, for example, CICS Explorer® | OSGi | Java SE | OSGi bundle | CICS bundle |
RESTful web application sample
Find the sample: cics-java-liberty-restapp. You can also watch the video course that uses the sample: Developing a RESTful Web application for Liberty in CICS.
- Build and deploy a simple RESTful web application into a Liberty JVM server in CICS.
- Link to a COBOL program from the Java application by using channels and containers.
API | IDE | JVM server | Application type | Packaging | Deployment |
---|---|---|---|---|---|
JCICS | Any Eclipse-based IDE with WebSphere® Developer Tools and the IBM CICS SDK for Enterprise Java (Liberty) installed | Liberty | Java EE | WAR | CICS bundle |
Extending RESTful web application sample
Find the sample: cics-java-liberty-restapp-ext. You can also find an accompanying video course in the sample repository.
- Access CICS resources, including VSAM files and temporary storage queues (TSQs) by using the JCICS API.
API | IDE | JVM server | Application type | Packaging | Deployment |
---|---|---|---|---|---|
JCICS | Any Eclipse-based IDE with WebSphere Developer Tools and the IBM CICS SDK for Enterprise Java (Liberty) installed | Liberty | Java EE | WAR | CICS bundle |
Link to Liberty sample
Find the sample: cics-java-liberty-link.
- Annotate a Java Liberty application to allow it to be called from a CICS program.
API | IDE | JVM server | Application type | Packaging | Deployment |
---|---|---|---|---|---|
JCICS | CICS Explorer with the IBM CICS SDK for Enterprise Java (Liberty) installed | Liberty | Java EE | WAR | CICS bundle |
JCICSX samples
Find the samples: cics-java-jcicsx-samples
- Basic functions of the JCICSX API, such as program linking, data passing, and mocking.
- Customize the samples to use Gradle plug-in. Alternatively, build and deploy the application by using the CICS-provided Maven plug-in.
API | IDE | JVM server | Application type | Packaging | Deployment |
---|---|---|---|---|---|
JCICSX | Any Java IDE that supports Maven | Liberty | Java EE | WAR | CICS bundle (using Maven plug-in) |
IBM Record Generator sample
Find the sample: cics-java-recgen. You can read the tutorial that describes this sample in IBM Developer.
- Use IBM Record Generator for Java to generate Java helper classes from a COBOL copybook in a batch, and then use the generated Java classes to develop and deploy a Java application that links to a COBOL program.
Estimated time: 1 hour
API | IDE | JVM server | Application type | Packaging | Deployment |
---|---|---|---|---|---|
JCICS | Any Eclipse-based IDE with the IBM CICS SDK for Java installed, in this case, CICS Explorer | OSGi | Java SE | OSGi bundle | CICS bundle |
J2C sample
Find the sample: cics-java-j2cprog. You can read the tutorial that describes this sample in IBM Developer.
- Use the J2C tools in IBM Rational® Application Developer for WebSphere Software (RAD) to generate a Java data binding class from a COBOL copybook, and then use the generated Java class to develop and deploy a Java application that links to a COBOL program.
API | IDE | JVM server | Application type | Packaging | Deployment |
---|---|---|---|---|---|
JCICS | Any Eclipse-based IDE with the IBM CICS SDK for Java installed | OSGi | Java SE | OSGi bundle | CICS bundle |
Spring Boot sample
Find the sample: cics-java-liberty-springboot-jcics. You can read the tutorial that describes this sample in IBM Developer.
- Develop a basic Spring Boot application that uses the JCICS API to provide a RESTful CICS temporary storage queue (TSQ) browsing service.
- Build the Spring Boot application by using Gradle or Maven to access libraries on Maven Central.
- Deploy the application through either CICS Explorer or Liberty server configuration.
Estimated time: 1 hour
API | IDE | JVM server | Application type | Packaging | Deployment |
---|---|---|---|---|---|
JCICS | Any IDE that supports Gradle or Maven | Liberty | Spring Boot | WAR | CICS bundle or Liberty configuration |
JDBC web application sample
Find the sample: cics-java-liberty-jdbc
- Access a Db2® database from a web servlet in CICS Liberty through the Java Database Connectivity (JDBC) API.
API | IDE | JVM server | Application type | Packaging | Deployment |
---|---|---|---|---|---|
JCICS | CICS Explorer with the IBM CICS SDK for Enterprise Java (Liberty) installed | Liberty | Java EE | WAR | CICS bundle |