|
Ace remarked:
> Yukk yukk yukk. You appear, from the title, to be labouring under the
> misaprehension that the macro-ised data step is somehow being executed
> within the previous one. This is not the case.
Actually, I do understand that.
I know that the Macro code is resolved before the datastep is processed.
Hence, the reason for the 'unreferenced array' error.
> This just doesn't give a clue as to what you're trying to achieve.
I have 3 data sets.
Data set 1 contains X candidates for an election
Data set 2 contains Y ballots which vote ala Hare Proportional
(Meaning that voters rank the nominees in order of preference and seats are
filled based on this preference and the seats available)
X & Y are not equal.
Data set 3 is a summary data set containing totals information from Data set 1
and 2.
I want to extract information from the various data sets without merging them,
since there is no commonality between them unless I create a matrix of X by Y
which is undesirable. (The only link between Data set 1 and Data set 2 is that
the votes on the ballots are noted for the BallotPos marked..)
In the case of 'tally' -
I am trying to go into Data Set 2, tally the 1st choice votes, pass this array
back. (Tally is used for each _round_ of the election until all seats are
filled)
This array is used in 'printtally' to take the array, pass to Data Set 1, to
report on who received what votes.
(And the array is used to derive whether someone met a threshold as to
electability)
>It rather looks like you're wanting to combine information from two or
> more datasets in a single data step. There are many ways to do this,
> but obviously this will depend on your requirements.
Alas, the only requirements I have is
A) Implement this old Fortran program into SAS (rather than C, Perl, or Java)
B) Have it done by the end of next week
C) Maintain some modicum of simplicity in the code.
I'll be honest, I think SAS is the wrong tool to use to translate this fortran
application.
|