Date: Tue, 21 Nov 2006 17:06:22 -0500
Reply-To: Brian Kelley <bkelley@LAKESTONEG.COM>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Brian Kelley <bkelley@LAKESTONEG.COM>
Subject: Re: Basic loop-vector command help?
Hi Gene, thanks for the reply. I'll try to provide more information.
I am writing a syntax file that I will use the run command to perform
operations on my larger file (Master_SPSS). My intent with the syntax file
is to automate some data changes in some fields in the Master_SPSS file. I
can currently "run" the Syntax in the syntax file that I submitted and it
will make changes on the Master file, but I'd perfer not to have to write
two lines of code for every state. I was hoping that I could read into a
vector file (that I seen as an array, maybe I'm wrong) the state FIPS
codes and abbreviations, then use the data in the vector to fill in a
variable in the Do if loop that would test for two values in the larger
file (1.5million records) and then if correct, a value in a third field
would be changed. I'm keeping the names of the internal syntax fields
different than the names of the fields for the larger SPSS file. In other
languages, I'd write some type of array and then use a substitution
variable, and I could iterate the Do if loop through the different records
in the array. I think that I must have some fundamental misunderstanding
of how vectors and arrays interact. I hope that this helps?
best,
Brian
|