Page 1 of 1

When to go for commarea, TDQ or TSQ ?

Posted: Fri Jul 22, 2016 7:05 pm
by Gagan Ram
Is there any rule of thumb to be followed when we write a new CICS program and choose one from COMMAREA, TDQ or TSQ? Or it is like COMMAREA will always be there and choice between TDQs or TSQs depends on the application requirement?
Regards,

Re: When to go for commarea, TDQ or TSQ ?

Posted: Fri Jul 22, 2016 7:29 pm
by Robert Sample
You are attempting to compare apples, elephants, and rocks.  DFHCOMMAREA, TDQ, and TSQ each have their own purpose and there is little overlap between them.  DFHCOMMAREA is used for passing data between programs that use the EXEC CICS LINK or EXEC CICS XCTL interfaces; TDQ is used for reading or writing data to sequential data sets within CICS, and TSQ is used mostly as a scratch pad for temporary data; it can also be used to pass data between programs NOT using the LINK or XCTL interfaces.  And, by the way, DFHCOMMAREA does NOT always have to be there -- the standard way for a program to determine that it was invoked from a terminal is when EIBCALEN is zero (meaning no DFHCOMMAREA was passed).

Use of DFHCOMMAREA, TDQ, and TSQ (along with all the other CICS facilities such as containers) depends entirely upon the application requirements as implemented by the developers.