BookmarkSubscribeRSS Feed
R_Win
Calcite | Level 5
HI

I AM HAVING DATASET BY NAME INTIAL IT IS HAVING 10 OBS AND IT WAS SPLITTED IN TO TWO

DATASETS S1,S2 WITH 5 OBS EACH AND AFTER THAT I HAVE MADE SOME AGGREATIONS AND CREATED T1

AND T2 DATASET HAVING 5 OBS EACH NOW I WNAT THE COUNT OF EACH DATASETS AND COUNT OF S1 AND

S2 IN TO ONE VARIABLE AND EACH DATASET COUNT OF OBSE IN TO ANOTHER VARIABLE AND TARGET

VARIABLES COUNT AND INDIVIDUAL COUNT IN TO ANOTHER VARIABLE .IF I AM NOT CLEAR I HAVE GIVEN

THE EXAMPLE BELOW ,PLEASE HELP ME OUT.


OUTPUT:

INI_DSETNAME INTIAL_COUNT_OBS S_DS_NAME S1&S2COUNT S1&S2SUM T_DSNAME T1&T2COUNT T1&T2SUM
FINAL 10 S1 5 10 T1 5 10
FINAL 10 S2 5 10 T2 5 10
2 REPLIES 2
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Though your input data is not revealed, look at using PROC SUMMARY and then use PROC TRANSPOSE.

Scott Barry
SBBWorks, Inc.
Ksharp
Super User
I think sql dictionary table ( dictionary.tables ) will help you;
proc sql;
select memname,nobs
from dictionary.tables
where libname='WORK';
quit;


Ksharp

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

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
  • 2 replies
  • 821 views
  • 0 likes
  • 3 in conversation