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

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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