I have written the following subroutine to count files:
SUBROUTINE HUB.COUNT.FILE (FILENAME,RCNT)
CMD = 'COUNT'
CMD<-1> = FILENAME
SWAP @AM WITH " " IN CMD
CALL SB.DISP(9,CMD)
EXECUTE CMD CAPTURING MSG RETURNING ERR
RCNT = ERR<2,2>
IF RCNT = "" THEN
RCNT = ERR<1,2>
END
9999
RETURN
END
David Laansma
IT Manager
Hubbard Supply Co.
Direct: 810-342-7143
Office:810-234-8681
Fax: 810-234-6142
www.hubbardsupply.com
"Delivering Products, Services, and Innovative Solutions"
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Symeon Breen
Sent: Wednesday, November 19, 2008 8:34 AM
To: [email protected]
Subject: RE: [U2] Counting records
In udt there is a system function after you have done a select,
system(11).
E.g. EXECUTE "SELECT file" ; NUM.OF.RECORDS = SYSTEM(11)
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of T Stokes
Sent: 18 November 2008 22:59
To: [email protected]
Subject: [U2] Counting records
I am trying to remember a Universe function that returns the number of
records in a file.
Something like this.
OPEN 'SOMEFILE' TO SOMEFILE ELSE STOP 201,"SOMEFILE"
NUM.OF.RECORDS = UNKNOWNFUNCTION(SOMEFILE)
--
View this message in context:
http://www.nabble.com/Counting-records-tp20569376p20569376.html
Sent from the U2 - Users mailing list archive at Nabble.com.
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/
No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.175 / Virus Database: 270.9.3/1786 - Release Date:
17/11/2008
17:24
-------
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/