U2 Users Group, International wrote:
Forums U2 Users Group, International Community :: Chatter ::.. I descriptor and subroutine
rotto wrote at Sep 28, 2004 - 05:34 PM --------------------------------------------------------------------- Hey,
I'm running a sub from an I-descriptor in uv. I want to count the number of records in a table, but you cannot do a SELECT or COUNT in a sub running from i-descriptor. Is there any other way to get the number of records in such a sub or in a i-descriptor?
Thanks Rehan ---------------------------------------------------------------------
My VOC record COUNT.REC will count records in a file from an I-Descriptor:
0001: I
0002: SUBR("SUB.COUNT.REC",@ID)
0003:
0004: COUNT
0005: 30L
0006: S0001: SUBROUTINE SUB.COUNT.REC(RESULT,FILENAME) 0002: OPEN FILENAME TO FILE THEN 0003: SELECTN FILE TO 2 0004: DONE = 0 0005: CNTR = 0 0006: LOOP 0007: READNEXT K FROM 2 ELSE DONE = 1 0008: UNTIL DONE 0009: CNTR += 1 0010: REPEAT 0011: RESULT = CNTR 0012: END ELSE 0013: RESULT = 'OPEN ERROR' 0014: END 0015: CLOSE FILE 0016: RETURN Bottom at line 16. ------- u2-users mailing list [EMAIL PROTECTED] To unsubscribe please visit http://listserver.u2ug.org/
