Learning SAS? Welcome to the exclusive online community for all SAS learners.

Format Command Error

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 9
Accepted Solution

Format Command Error

ERROR: You are trying to use the character format $RACE_FM with the numeric variable num_race in

       data set CDRIVE.BANK_PRICING.

I am getting above mentioned error, while executing SAS code. I request all of you to help me in this.

Let me know if more information or details required.

Thanks in Advance.


Accepted Solutions
Solution
‎06-25-2015 10:56 AM
Super User
Posts: 10,466

Re: Format Command Error

You have created, or are using a Format named $race_fm. The variable you are attempting to use that format to display values is Numeric, in this case Race_num. Either create a new format that is not defined with the $ so it will work with numeric values OR recreate the variable as Character OR add a new race variable that is character.

Pretty self explanatory as error messages go.

View solution in original post


All Replies
Solution
‎06-25-2015 10:56 AM
Super User
Posts: 10,466

Re: Format Command Error

You have created, or are using a Format named $race_fm. The variable you are attempting to use that format to display values is Numeric, in this case Race_num. Either create a new format that is not defined with the $ so it will work with numeric values OR recreate the variable as Character OR add a new race variable that is character.

Pretty self explanatory as error messages go.

Occasional Contributor
Posts: 9

Re: Format Command Error

Thanks for the help ballardw it resolved the issue. Thanks again.

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 267 views
  • 0 likes
  • 2 in conversation