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

reading adabas file without descriptor


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

New User


Joined: 17 Feb 2014
Posts: 19
Location: India

PostPosted: Wed Feb 25, 2015 3:28 pm
Reply with quote

How can i read adabas from natural program with a condition in non descriptor field?
Back to top
View user's profile Send private message
Ralph Zbrog

New User


Joined: 21 Nov 2009
Posts: 58
Location: California

PostPosted: Thu Feb 26, 2015 2:23 am
Reply with quote

If this is the only condition to be tested, then you must retrieve every record in the file and apply the condition.
Code:
READ file PHYSICAL
  IF  field-name <> 'value'
    THEN
      ESCAPE TOP
  END-IF

Code:
READ file PHYSICAL
  ACCEPT IF  field-name = 'value'

Code:
READ file PHYSICAL
  WHERE field-name = 'value'


WHERE is more efficient than ACCEPT which is more efficient than IF.

If your DBA allows it (highly unlikely - I wouldn't recommend it), the field could be defined in the DDM for non-descriptor searches. In this case Adabas would read every record in the file, but return only those that satisfy the condition.
Code:
READ file BY field-name FROM 'value' TO value'

The best scenario would see a descriptor range narrow the number of records to be retrieved, then apply the condition.

Code:
READ file BY de FROM 'RALPH' TO 'ZBROG'
  WHERE field-name = 'value'

Code:
FIND file WITH de = 'RALPH' THRU 'ZBROG'
  WHERE field-name = 'value'
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 Converting a file from PD to display ... SYNCSORT 4
No new posts Record count of RECFM=U tape file DFSORT/ICETOOL 17
This topic is locked: you cannot edit posts or make replies. Write Character to Hexadecimal file w... COBOL Programming 8
No new posts Checking the total counts inside a re... JCL & VSAM 5
No new posts File-aid batch how to repeat a line... Compuware & Other Tools 2
Search our Forums:

Back to Top