How will I find out total number of records in a DB file without causing any I/O operation?
Also
How will I detect the existence of a record in a DB file without causing any I/O operation?
I think I can use INFDS and the field *RECORD but not sure how this works.
Thanks,
Nutan
Software/Hardware used:
DB2/400
ASKED:
September 22, 2010 11:33 AM
UPDATED:
June 15, 2012 12:01 PM
Nutan
Right you are, INFDS contains the count of records when the file is open.
But it’s not in the *RECORD location, that’s the record name, useful in multi-format logical files and/or display files.
You will find it in positions 156-159 it’s a Binary number with 0 deccimals
D MYINFDS DS
D MyCntOfRec 156 159 B 0
And Narked is right on .. Setll and %Equals.
Phil
thanks a ton both of you…
Great answer, I was also seeking the same DB file matter. But much important DB for HIPAA Complaint Email
What?