BookmarkSubscribeRSS Feed
AxS
Calcite | Level 5 AxS
Calcite | Level 5
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?

AxS
1 REPLY 1
deleted_user
Not applicable
sounds like a good casebook example for the data step hash object.
There will be some excellent examples among the SAS Samples : Go to http://support.sas.com/ and navigate (left hand side) in "Knowledge Base" to "Samples & SAS Notes"

Good Luck

PeterC

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 552 views
  • 0 likes
  • 2 in conversation