LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (April 2004, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 15 Apr 2004 13:22:12 -0400
Reply-To:   camherst@MISER.UMASS.EDU
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Christopher Amherst <camherst@MISER.UMASS.EDU>
Subject:   Re: Data step within a data step? - continuation of SAS & Square Peg..
In-Reply-To:   <6pdt709mjf59095lqvctofhunakg2k0ico@4ax.com>
Content-type:   text/plain; charset=ISO-8859-1

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.


Back to: Top of message | Previous page | Main SAS-L page