BookmarkSubscribeRSS Feed
AG_Stats
Quartz | Level 8

Hi,

 

Below is a short program having some one-to-one and many-to-one formats.  I want a dataset for the same and want to use that dataset as formats.  Also I have attached a txt file containing all values and required labels (in which you can change, if required "low" to 0 and "high" to 100 for age formats):

proc format library=myfmts;
	value $gender 'M'='Male' 'F'='Female' ' '='Not entered' other='Miscoded';
	value age low-29='Less than 30' 30-50='30 to 50' 51-high='51+';
	value $likert '1'='Strongly disagree' '2'='Disagree' '3'='No opinion' 
		'4'='Agree' '5'='Strongly agree';
        value $likert_new '1'-'3' = 'Agree' '4','5' = 'Disagree';
run;

Please give me required sas codes.

Regards,
AG_Stats
1 REPLY 1
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Option is cntlout=, e.g.:

proc format cntlout=work.formats_dataset...

 

SAS Manual:

http://support.sas.com/kb/22/194.html

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 873 views
  • 4 likes
  • 2 in conversation