Dear experts,
I have a large excel file which i want to do error check for quality control report. After importing to SAS i want to do the following the quality control checks that need to be performed on the catalog file:
libname xlsx "c\temp\catalog.xlsx";
example data:
infile xlsx;
Cata ID1 | Cata ID2 | Cata Course Title | Level | SCED | Course Level | Credit | Seq/Total | Spec.Ed | Course language | Online |
1 | 00128 | Project Management | I-IV | 22998 | G | 1 | 1/16 | N | English | N |
2 | 00300 | IT and Computer Science | I-III | 22004 | G | 4 | 1/1 | N | French | Y |
3 | 00400 | Cybersecurity | I-IV | 22004 | G | 0.5 | 1/1 | N | English | Y |
4 | 00107 | Management | I-IV | 22004 | G | 0.5 | 1/1 | N | French | N |
5 | 01111 | SQL | I-III | 01001 | G | 0.5 | 1/1 | N | English | N |
6 | 01112 | SAS | I-III | 01002 | G | 3 | 1/1 | N | English | N |
7 | 01113 | .NET | I-II | 01003 | G | 0.5 | 1/1 | N | Spansh | N |
8 | 01114 | Sharepoint | I-V | 01004 | G | 0.5 | 1/1 | N | English | N |
9 | 01350 | R | I-V | 22003 | G | 0.5 | 1/1 | N | English | N |
Any idea and suggestion would be appreciated.
Thanks
You can use SQL and compare if count(distinct cat_id1) equals count(cata_id1), similar for other variables that need to be unique.
The check for the format can be done by controlling for countw(level,'-') = 2.
For detailed help, show the code you already tried.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.