BookmarkSubscribeRSS Feed
pihu_11
Calcite | Level 5

Hi All,

I have SAS dataset that I'm converting into a .xml file using proc report n ODS.

There are 7 variables in that dataset and sorted in the order I need.

The group variable is var1 which has different values and each unique value has either 1,2 or more rows with different values of other variables (var5,var6,var7).

var2,3, and 4 will have same values for each group.

Problem: I need to display the variables Var1-4 only once for each group.

var1var2var3var4var5 var6var7
a11ht4444ttgfq1
a11ht4453f3rgew1
a24ht22dfewrta1
a3545cs12ffred1
a3545cs12425fefd1
a3545cs12234f34f1

This is what I require:

var1var2var3var4var5 var6var7
a11ht4444ttgfq1
453f3rgew1
a24ht22dfewrta1
a3545cs12ffred1
425fefd1
234f34f1

Which type of variable should be used in proc report for Var1-4?? Display? group? order?

Thanks

Pihu

1 REPLY 1
SASKiwi
PROC Star

Var1 to Var4 need to be defined as GROUP variables for the behaviour you want.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 910 views
  • 3 likes
  • 2 in conversation