Calling Data Files With Dates

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

Calling Data Files With Dates

Jason Schoeneberger

I’m wondering if someone else has already figured this out:

 

I have a job that runs on a nightly basis, Monday through Friday.  I then want to compare the data from today with the data from yesterday (or Friday), and I would like to maintain the date portion of the data file.

 

For instance, take Daily 4-3-09 and merge with Daily 4-6-09.  Then, once the comparison is complete…delete the 4-3-09 file.

 

I’ve got the date adding script to create the files, but I’m not sure how to tell SPSS to merge the file with a previous date.

 

Thanks,

 

J

Reply | Threaded
Open this post in threaded view
|

Re: Calling Data Files With Dates

Albert-Jan Roskam
Hi,

Unless I misunderstand, the following might work:
add files / file = 'oldfile.sav' / file = 'newfile.sav' / in = in_newfile.
select if in_newfile eq 1.
exe.

Cheers!!
Albert-Jan


--- On Mon, 4/6/09, Jason Schoeneberger <[hidden email]> wrote:

> From: Jason Schoeneberger <[hidden email]>
> Subject: Calling Data Files With Dates
> To: [hidden email]
> Date: Monday, April 6, 2009, 4:31 PM
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> I’m
> wondering if someone else has already figured this
> out:
>
>
> �
>
> I have a job
> that runs on a nightly basis, Monday through
> Friday.�  I then want to compare the data from today
> with the data from
> yesterday (or Friday), and I would like to maintain the
> date portion of the
> data file.
>
>
> �
>
> For instance,
> take Daily 4-3-09 and merge with Daily
> 4-6-09.�  Then, once the comparison is
> complete…delete the 4-3-09
> file.
>
>
> �
>
> I’ve got
> the date adding script to create the files,
> but I’m not sure how to tell SPSS to merge the file
> with a previous date.
>
>
> �
>
> Thanks,
>
>
>
> �
>
> J
>
>
>
>
>
>
>
>

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Exclude blanks in Text Analysis for Surveys

King Douglas
In reply to this post by Jason Schoeneberger
Folks,

Say you have a  file with several open-ended responses that you want to code using Text Analysis for Surveys.  There are blanks for each question, each respondent.

Is there a way to tell Text Analysis for Surveys to ignore blanks, as opposed to assigning a value to blanks?  We are using version 2.1.

I know how to solve this problem by preparing the file beforehand in SPSS.

Thanks,

King Douglas
American Airlines Customer Research
Reply | Threaded
Open this post in threaded view
|

Re: Calling Data Files With Dates

Richard Ristow
In reply to this post by Jason Schoeneberger
At 10:31 AM 4/6/2009, Jason Schoeneberger wrote:

>I have a job that runs on a nightly basis,
>Monday through Friday.  I then want to compare
>the data from today with the data from yesterday
>(or Friday), and I would like to maintain the date portion of the data file.
>
>For instance, take Daily 4-3-09 and merge with
>Daily 4-6-09.  Then, once the comparison is
>complete…delete the 4-3-09 file. I’m not sure
>how to tell SPSS to merge the file with a previous date.

How is the comparison done? That is, do you want
a file containing all records from 'today' and
all records from 'yesterday'? Or are records for
individuals or some such, and you want to compare
'today' and 'yesterday' records for each individual?

Running code that changes the filenames it refers
to requires some meta-coding technique; these
days, normally Python. ("Meta-coding": Code that
generates other code, then executes it.  For
example, macros are a meta-coding tool.)

If 'today's data is always in the same file, like
Today.SAV, you could maintain a cumulative file
for all days, something like this. (Here, I'm
computing 'Date' as the date the file is loaded.
More likely, the date will already be in the file.) And

I can think of ways to combine 'today' with a
cumulative file of past days; compare 'today'
with 'yesterday', however you want that done;
and, if desired, delete records from earlier than
'yesterday', though I don't think I'd recommend that.

Can you say a little more about how your data
comes in, and how you will use it?

-Best of luck,
  Richard

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD