Proc Format

Reply
Frequent Contributor
Posts: 75

Proc Format

I  tried defining a new format based on the below range

proc format;

value NEWOutSDRenoLoan

'low-< 50' = '$0-<$50'

'50-<100' = '$50-<$100'

'100-<200' = '$100-<$200'

'200-<400' = '$200-<$400'

'400-<800' = '$400-<$800'

'800-high' = 'Above $800'

;

run;

But I get a error. It is for a numeric value

ERROR: The quoted string 'low-< 50' is not acceptable to a numeric format or informat.

Trusted Advisor
Posts: 1,128

Re: Proc Format

Please try ,

as it is a numeric values no need to keep the quotes

proc format;

value NEWOutSDRenoLoan

low-< 50 = '$0-<$50'

50-<100 = '$50-<$100'

100-<200 = '$100-<$200'

200-<400 = '$200-<$400'

400-<800 = '$400-<$800'

800-high = 'Above $800'

;

run;

Thanks,

Jagadish

Thanks,
Jag
Respected Advisor
Posts: 3,124

Re: Proc Format

Is the target value numeric or char? if char, then you need adding '$' in front of the format name "NEWOutSDRenoLoan" to identify it as what it is: value $NEWOutSDRenoLoan

Or if numeric, then you need to remove those quotes from your format definitions:

low-< 50 = '$0-<$50'

Haikuo

Ask a Question
Discussion stats
  • 2 replies
  • 1012 views
  • 0 likes
  • 3 in conversation