0
votes

proc format; value $STNAME 'AL'='Alabama' 'AK'='Alaska 'AR'='Arkansas' 'AZ'='Arizona' 'CA'='California' 'CO'='Colorado' 'CT'='Connecticut' 'DC'='DistrictOfColumbia' 'DE'='Deleware' 'FL'='Florida' 'GA'='Georgia' 'HI'='Hawaii' 'IA'='Iowa' 'ID'='Idaho' 'IL'='Illinois' 'IN'='Indiana' 'KS'='Kansas' 'KY'='Knetucky' 'LA'='Louisiana' 'MA'='Massachusetts' 'MD'='Maryland' 'ME'='Maine' 'MI'='Michigan' 'MN'='Minnesota' 'MO'='Missouri' 'MS'='Mississippi' 'MT'='Montana' 'NC'='North Carolina' 'ND'='North Dakota' 'NE'='Nebraska' 'NH'='New Hampshire' 'NJ'='New Jersey' 'NM'='New Mexico' 'NY'='New York' 'NV'='Nevada' 'OH'='Ohio' 'OK'='Oklahoma' 'OR'='Oregon' 'PA'='Pennsylvania' 'RI'='Rhode Island' 'SC'='South Carolina' 'SD'='South Dakota' 'TN'='Tennessee' 'TX'='Texas' 'UT'='Utah' 'VA'='Virginia' 'VT'='Vermont' 'WA'='Washington' 'WI'='Wisconsin' 'WV'='West Virginia' 'WY'='Wyoming'; run;

It freezes up in the middle of the proc format step. If I split I shorten it, it runs fine. Anyone aware how to get around this?

2

2 Answers

1
votes

You are missing a closing quote on Alaska. I placed the code in my IDE and I could tell from the highlighting.

0
votes

As long as your hard drive can hold the SAS program file, it does not have a limit on the number of unique values inside a proc format or the amount of memory needed to load it. As @Carolina has suggested you are missing an end quote for Alaska. If there is no end quote, the states after Alaska are in a different color. After you add the end quote, the highlighting after Alaska should change to a unanimous color.

Like this: screenshot link

It might be better to use more conventional spacing for better readability. Also, you might want spaces between 'DistrictOfColumbia' and Kentucky is spelt incorrectly. Hope this helps.