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-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 616 views
  • 0 likes
  • 4 in conversation