View previous topic :: View next topic
|
Author |
Message |
Kanagaraj
New User
Joined: 20 Jan 2006 Posts: 3 Location: Shanghai
|
|
|
|
Is that any way or CICS command to find out the Number of records in particular TSQ?s.
Since some other programs are adding the records into TSQ. From my program I have find out number of records in that TSQ before I start processing.
Kindly come help me on this?
Thanks in advance.
|
|
Back to top |
|
|
gsnvsr
New User
Joined: 06 Jul 2005 Posts: 40
|
|
|
|
Kanagaraj wrote: |
Is that any way or CICS command to find out the Number of records in particular TSQ?s.
Since some other programs are adding the records into TSQ. From my program I have find out number of records in that TSQ before I start processing.
Kindly come help me on this?
Thanks in advance.
|
You could perhaps use the "NUMITEMS" parameter when you initially read the TSQ. This will return the number of items in the TSQ. Define a binary halfword in the working storage to be used with NUMITEMS. Hope this helps!
Best regards, Prasad |
|
Back to top |
|
|
Kanagaraj
New User
Joined: 20 Jan 2006 Posts: 3 Location: Shanghai
|
|
|
|
gsnvsr wrote: |
Kanagaraj wrote: |
Is that any way or CICS command to find out the Number of records in particular TSQ?s.
Since some other programs are adding the records into TSQ. From my program I have find out number of records in that TSQ before I start processing.
Kindly come help me on this?
Thanks in advance.
|
You could perhaps use the "NUMITEMS" parameter when you initially read the TSQ. This will return the number of items in the TSQ. Define a binary halfword in the working storage to be used with NUMITEMS. Hope this helps!
Best regards, Prasad |
I have coded like below in my program,
WS-TSQ-CNTOL PIC 9(04) COMP.
EXEC CICS READQ TS
QNAME (WS-USER-TSQ-NAME)
INTO (WS-TSQ-RECORD)
LENGTH (WS-TSQ-LENGTH)
ITEM (WS-TSQ-ITEM)
NUMITEMS(WS-TSQ-CNTOL)
RESP (CICS-RESP-CODE)
END-EXEC.
I can able get the number records(items) in the TSQ while reading the first record itself.
Prasad, Thanks for your valuable reply. |
|
Back to top |
|
|
|