Date: Wed, 4 Aug 1999 22:00:22 +1000
Reply-To: Chris Latham & Natalie Myers <chrisnat@OZEMAIL.COM.AU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Chris Latham & Natalie Myers <chrisnat@OZEMAIL.COM.AU>
Subject: Help : Building / determining org structure from jumbled data
Content-Type: text/plain; charset=us-ascii
Folks,
I need some help trying to build an organisational tree structure from
our corporate phone directory.
The file I have contains employee name, manager's name and job
description.
The problem is that is is sorted by employee name.....
example
EMPLOYEE REPORTS-TO POSITION
A Allan B Dole Jnr WAN Administrator
A Jones D Man Financial Controller
A Smith B Dole LAN Administrator
A Thomas A Jones Accountant
B Dole C Link Communications Manager
C Link D Man CIO
D Man **TOP** CEO
E Net B Dole WAN Administrator
We have previously used data from the Human Resources system which has
been
in correct hierarchal order.
Desired order
EMPLOYEE REPORTS-TO POSITION
D Man **TOP** CEO
A Jones D Man CFO
A Thomas A Jones Accountant
C Link D Man CIO
B Dole C Link Communications Manager
A Smith B Dole LAN Administrator
E Net B Dole WAN Administrator
A Allan B Dole Jnr WAN Administrator
I have some existing programs based on the desired order above that I
would like to be able to use (assuming I can get this order again...)
My attempts so far have involved looping through the data and building
arrays
but I come unstuck after the 3rd level of the tree....
(the code is also getting a bit unwieldy)
There are about 10-15 levels in the tree (it's a large company...)
To add to the fun, the report-to field is blank or incorrect in quite a
few cases so there are a few orphan nodes lurking about the place.
(but they can just be dumped at the end of the tree)
Can anyone suggest how I might get to my desired format?
I have a fairly high spec NT Server to run on (1/2 GB RAM, Dual PII) so
processing
is unlikely to be too much of a problem.
Also only licence BASE and AF (plus Intrnet, Share etc) but no SAS/Stat
etc
Thanks for your help
Chris Latham
Latham Consulting P/L
Sydney, Australia