IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

To find the number of records in TSQ.


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Kanagaraj

New User


Joined: 20 Jan 2006
Posts: 3
Location: Shanghai

PostPosted: Mon Jun 12, 2006 7:44 am
Reply with quote

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.
icon_question.gif
Back to top
View user's profile Send private message
gsnvsr

New User


Joined: 06 Jul 2005
Posts: 40

PostPosted: Tue Jun 13, 2006 9:47 pm
Reply with quote

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.
icon_question.gif


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
View user's profile Send private message
Kanagaraj

New User


Joined: 20 Jan 2006
Posts: 3
Location: Shanghai

PostPosted: Thu Jun 15, 2006 11:13 am
Reply with quote

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.
icon_question.gif


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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
Search our Forums:

Back to Top