> I am writing an interesting program.  One that finds where
a
> file is empty of records or not.  I used the EXECUTE
command
> with the COUNT command to get the number of records in a
> file.  If its 0 then the file is empty.
> 
> But is there a better way as the execution command causes
> problem in other parts of this program.

OPEN '',FILE_NAME TO FILE_VAR THEN
    SELECT FILE_VAR TO SEL_VAR
    REC_COUNT = 0
    EOL = 0
    LOOP
        READNEXT ITEM_KEY FROM SEL_VAR ELSE EOL = 1
    UNTIL EOL
        REC_COUNT += 1
    REPEAT
END

HTH,

Ken
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to