BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Phil_NZ
Barite | Level 11

Hi SAS Users!

 

When I use PROC MEANS, the results created by SAS EG is under HTML form, can I ask how come we change this result to sas7bdat form? 

Because when I run the code

      proc means data=argentina_ n nmiss mean p1 median p99 std min max;
      run;

It turn out a result like that

My97_0-1612300398266.png

My concern is the output name HTML- 10.out macro where 10.out macro is the name of the project. Now I want to change from HTML to sas7bdat and 10.out macro to argentina__ (cats(argentina_,"_")).

 

Could you please give any suggestion?

 

Many thanks and warm regards.

 

 

Thank you for your help, have a fabulous and productive day! I am a novice today, but someday when I accumulate enough knowledge, I can help others in my capacity.
1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

Depends a bit on exactly how you want the data outputted, there are many options to control it. 

Assuming you just want what you see, make sure to use the STACKODS option.

 

https://documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.5&docsetId=proc&docsetTarget=p17h6q7...

 

proc means data=sashelp.class STACKODSOUTPUT;
class sex;
var weight height;
ods output summary=stacked;
run;

Data is saved to a data set called STACKED.

 


@Phil_NZ wrote:

Hi SAS Users!

 

When I use PROC MEANS, the results created by SAS EG is under HTML form, can I ask how come we change this result to sas7bdat form? 

Because when I run the code

      proc means data=argentina_ n nmiss mean p1 median p99 std min max;
      run;

It turn out a result like that

My97_0-1612300398266.png

My concern is the output name HTML- 10.out macro where 10.out macro is the name of the project. Now I want to change from HTML to sas7bdat and 10.out macro to argentina__ (cats(argentina_,"_")).

 

Could you please give any suggestion?

 

Many thanks and warm regards.

 

 


 

View solution in original post

1 REPLY 1
Reeza
Super User

Depends a bit on exactly how you want the data outputted, there are many options to control it. 

Assuming you just want what you see, make sure to use the STACKODS option.

 

https://documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.5&docsetId=proc&docsetTarget=p17h6q7...

 

proc means data=sashelp.class STACKODSOUTPUT;
class sex;
var weight height;
ods output summary=stacked;
run;

Data is saved to a data set called STACKED.

 


@Phil_NZ wrote:

Hi SAS Users!

 

When I use PROC MEANS, the results created by SAS EG is under HTML form, can I ask how come we change this result to sas7bdat form? 

Because when I run the code

      proc means data=argentina_ n nmiss mean p1 median p99 std min max;
      run;

It turn out a result like that

My97_0-1612300398266.png

My concern is the output name HTML- 10.out macro where 10.out macro is the name of the project. Now I want to change from HTML to sas7bdat and 10.out macro to argentina__ (cats(argentina_,"_")).

 

Could you please give any suggestion?

 

Many thanks and warm regards.

 

 


 

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 1 reply
  • 397 views
  • 1 like
  • 2 in conversation