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,
Winston Groenewald wrote in message
>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
>and I want this
>3209 APTY AIMS
>3210 APTY AIMS
>3212 APTY AIMS
>3213 ACOP QTIM SIAM
>ACOP QTIM SIAM
>I have already written a macro that splits the data into different values
>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
>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?
>Johannesburg, South Africa