Date: Thu, 29 Sep 2005 17:09:34 -0400
Reply-To: Richard Ristow <firstname.lastname@example.org>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Richard Ristow <email@example.com>
Subject: Re: Split file command
Content-Type: text/plain; charset="us-ascii"; format=flowed
At 10:20 AM 9/29/2005, Cynthia L Conley wrote:
>Is it possible to split a file based on a date function versus groups
>within windows? I'm trying to split a file based on variable months of
>'99 and '04 data and thought there may be a way to do this quickly
>through windows rather than writing numerous statements in the syntax.
>Thanks for your assistance.
If the file you want to split is an SPSS saved file, it's probably not
possible, and at least not practicable, to split it outside SPSS. To
cite two reasons: the non-SPSS code would have to 'know' where in the
file to find the variable; distinguish variable values from the data
dictionary at the head of the file; and put the correct dictionary
information at the head of each file.
Can you say more about what you want to do? It sounds like you want
separate files, rather than an SPSS files with "SPLIT FILE" set; though
it's worth considering whether the latter would serve your purpose.
And, what is the logic by which you want the files split? (Jim Marks
has given a way to SPLIT FILE a single file by calendar months.)
It would surprise me if the SPSS syntax to do the job were longer than
extra-SPSS code to do the same, even with a utility that 'knew' how to
read an SPSS file and write new ones.