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: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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