Hey, Not a clue. However, in a program you could :
PRINT 'Enter file name to count records: ':;INPUT FNAME PERFORM 'SELECT ':FNAME REC.COUNT = @SYSTEM.RETURN.CODE PRINT 'File : ':FNAME:' has ':REC.COUNT:' records ' PERFORM 'CLEARSELECT' STOP Or, maybe if your subroutine called another regular subroutine instead of one associated with a dict item? hth, Allen E. Elwood Senior Programmer Analyst Direct (818) 361-5251 Fax (818) 361-5251 Cell (818) 359-8162 Home (818) 361-7217 -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Stu Glancy Sent: Tuesday, September 28, 2004 13:25 To: [EMAIL PROTECTED] Subject: [U2] I descriptor and subroutine 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: S 0001: 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/ ------- u2-users mailing list [EMAIL PROTECTED] To unsubscribe please visit http://listserver.u2ug.org/
