BookmarkSubscribeRSS Feed
Camem
Calcite | Level 5

I am very new to SAS and having difficulties here.

 

I am trying to take the sum of the variables from output table and make it into a SAS file, so that I can make a graph.

How can I use ODS OUTPUT to make a file? Or is there some other ways?

Variables are numeric values.

 

Here are my CODE:

DATA DRUG;

SET MEPS;

RUN;

 

proc surveymeans data=DRUG sum;

        STRATUM VARSTR;

        CLUSTER VARPSU;

        WEIGHT PERWT11F;

        VAR VAR1-VAR11;

RUN;

Thank you

1 REPLY 1
Reeza
Super User

You need to use ODS statements, add this before or in the PROC.

 

ods output statistics = want1 summary = want2;

@Camem wrote:

I am very new to SAS and having difficulties here.

 

I am trying to take the sum of the variables from output table and make it into a SAS file, so that I can make a graph.

How can I use ODS OUTPUT to make a file? Or is there some other ways?

Variables are numeric values.

 

Here are my CODE:

DATA DRUG;

SET MEPS;

RUN;

 

proc surveymeans data=DRUG sum;

        STRATUM VARSTR;

        CLUSTER VARPSU;

        WEIGHT PERWT11F;

        VAR VAR1-VAR11;

RUN;

Thank you


 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 193 views
  • 0 likes
  • 2 in conversation