Counting amout of records in quick
Chris Sharman
Chris.Sharman@ccagroup.co.uk
Fri, 19 May 2000 16:19:22 +0100
> Quick question : (I am using ver. (7.10.F2) on Open vms)
> I need to run a screen only if amout of one of my data file greather then
> 5000 is.
> Somthing like this :
>
> If amout of file > 5000
> then run screen ...
>
> My question is how can I count amout of a data file in quick.
I presume you're referring to number of records or file size, rather than the
value of a field.
RMS doesn't retain the record count, so the only solution is to work it out
yourself, which would be very slow.
The EOF pointer is available, either via 3GL or via DCL:
(f$file("data.dat","eof")-1)*512+f$file("data.dat","ffb")
So if file size is enough;
procedure internal ifbig
begin
let cmd = "def/job filesz 'f$str((f$file(" + &
'"data.dat","eof")-1)*512+"+f$file("data.dat","ffb"))'
run command cmd
if (5000 < nconvert(getsystemval("FILESZ")))
then run screen ...
end
Chris
_______________________________________________________________________
Chris.Sharman@CCAgroup.co.uk http://www.ccastat.demon.co.uk/
CCA Stationery Ltd, Eastway, Fulwood, Preston, Lancashire, PR2 9WS.
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
This list is closed, thus to post to the list, you must be a subscriber.