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

Why we use Browse opertions


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

New User


Joined: 25 Apr 2009
Posts: 15
Location: Hyderabad

PostPosted: Thu Aug 06, 2009 11:04 pm
Reply with quote

Why we use Browse and explain the scenarios where we use ?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Aug 07, 2009 2:42 am
Reply with quote

CICS browse operations are used when you want to read multiple records from a given starting point. For example, if the key is an alternate index with duplicates, you may need to use browse to retrieve all the matches to display on a screen (or set of screens). Another example would be address validation where, if the address is not matched exactly, you may want to display addresses on that same street to allow correction of a typo -- you would browse the file to find all the addresses to display.
Back to top
View user's profile Send private message
kumar40322

New User


Joined: 25 Apr 2009
Posts: 15
Location: Hyderabad

PostPosted: Fri Aug 07, 2009 12:43 pm
Reply with quote

Hi

If i want to updated 1500 records out of 2000 records, then which can i have to prefer whether Browse or Random read? And why?
And also if i use browse, at any point of time if there an error occurs , then how to modify it?
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Fri Aug 07, 2009 4:01 pm
Reply with quote

Random would be the better choice. Browsing would be many more commands, because you would have to -

01) STARTBR
02) READNEXT until you find the desired record
03) ENDBR saving the current key
04) READ for UPDATE
05) REWRITE
06) Increase the saved key value for STARTBR
07) STARTBR/READNEXT until you find the next desired record or EOF

The main problem would be the resetting of the CRP (Current Record Pointer) each time you issue an ENDBR/STARTBR combination.

Although you CAN issue a READ for UPDATE/REWRITE after a REANEXT, this is highly ill advised, due to LSR considerations, which may cause a deadly embrace (CI locks itself out recursively) as well as unnecessarily ties-up the QR TCB (which is delegating tasks as well as subsequent task work) and you don't want to do this.

Random update for each record consists of -

01) READ for UPDATE
02) REWRITE

And you're done!

As far as dealing with errors, this should be part of your design document and implementation and is site specific.

Bill
Back to top
View user's profile Send private message
sajjan jindal
Warnings : 1

New User


Joined: 09 Sep 2007
Posts: 60
Location: india

PostPosted: Fri Aug 07, 2009 8:56 pm
Reply with quote

Yes, Bill is correct, Browse and Update are Mutually exclusive. With browse records cant be updated.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Sat Aug 08, 2009 1:19 am
Reply with quote

I don't want to stray too far from the original question, but it seems that batch, rather than online, would be more appropriate for updating 1500 records. Or maybe initiating a batch job from CICS to do the updating. Online transactions are usually intended to perform a function quickly and get out.
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 HILITE on Browse mode? TSO/ISPF 2
No new posts Difference when accessing dataset in ... JCL & VSAM 7
No new posts Issue while reading a file in browse ... TSO/ISPF 7
No new posts How to browse RECFM=VBS DSORG=PSE seq... JCL & VSAM 7
No new posts Find a string in PS file opened in br... CLIST & REXX 3
Search our Forums:

Back to Top