|
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 |
|
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 |
|
In reply to this post by Jason Schoeneberger
|
|
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. Im 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 |
| Free forum by Nabble | Edit this page |
