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.
Same question as in your other thread: how do you receive your data (file format, transmission path, ...)
@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?
@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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.