This portal is to open public enhancement requests against IBM Z Software products. To view all of your ideas submitted to IBM, create and manage groups of Ideas, or create an idea explicitly set to be either visible by all (public) or visible only to you and IBM (private), use the IBM Unified Ideas Portal (https://ideas.ibm.com).
We invite you to shape the future of IBM, including product roadmaps, by submitting ideas that matter to you the most. Here's how it works:
Start by searching and reviewing ideas and requests to enhance a product or service. Take a look at ideas others have posted, and add a comment, vote, or subscribe to updates on them if they matter to you. If you can't find what you are looking for,
Post an idea.
Get feedback from the IBM team and other customers to refine your idea.
Follow the idea through the IBM Ideas process.
Welcome to the IBM Ideas Portal (https://www.ibm.com/ideas) - Use this site to find out additional information and details about the IBM Ideas process and statuses.
IBM Unified Ideas Portal (https://ideas.ibm.com) - Use this site to view all of your ideas, create new ideas for any IBM product, or search for ideas across all of IBM.
ideasibm@us.ibm.com - Use this email to suggest enhancements to the Ideas process or request help from IBM for submitting your Ideas.
Due to processing by IBM, this request was reassigned to have the following updated attributes:
Brand - Servers and Systems Software
Product family - Transaction Processing
Product - CICS Transaction Server
For recording keeping, the previous attributes were:
Brand - WebSphere
Product family - Transaction Processing
Product - CICS Transaction Server
Hi Juergen, Beta 8 was around February 2014, the fix was done in April, so its in Beta 10 onwards and its in the GA code.
Thank you for your sample. I tried it out with CICS TS 5.2 Beta Code 8 in an Activator class, but it doesn't work, because of a RuntimeException.
Is that code already implemented in beta drop 8 or is it coming later? You mentioned it's part of the base code in CICS TS 5.2
It seems, the CICSExecutorService uses Task.getTask() before starting a new task to get the current task-instance, but that doesn't work in an activator-environment.
The solution works for JVM server too. The new thread will start under transaction ID "CJSA", and from there JCICS calls can be made. Here's an example of how to use it.
package com.ibm.cics.executor.test;
import com.ibm.cics.server.CICSExecutorService;
import com.ibm.cics.server.TSQ;
import com.ibm.cics.server.TSQType;
public class ExecutorTest
{
public static void main(String[] args)
{
// Inline a Runnable class for convenience in this example
class CICSJob implements Runnable
{
public void run()
{
// Do JCICS things in this runnable.
// Create a temporary storage queue
TSQ test_tsq = new TSQ();
test_tsq.setType(TSQType.MAIN);
// Set the TSQ name
test_tsq.setName("TSQWRITE");
// Write to the temporary storage queue
// Use the CICS region local CCSID so it is readable
String test_string = "Hello from a CICS Thread created in Java - "+ threadId;
try
{
test_tsq.writeItem(test_string.getBytes(System.getProperty("com.ibm.cics.jvmserver.local.ccsid")));
}
catch (Exception e)
{
e.printStackTrace();
}
}
}
// Create and run the new CICSJob on a CICS Thread
Runnable task = new CICSJob();
CICSExecutorService.runAsCICS(task);
}
}
Does that solution also work for JVMServer or only for Liberty?
Apar PI15275 on CICS TS 5.1 (and the same change is in the base code for CICS TS 5.2) allows use of the new CICSThreadExecutorService in an Bundle activator to asynchronously launch a CICS enabled (fully transactional and AP domain aware) task to perform CICS or JDBC work. You can 'synchronise' on this new thread from the original if you wish to make it a blocking call. It is appreciate it involves a layer of indirection, and perhaps another 5 lines of code launch the ExecutorService, but it is a solution, whilst providing "JCICS or JDBC on the same thread" solution would be a more complex solution.
This is a candidate for a future release.