The SAS Output Delivery System and reporting techniques

Problem getting data "depth level"

Not applicable
Posts: 1

Problem getting data "depth level"

I ahve a dataset consisting of 9000+ staff members for which I have their staff ID and their manager's staff ID. I want to be able to generate the "depth" down the staff tree for these users (eg there are four upward hops from me to the Group Chairman so I have a depth of four). In addition I want to associate each staff member with their uber-manager (ie with a depth of one).

Both problems seem to call for some sort of tre-walk macro but it's outwith my experience to write one and nothin on the SAS website seems to address the issue. Closest I've seen is SUGI paper 87-28 but that's walking down an existing structure rather than up a virtual one.

Anyone seen anything like this before?

Not applicable
Posts: 0

Re: Problem getting data "depth level"

sounds like a good casebook example for the data step hash object.
There will be some excellent examples among the SAS Samples : Go to and navigate (left hand side) in "Knowledge Base" to "Samples & SAS Notes"

Good Luck

Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation