pspp-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting case count via PSPP::Perl


From: Rob Messer
Subject: Re: getting case count via PSPP::Perl
Date: Mon, 23 May 2011 11:09:24 -0700

Ok, I have done that (although I didn't see a category called "wishlist" so I 
just put as "other", since it is really a feature request and not a bug).  
Thanks.

On May 23, 2011, at 10:51 AM, Ben Pfaff wrote:

> It would be ideal if you would file this as a "wishlist" bug in
> the tracker at https://savannah.gnu.org/bugs/?group=pspp.  That
> way the request will not get lost.
> 
> Rob Messer <address@hidden> writes:
> 
>> John,
>> 
>> Ok, that is good to know.  So I guess consider this a feature
>> request to add that to some future release.  If the method
>> sometimes returns undef because the file header doesn't have
>> the info that then is reasonable enough, but at least we could
>> show progress in most cases.  Thank you,
>> 
>> Rob
>> 
>> On May 22, 2011, at 1:20 AM, John Darrington wrote:
>> 
>>> It should be very straightforward.   Most .sav files contain a header field 
>>> indicating the number of cases.  However, occasionally we've encountered 
>>> files
>>> which don't have this field.  So the perl program would have to be prepared 
>>> to
>>> handle this case.
>>> 
>>> J'
>>> 
>>> On Fri, May 20, 2011 at 11:16:26AM -0700, Rob Messer wrote:
>>>    We have been using the PSPP::Perl interface to read data from .sav files 
>>> into our database, and it works very well for that purpose.
>>> 
>>>    Sometimes the files we read are rather large, and so it takes some time 
>>> to load the data.  We like to be able to show progress to the user who is 
>>> loading their data, so we need to know the total number of records to be 
>>> loaded.  But right now, there doesn't appear to be any way to get the total 
>>> number of cases other than scanning through all the records.  Is there any 
>>> way to add a method to the Perl API so that we could do something like this:
>>> 
>>>    my $pspp = PSPP::Reader->open($file);
>>>    my $case_count = $pspp->get_num_cases(); 
>>> 
>>>    # then load cases to database and show percent complete at various 
>>> points...
>>> 
>>> 
>>>    Thanks,
>>> 
>>>    Rob
>>> 
>> 
>> 
>> _______________________________________________
>> Pspp-users mailing list
>> address@hidden
>> https://lists.gnu.org/mailman/listinfo/pspp-users
>> 
> 
> -- 
> Ben Pfaff 
> http://benpfaff.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]