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

Why shoud we use READ LOGICAL instead of FIND?


IBM Mainframe Forums -> Java & MQSeries
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
monasu1998

Active User


Joined: 23 Dec 2005
Posts: 176
Location: India

PostPosted: Fri Dec 23, 2005 5:24 pm
Reply with quote

Hi Frens:

Both the READ LOGICAL and FIND are useful in someway or other way.
But my DBA told me to use READ LOGICAL instead of FIND?
Can anyone plz clarify the significance of this instruction?
Back to top
View user's profile Send private message
Dariusz
Warnings : 1

New User


Joined: 11 Aug 2005
Posts: 27
Location: POLAND

PostPosted: Fri Dec 23, 2005 5:42 pm
Reply with quote

Hi.
Find is more usable bycause it runs by ADABAS and it is quickly.
There is one problem only:
for FIND WITH .... we need descriptor field,but too much descriptors
is not better for quick working.
Regards.
Back to top
View user's profile Send private message
toughmetals

New User


Joined: 10 Jan 2006
Posts: 14
Location: India

PostPosted: Mon Jan 16, 2006 12:30 pm
Reply with quote

Hi,

Their is quite difference in processing of READ and FIND.

FIND:
1. Search the inverted list for Descriptor value
2. Build a list of ISN with the matched value
3. Process the ISN thru address converter to fetch the physical record
4. Repeat 3. until ISN list exhaust


READ Logical:
1. Search the inverted list >= Descriptor value and get the ISN
2. Process the ISN and get the actual record
3. Repeat 2. until Inverted list exhaust or u'll get some escaping criteria.

You see, the difference lies here is building of ISN list in case of FIND in working storage. Which is overhead.

Next major difference is we use READ logical only in case we want to get the data sorted by some descriptor value. Whereas, FIND will give us the data in order ISN site in the inverted list.
Back to top
View user's profile Send private message
Borebeat

New User


Joined: 16 Jan 2006
Posts: 7
Location: Coimbatore

PostPosted: Mon Jan 16, 2006 11:59 pm
Reply with quote

Its better to think of READ as for SEQUENTIAL READ and FIND for RANDOM ACCESS.
Back to top
View user's profile Send private message
toughmetals

New User


Joined: 10 Jan 2006
Posts: 14
Location: India

PostPosted: Tue Jan 17, 2006 9:29 am
Reply with quote

Hi BB,

"FIND for RANDOM ACCESS". Could you pls give me some examples?

So that we will be more clear.
Back to top
View user's profile Send private message
Borebeat

New User


Joined: 16 Jan 2006
Posts: 7
Location: Coimbatore

PostPosted: Tue Jan 17, 2006 11:33 pm
Reply with quote

FIND do not actually read the database; ISNs are read directly from the Associator's inverted lists.

READ commands are used to read actual records from Data Storage. Depending on the specified command and its options, records are read individually

1. in the sequence in which they are stored; (READ PHYSICAL)

2. in the order of an ISN list created by one of the database query commands; or (READ BY ISN)

3. in logical sequence according to a user-specified descriptor. (READ LOGICAL)


FIND is faster than READ !!!! :-)
Back to top
View user's profile Send private message
toughmetals

New User


Joined: 10 Jan 2006
Posts: 14
Location: India

PostPosted: Fri Jan 20, 2006 1:59 pm
Reply with quote

Hi BB,

After Fetching ISN from the Inverted list it will go to Address converter to take the RABN number, after that it will get the actual record from DATABASE.

Only Histogram will not get into the DB and read the information only from Inverted List.

Thanks,
Deeps
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 -> Java & MQSeries

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Rotate partition-logical & physic... DB2 0
No new posts Random read in ESDS file by using RBA JCL & VSAM 6
No new posts Find the size of a PS file before rea... COBOL Programming 13
Search our Forums:

Back to Top