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
 

 

reading adabas file without descriptor

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Java & MQSeries
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    Post subject: reading adabas file without descriptor
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    Post subject: Reply to: reading adabas file without descriptor
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    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 Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
This topic is locked: you cannot edit posts or make replies. Natural ADABAS Opening with CTS enikhilk Mainframe Jobs 0 Wed Nov 30, 2016 5:37 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


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