Simple Record Count

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Simple Record Count

Heidi Green

Hello List-

This is going to sound like the silliest question ever, but is there a syntax command that can just give me a simple record count of the total number of records in a file? I came up with no matches when searching the archives of this list.

 

Way back when, the output window used to show the record count when you opened a file, and I found it very handy. The record count also appears in output when I save data to certain non-SAV formats (.dbf or Access table).

 

I know I can run a frequency on some field and note the total, or I can compute a new field = 1 for every case and sum it/freq on it, but I’m just wondering if I’m missing some other very simple method?

 

My goal, by the way, is to create output that can be easily understood by non-SPSS users who are basically just executing my syntax via an INSERT line. So what they see in the output would be something like this:

 

 

Total Records in the File Before Adding New Data

Record Count

270,843

 

Or:

 

 

 

Records Written to Access Database

270,843

 

Etc…

 

I’m using V18.

 

Thank you for any solutions and clever tricks!

 

-Heidi Green

Reply | Threaded
Open this post in threaded view
|

Re: Simple Record Count

Albert-Jan Roskam
Hi,

SHOW N is what you're looking for.

Cheers!!
Albert-Jan

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In the face of ambiguity, refuse the temptation to guess.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

--- On Tue, 2/9/10, Heidi Green <[hidden email]> wrote:

From: Heidi Green <[hidden email]>
Subject: [SPSSX-L] Simple Record Count
To: [hidden email]
Date: Tuesday, February 9, 2010, 6:39 PM

Hello List-

This is going to sound like the silliest question ever, but is there a syntax command that can just give me a simple record count of the total number of records in a file? I came up with no matches when searching the archives of this list.

 

Way back when, the output window used to show the record count when you opened a file, and I found it very handy. The record count also appears in output when I save data to certain non-SAV formats (.dbf or Access table).

 

I know I can run a frequency on some field and note the total, or I can compute a new field = 1 for every case and sum it/freq on it, but I’m just wondering if I’m missing some other very simple method?

 

My goal, by the way, is to create output that can be easily understood by non-SPSS users who are basically just executing my syntax via an INSERT line. So what they see in the output would be something like this:

 

 

Total Records in the File Before Adding New Data

Record Count

270,843

 

Or:

 

 

 

Records Written to Access Database

270,843

 

Etc…

 

I’m using V18.

 

Thank you for any solutions and clever tricks!

 

-Heidi Green


Reply | Threaded
Open this post in threaded view
|

Re: Simple Record Count

Heidi Green

Fantastic! Thank you very much for your quick response.

 


From: Albert-Jan Roskam [mailto:[hidden email]]
Sent: Tuesday, February 09, 2010 9:47 AM
To: [hidden email]; Heidi Green
Subject: Re: [SPSSX-L] Simple Record Count

 

Hi,

SHOW N is what you're looking for.

Cheers!!
Albert-Jan

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In the face of ambiguity, refuse the temptation to guess.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

--- On Tue, 2/9/10, Heidi Green <[hidden email]> wrote:


From: Heidi Green <[hidden email]>
Subject: [SPSSX-L] Simple Record Count
To: [hidden email]
Date: Tuesday, February 9, 2010, 6:39 PM

Hello List-

This is going to sound like the silliest question ever, but is there a syntax command that can just give me a simple record count of the total number of records in a file? I came up with no matches when searching the archives of this list.

 

Way back when, the output window used to show the record count when you opened a file, and I found it very handy. The record count also appears in output when I save data to certain non-SAV formats (.dbf or Access table).

 

I know I can run a frequency on some field and note the total, or I can compute a new field = 1 for every case and sum it/freq on it, but I’m just wondering if I’m missing some other very simple method?

 

My goal, by the way, is to create output that can be easily understood by non-SPSS users who are basically just executing my syntax via an INSERT line. So what they see in the output would be something like this:

 

 

Total Records in the File Before Adding New Data

Record Count

270,843

 

Or:

 

 

 

Records Written to Access Database

270,843

 

Etc…

 

I’m using V18.

 

Thank you for any solutions and clever tricks!

 

-Heidi Green




____________
DefenderMX2.