Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ 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 -> Java & MQSeries
View previous topic :: :: View next topic  
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

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: 176
Location: India

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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Java & MQSeries All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
No new posts Read of TDQ fails in LENGERR Tracy Hansen CICS 10 Wed Apr 05, 2017 12:10 am
No new posts Difference between TWALENG and TWASIZE Arunkumar Chandrasekaran CICS 3 Tue Jan 03, 2017 12:57 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us