Page 1 of 1

Restore #filenum and setting up indexes

Posted: Fri Mar 26, 2010 7:43 pm
by Susan Smith
Hi all,

I have an indexed file that is keyed by Serial Date (BH 3) and Check Number which is a C8 field.
I am printing a report where the user enters a beginning and ending date to include. I want to restore the file to the spot where the beginning date starts. I don't understand how to set this up when the date is stored as a BH 3. If it were an N 8, I get it.

Any hints?

-- Susan

Posted: Fri Mar 26, 2010 11:10 pm
by Gabriel
Its just the same as for an N 8 only instead of specifying ", Key=MyVariable" in the read statement, you specify ', Key=cnvrt$("BH 3",MyVariable'.

Also, if you're using Fileio, you can simply call the fnBuildKey$ function and it will build the key for any file on the fly.

Gabriel

Posted: Sat Mar 27, 2010 12:39 am
by Susan Smith
Excellent. Thanks. That's exactly what I needed.

-- Susan