Luis,

Because views are merely SQL statement containers there are no records to 
count.  Each time the view is accessed the SQL statement is executed to 
retrieve the resulting data set.  To get the number of records you will need to 
count the number of records returned by the SQL statement contained in the view 
as posted by Elvis.

Rick

-----Original Message-----
From: midrange-l-bounces+rick.chevalier=americredit.com@xxxxxxxxxxxx 
[mailto:midrange-l-bounces+rick.chevalier=americredit.com@xxxxxxxxxxxx] On 
Behalf Of Elvis Budimlic
Sent: Monday, March 26, 2007 11:17 PM
To: 'Midrange Systems Technical Discussion'
Subject: RE: Getting the number of records in non-keyed logical files?

I realize it's not purely CL solution, but if ILE is not out of the realm of 
possibilities doing a CALLPRC to a module written in HLL with embedded SQL 
following statement would be my choice:

SELECT COUNT(*) FROM YOURVIEW

Elvis

Celebrating 10-Years of SQL Performance Excellence

-----Original Message-----
Subject: Getting the number of records in non-keyed logical files?

Hi all,

Does anybody know how to get the number of records in non-keyed logical files 
(e.g. SQL views)?

RTVMBRD / NBRCURRCD can only get the number of records for keyed LFs. I would 
like to determine, in a CL program, the number of records in a SQL view.


Thanks,

Luis Rodriguez


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To 
post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or 
change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment 
to review the archives at http://archive.midrange.com/midrange-l.




Privileged and Confidential.  This e-mail, and any attachments there to, is 
intended only for use by the addressee(s) named herein and may contain 
privileged or confidential information.  If you have received this e-mail in 
error, please notify me immediately by a return e-mail and delete this e-mail.  
You are hereby notified that any dissemination, distribution or copying of this 
e-mail and/or any attachments thereto, is strictly prohibited.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.