Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Difference between READ and FIND

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> NATURAL & MQSERIES
Author Message
soumak

New User


Joined: 08 Sep 2005
Posts: 1

PostPosted: Thu Sep 08, 2005 6:01 pm    Post subject: Difference between READ and FIND
Reply with quote

Hi,

Can someone please explain the difference between READ and FIND in Natural?

It would be helpful if I could get some examples to show the difference.
Back to top
View user's profile Send private message
References
PostPosted: Thu Sep 08, 2005 6:01 pm    Post subject: Re: Difference between READ and FIND Reply with quote

agra2jain

New User


Joined: 06 Sep 2005
Posts: 1

PostPosted: Fri Sep 09, 2005 11:21 am    Post subject: Re: Difference between READ and FIND
Reply with quote

Read - Reads the records from a database; in physical sequence, ADABAS ISN sequence, or
in value sequence of descriptor (key) field. Initiate a processing loop.


Example:-

1. READ EMPLOY-VIEW IN PHYSICAL SEQUENCE
DISPLAY PERSONNEL-ID NAME *ISN *COUNTER
END-READ

2. READ EMPLOY-VIEW BY ISN
STARTING FROM 1 ENDING AT 3
DISPLAY PERSONNEL-ID NAME *ISN *COUNTER
END-READ

3. READ EMPLOY-VIEW IN VARIABLE #DIRECTION SEQUENCE BY NAME
DISPLAY PERSONNEL-ID NAME *ISN *COUNTER
END-READ


=============================================

Find - Selects records from a database file based on user-specified criteria.

Example:-

1. FIND EMPLOY-VIEW WITH CITY = `FRANKFURT`
SORTED BY NAME PERSONNEL-ID
DISPLAY NOTITLE NAME (IS=ON) FIRST-NAME PERSONNEL-ID
END-FIND

2. FIND EMPLOY-VIEW WITH CITY = `PARIS`
WHERE JOB-TITLE = `INGENIEUR COMMERCIAL`
DISPLAY NOTITLE CITY JOB-TITLE PERSONNEL-ID NAME
END-FIND
Back to top
View user's profile Send private message
monasu1998

Active User


Joined: 23 Dec 2005
Posts: 95
Location: Hyderabad

PostPosted: Fri Dec 23, 2005 5:09 pm    Post subject: Re: Difference between READ and FIND
Reply with quote

Hi All:
READ is to access one or multiple records with different keys even if elements of the key are unknown.
It has 3 variations
READ IN LHYSICAL SEQUENCE:it retrieves data in the order the data stored to the database
READ BY ISN: it retrieves data in ISN order
READ LOGICAL: it retrieves data in order of the value of a key field(descriptor)

The FIND statement is used to retrieve records from the database based on a search criterion consisting of fields defined as descriptors (keys).
It has several variations like FIND NUMBER, FIND UNIQUE, FIND FIRST etc.

READ is for sequential access of data where as FIND is for random access
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> NATURAL & MQSERIES All times are GMT + 6 Hours
Page 1 of 1