-nl lookup option
Richard Kreiss
rkreiss at gccconsulting.net
Wed Aug 26 13:37:56 PDT 2015
This is a programming approach question:
For each person in a database you have the following 3 fields.
Accounting code (4,.0) - lowest number is 1000 and values in the 9000 range are reserved.
Each person is coded with an Accounting number and a person number (5,.0) starting at 10000.
Master code field is accounting Code-person number (NNNN-NNNNN)
Index K is built on the master code.
When a new person is added, the accounting code is entered and the program then does a lookup using index K -nl
The lookup value used currently is lv="NNNN-99999" and get the highest value for NNNN-NNNNN. A mid statement get the person code and adds one to it. This works nicely.
However, would it be better to use:
Assume that the Accounting Code is 1234
AC="1234"+"1"
PC="00000"
Lv="1235-00000"
Which is better coding or are they the same?
Richard Kreiss
GCC Consulting
More information about the Filepro-list
mailing list