DATA Step, Macro, Functions and more

Proc format all possible values of a variable

Reply
Occasional Contributor
Posts: 6

Proc format all possible values of a variable

Hi,

What i need to do is create format for all possible values of a variable using proc format

For example if i have country_code and country_name as fields, what i want to do is

Proc format;

values $cntry

                    "US" = ""UNITED STATES OF AMERICA

                    "IND" = "INDIA"

                    ....

                    ....

                    till all possible values

run;

How can i do that in macros? What i did was took all possible values in different macros using call symput and count also but dont know how to write out the values part.

Regards,

Saurabh

Super Contributor
Posts: 1,636

Re: Proc format all possible values of a variable

Posted in reply to Saurabh_Amar

you can use your dataset to create format. search create format from sas dataset:

http://www2.sas.com/proceedings/forum2007/068-2007.pdf

Ask a Question
Discussion stats
  • 1 reply
  • 217 views
  • 1 like
  • 2 in conversation