Page 1 of 1

Question regarding ADS

Posted: Mon Dec 05, 2016 12:26 pm
by omni
Roger,

Have some code (maybe just one) that skips thru a few records to total for a/p checks, then goes back to print the check since it needs a total. Actually been doing that for 25 years without any issues.
Counts the records, then skips back to the first record using skip -nrecords.

In Ads it is inconsistent and only skips -1 record even if the counter is 6, for example. Watched it do it. Sometimes it does, sometimes not. On one check run it did two right and one wrong. On another that was just a single check it did it wrong, which gave a good test environment at that users.
I changed it to use the record number, which is used in most if not all other programs that do that type of skipping, just with a goto command to get back on the starting record.

Should we do away with any that skip a certain number of records either direction? I have never personally used that code (skip +- records ) other than just 1, but I guess some programmer did back in the day and its always worked...

This is just a work file with no index.


Fred
Omni

Re: Question regarding ADS

Posted: Mon Dec 05, 2016 1:04 pm
by rdonnay
I have never seen ADS fail with a dbskip(-n) before.

This is used all the time in DCBROWSE.

I don't know what conditions you have set that would cause such a behavior.

If you can write a small test program that demonstrates the problem, I will help you.