BookmarkSubscribeRSS Feed
Rsadiq
Calcite | Level 5

Hello

 

My data or variables is giving me this error, from the data. I do not have these variables stated anywhere in my code, but I think maybe its a formatting solution to this error?

 

 

        
52         %macro step0 ;
53         data sasdata.dialerfiles;
54         set /*dialer.mcp_manual_20170124*/
55         dialer2.qual_not_on_dialer_20170101
56         dialer2.march_dialer ;
57         run;
58         %mend step0;
59         %step0;
ERROR: Variable PHONE1 has been defined as both character and numeric.
ERROR: Variable REF7 has been defined as both character and numeric.
ERROR: Variable REF16 has been defined as both character and numeric.
ERROR: Variable PHONE2 has been defined as both character and numeric.
ERROR: Variable Mbr_ID_Indv has been defined as both character and numeric.
ERROR: Variable MBR_PGM_TYPE_ID has been defined as both character and numeric.

3 REPLIES 3
Kurt_Bremser
Super User

The variables are defined differently in both datasets. Either convert them, or make sure you get them correctly typed from the source.

PGStats
Opal | Level 21

You are concatenating two datasets, but the named variables (PHONE1, etc.) have different types in datasets dialer2.qual_not_on_dialer_20170101 and dialer2.march_dialer. Those variables will need to be converted in one of the datasets prior to concatenation.

PG
ballardw
Super User

Note that this is a common occurence when relying on Proc Import to bring data into SAS. Import is a guessing procedure and if your data field contents are inconsistent then supposely identical layout files are read with different rules creating numeric variables from one and character from another file.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 3 replies
  • 795 views
  • 0 likes
  • 4 in conversation