Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

To find the number of records in TSQ.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
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    Post subject: To find the number of records in TSQ.
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    Post subject: Re: To find the number of records in TSQ.
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    Post subject: Re: To find the number of records in TSQ.
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    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts How to find the first monday of the w... abdulrafi COBOL Programming 10 Fri Nov 25, 2016 3:24 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us