MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CICS DB2 Browse

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> CICS and Middleware
View previous topic :: View next topic  
Author Message
614mobile
Beginner


Joined: 19 Jun 2004
Posts: 3
Topics: 2
Location: Bayville, NY

PostPosted: Sat Jun 19, 2004 5:25 pm    Post subject: CICS DB2 Browse Reply with quote

Hey Guys,

I am working on a CICS/DB2 project and am a novice to both. I would like to have your opinion on what would be considered an industry standard way for a CICS Cobol program to browse rows from a DB2 table? Basically what is the right way to scroll forward and backward through rows of data from a single table? I am sure I could struggle through this by opening a cursor and then fetching the number of rows that I need for the first screen and then storing the beginning and ending Keys. Scrolling forward would just mean fetching additional rows. Going back? Re-open the cursor using the last stored beginning key? That seems bogus. Or should I use a temporary storage queue and use the CICS READNEXT and READPREV? Set me straight. I can take it. Thanks.

Karen
Back to top
View user's profile Send private message Send e-mail
karthikeyan
Beginner


Joined: 29 May 2004
Posts: 16
Topics: 4
Location: chennai

PostPosted: Sat Jun 19, 2004 6:52 pm    Post subject: Reply with quote

hi 614
you can use both the tables and temporary storage queue for this.but its best to use the temporary storage queue and the easy way is you count the no of records present in the tsq whil writing in the tsq itself.cics provides you with an option for counting the number of records.
the procedure to write into tsq is
startbr
deleteq
readnext
writeq
-here u have the numitems(dataname) for getting the total number of records written in a queue.
endbr.
then u can scroll front or backwards using the f7 and f8 kes by getting the start item and end item.
i think this information is helpful for u
from
karthik
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
614mobile
Beginner


Joined: 19 Jun 2004
Posts: 3
Topics: 2
Location: Bayville, NY

PostPosted: Sat Jun 19, 2004 8:07 pm    Post subject: Reply with quote

Karthik,

Thank you very much. I appreciate the quick response and look forward to trying this out.

Karen
Back to top
View user's profile Send private message Send e-mail
Mike Chantrey
Intermediate


Joined: 10 Sep 2003
Posts: 234
Topics: 1
Location: Wansford

PostPosted: Mon Jun 21, 2004 9:33 am    Post subject: Reply with quote

STARTBR, READNEXT, READPREV and ENDBR are VSAM file commands. They do not apply to TSQs.

The only command for reading TSQ items is READQ TS, on which you either specify ITEM to get a specific item number or NEXT to read the next item in sequence. You can jump forward and backwards just by setting the item number to the desired value.

Make sure that your TSQ name is unqiue (e.g. by including the terminal id in it).
Back to top
View user's profile Send private message
Anand_R
Intermediate


Joined: 24 Dec 2002
Posts: 189
Topics: 60

PostPosted: Tue Jun 22, 2004 4:07 am    Post subject: Reply with quote

Hi,

There is verygood example inCICS program guide for cobol programmers(Murach's addition, part1 & 2 together). You can use as it is. TS queue concept has been used to handle the DB2-CICS browse and also presented efficient tehcniques for performance improvement.

Thanks
Anand
Back to top
View user's profile Send private message
Manas Biswal
Intermediate


Joined: 29 Nov 2002
Posts: 382
Topics: 27
Location: Chennai, India

PostPosted: Thu Jun 24, 2004 8:55 am    Post subject: Reply with quote

614mobile,

Pls have a look at the following post. It discusses your topic in detail along with all the different options -

http://www.mvsforums.com/helpboards/viewtopic.php?t=118&highlight=scrollable+cursors

Regards,
Manas
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> CICS and Middleware All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group