BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Ugendhar
Calcite | Level 5

In the sas programming when we using proc means 

1. when we create a dataset by using output statement in the proc means the descriptve statistics will be saved as numerical variables in the dataset , Is there any option to convert those numerical variables into character variables ?

2. if we want to controll the number of decimlas has to be present in the ouputted dataset , Is there any specific option/statement that we can use to controll it.

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

@Ugendhar wrote:

In the sas programming when we using proc means 

1. when we create a dataset by using output statement in the proc means the descriptve statistics will be saved as numerical variables in the dataset , Is there any option to convert those numerical variables into character variables ?

 

No, conversion of data types should be done in a different step after the PROC MEANS.

 

2. if we want to controll the number of decimlas has to be present in the ouputted dataset , Is there any specific option/statement that we can use to controll it.



There is a MAXDEC option on PROC MEANS that applies to the displayed output, but does not apply to the data set. For this, again you need to format the data after in a separate step. 

View solution in original post

1 REPLY 1
Reeza
Super User

@Ugendhar wrote:

In the sas programming when we using proc means 

1. when we create a dataset by using output statement in the proc means the descriptve statistics will be saved as numerical variables in the dataset , Is there any option to convert those numerical variables into character variables ?

 

No, conversion of data types should be done in a different step after the PROC MEANS.

 

2. if we want to controll the number of decimlas has to be present in the ouputted dataset , Is there any specific option/statement that we can use to controll it.



There is a MAXDEC option on PROC MEANS that applies to the displayed output, but does not apply to the data set. For this, again you need to format the data after in a separate step. 

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 16. 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
  • 1 reply
  • 559 views
  • 0 likes
  • 2 in conversation