BookmarkSubscribeRSS Feed
Smitha9
Fluorite | Level 6

I will be getting the dataset everyweek which contains specific varaibles.

I have the check the errors and report it.

Example:

Dataset has a variable names:

CustomerID     CustomerAge    CustomerDOB    Purchase   Type    Model

      1111                     70                 10/20/1990           Cartel       Eco        X

The errors I need to check with the above dataset:

1. Check the order of the variables of the dataset. Make sure the order is exactly like above.

2. Check the spelling of the variable names.

3. Any missing values flag it and report.

4. Check the CustomerAge if negative and if negative flag it.

 

 

thank you in advance.

 

4 REPLIES 4
Smitha9
Fluorite | Level 6
I receive the SAS dataset
ballardw
Super User

@Smitha9 wrote:
I receive the SAS dataset

Then WHY does order of variables matter? Really. SAS does not care about the order of the variables generally.

And why would the variable names change? If that is happening then the problem is before you get the data and a process is likely the thing that needs correction.

 

How do you want the data flagged? Do you want one new variable for each existing variable to hold a "missing" flag value? One variable that holds information for all variables that may be missing?

What does the report of missing data look like? There are many ways to report on such.

Should the flag for negative age be a separate variable? or a different value in the Flag that would hold the "missing" age flag?

Kurt_Bremser
Super User

@Smitha9 wrote:
I receive the SAS dataset

Then the order of variables is irrelevant.

Finding incorrect spelling can be done by comparing the sashelp.vcolumn entries for your old and the new dataset.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

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