Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Why we use Browse opertions

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
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    Post subject: Why we use Browse opertions
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: 8201
Location: Dubuque, Iowa, USA

PostPosted: Fri Aug 07, 2009 2:42 am    Post subject:
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    Post subject:
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: 2504
Location: Atlanta, Georgia, USA

PostPosted: Fri Aug 07, 2009 4:01 pm    Post subject: Reply to: Why we use Browse opertions
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    Post subject:
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    Post subject:
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    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 Browse dataset cvnlynn CLIST & REXX 4 Tue Jul 18, 2017 3:52 am
No new posts Changeman get multiple "Browse C... elixir1986 Compuware & Other Tools 4 Fri Jul 14, 2017 1:48 am
No new posts CICS Question RE: Browse, Readnext an... moezbud CICS 7 Sun Mar 05, 2017 5:45 am
This topic is locked: you cannot edit posts or make replies. Secure Browse to open dataset sandip_mainframe TSO/ISPF 3 Tue Apr 26, 2016 11:18 am
No new posts Fields in File-Aid Browse menu screen boyti ko Compuware & Other Tools 5 Mon Apr 04, 2016 4:51 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us