Page 1 of 1

QUEUE Concepts - Help request

Posted: Wed Jul 06, 2016 12:02 am
by raviteja
Hi All,
Please help me on the below concept:
There is a queue say TS1 is written in Program A. I want to read this TS queue TS1 In program B.
How to pass data from Program A to Program B?
Please help me how to handle this. 
One more thing is that If Program B has already a different TS queue say TS2. Does TS2 effects TS1? 
Thanks for your time.

Re: QUEUE Concepts - Help request

Posted: Wed Jul 06, 2016 12:38 am
by Robert Sample
How to pass data from Program A to Program B?
You did not specify nearly enough data here -- how are program A and program B linked?  EXEC CICS LINK, XCTL, or COBOL CALL?  Or are they independent programs?  If they are independent, you'll need some method to synchronize them, particulary if they are reading / writing the same temporary storage queue.
EXEC CICS READQ TS QUEUE(name) is the usual way to read a record from a temporary storage queue -- why would you think anything different would be used?  And since the queue name is provided, why would you think that program B would have any problems reading from two different queues?  If the queues are both MAIN or AUXILIARY, then writing enough data to one could impact the other since you could run out of storage.  Unless that happens, however, you can write / read as many queues as you want up to the CICS limit (which is in the manual if you want to know the limit).

Re: QUEUE Concepts - Help request

Posted: Wed Jul 06, 2016 11:30 am
by raviteja
Hi All,

Due to some formatting issues through phone, I am posting again this using Web.

Please help me on the below Queue concept:

In Program A, Records are written in a TS Queue 'TS1Q'. I want to read this Queue in Program B.

a) How to pass the data from Program A to Program B?
b) Do we need to use any pointers?
c) How to read the queue in Program B record by record?

Also, In Program B, We are reading other different TS queue say 'TS2Q'. So, if we are reading 'TS1Q' in Program B, does it effects 'TS2Q'?

Thanks for your time!

Re: QUEUE Concepts - Help request

Posted: Wed Jul 06, 2016 5:11 pm
by Robert Sample
Did you even bother to look at my earlier reply?
a) How to pass the data from Program A to Program B?
b) Do we need to use any pointers?
c) How to read the queue in Program B record by record?
What data are you passing from program A to program B?  Does program A invoke program B or are they independent?
You don't have to use a pointer, but I guess you can if you want to.
You read the queue in program B by EXEC CICS READQ TS ....  And since each READQ TS has a queue name, as long as you can figure out how to write the CICS command to read TS2Q instead of TS1Q in the program, they are treated independently.
Since TS queues are independent of programs, if 5 users at 5 terminals are all running program A, how do you distinguish the various TS queues?  Or does it matter that multiple programs are writing to the same TS queue?