We are on CICS TS 1.3. We have a printing function the first write to a TD queue that has a trigger level of 1...
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
This worked fine until we introduced a virtual printer. This virtual printer is part of a printing software package. The transaction that offloads the queue runs faster than the one that loads it. Consequently, what should be a single page report becomes broken into a multi-page? How can we get these back in sync?
You might be stuck and have to put up with the split pages unless you can alter all the applications that are using it - if the printing function is isolated in its own XC LINKed program then you should be able to fix things.
I think that what you want to do is alter the Trigger level for the TDQ so that the printing transaction does not get initiated until all of the lines have been sent to the TDQ. This means altering the applications that are using the TDQ. You have also got to guard against multiple writers of the TDQ at the same time (but I hope you are already doing this).
Define the Trigger level for the TDQ to be zero, meaning no ATI of the printing transaction.
So the printing applications should be:
1) XC ENQ on the TDQ to stop multiple writers 2) write all the lines to the TDQ 3) XC SET TDQ TRIGG(number of records written) which should start the printing transaction 4) go into a loop checking XC INQ TDQ NUMITEMS(n) until n=0 showing all the lines have printed or hang about for a bit until at least 1 record has been printed 5) XC SET TDQ TRIGG(0) to stop the next usage starting the printing 6) XC DEQ the TDQ , so letting other people use it.
An alternative design is not to use Trigger facilities on the TDQ but initiate the printing transaction directly (that depends on how the printing transaction works) as part of the print routine.
A further sneaky thing to consider is that IF you can identify the last line of the set of lines to be printed, you could use the XTDEREQC GLUE to alter the trigger level. Again, define the TDQ with a Trigger of zero and code up a XTDEREQC exit to detect the last line and alter the Trigger Level, to one - so starting the printing function.
Dig Deeper on IBM system z and mainframe systems
Related Q&A from Robert Crawford
For better mainframe capacity planning, how do I convert CPU hours to MIPS? And is there a way to calculate the relationship between MIPS and MSUs?continue reading
I have two years of experience in mainframe technology, currently working as a mainframe developer. I want to change to Java technology.continue reading
I want to replicate DB2 from the mainframe to an AIX box since it's cheaper and the copy can be used for testing. Is this possible?continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.