Date: Fri, 24 Sep 1999 15:34:44 -0400
Reply-To: Howard Schreier <Howard_Schreier@ITA.DOC.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Howard Schreier <Howard_Schreier@ITA.DOC.GOV>
Subject: Re: Interesting problem
Content-Type: text/plain; charset=US-ASCII
If SAS/OR is available, PROC CPM can be helpful in working on such problems.
It won't construct the answer required here, but it will detect closed loops in the structure and determine the depth of the structure, which could be big helps.
As I recall, it is necessary to first append some data records to "connect" all of the actual terminal values (ones appearing in VAR2 but not in VAR1) to a new made-up terminal value. That is,
AIMS #END#
SIAM #END#
Winston Groenewald wrote in message
<000f01bf04f9$6df231a0$b103460a@winstong.absa.co.za>...
>I have a data set for which I have to produce an expanded version showing
>all the possible hierarchies that may exists among two fields. My data set
>looks like this
>
>VAR1 VAR2
>3209 APTY
>3210 APTY
>3212 APTY
>3213 ACOP
>APTY AIMS
>ARAF AIMS
>
>and I want this
>
>3209 APTY AIMS
>3210 APTY AIMS
>3212 APTY AIMS
>3213 ACOP QTIM SIAM
>APTY AIMS
>ARAF AIMS
>ACOP QTIM SIAM
>QTIM SIAM
>
>I have already written a macro that splits the data into different values
of
>VAR1 and then remerging those files by renaming VAR1 & VAR2 in data set 2 -
>the message box of which is too big to write the solution - no pun intended
>de Fermat)
>
>I have worked off a small section of the actual data set and am scared that
>I may run into a 'Too many open files" error.
>
>Can anyone provide a more elegant solution?
>
>Regards
>Winston Groenewald
>Johannesburg, South Africa
>
>
|