Date: Fri, 2 Dec 2005 15:30:57 -0500
Reply-To: "Osatuke, Katerine, VHACIN" <Katerine.Osatuke@va.gov>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: "Osatuke, Katerine, VHACIN" <Katerine.Osatuke@va.gov>
Subject: how to fill blank line in .sav file by copying contents from line
Content-Type: text/plain; charset="iso-8859-1"
I have a file with over 400 variables. In several cases that come in consecutive sequences from 2 to 9 lines, only the first case of each sequence has values filled in. In such cases, I'd like to copy values of previous (non-empty) lines into the empty lines.
For all cases that belong to the same sequence, the first variable (ID) always has the same value, and is never missing; all the other variables have values only for the first case of each sequence, and system-missing values for all subsequent cases of the sequence.
I'm trying to fill in the blank lines using the lag function. I'd like NOT to list all my 400 variables but instead say (var2 to var400). Spss 11.5 does not like how I wrote this syntax; can anyone please tell me what I'm doing wrong?
If ID=lag(ID) (abbr TO oldcomp)=lag(abbr to oldcomp).
*abbr is the first variable I want to fill in, and oldcomp is the last; there are about 400 variables in between abbr and oldcomp.
Thanks for any advice!
Katerine Osatuke, PhD
VHA National Center for Organization Development
11500 Northlake Drive, Suite 230
Cincinnati, OH 45249
Phone: (513) 247-2255