SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
Kelly8
Calcite | Level 5

My excel file has a column named "SUB" with numbers from 1 -30. When I run SAS, it keeps showing an error "Sub must use a numeric format". I've checked the excel and confirmed that SUB is in numerical format. 

Anyone can help solve this issue?

2 REPLIES 2
ballardw
Super User

Any time you get an error best practice is to include the code with all messages from the LOG. Copy the text from the log, on the forum open a text box using the </> and paste the copied text. The text box is important to preserve the formatting of the diagnostic characters that SAS often provides with errors. It also makes it easier to see where the discussion starts/ends separated from the actual log text.

 

Also may be a good idea to show us the result of running proc contents on your data set.

PaigeMiller
Diamond | Level 26

Agreeing with @ballardw show us the code, show us the ENTIRE log, show us the output from PROC CONTENTS.

 

You cannot use Excel to check whether the variable is numeric or character in SAS.

--
Paige Miller

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 727 views
  • 0 likes
  • 3 in conversation