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

Difference between READ and FIND


IBM Mainframe Forums -> Java & MQSeries
Post new topic   Reply to topic
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
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
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
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 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 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
No new posts Timestamp difference and its average ... DB2 11
Search our Forums:

Back to Top