Hi,
Thanks for sharing the code, but I'm not sure I understand your requirement. The code indicates you only want observations that contain the quoted strings ("ARIPIPRAZOLE", "ASENAPINE", "BREXPIPRAZOLE", etc.) in the variable GENERIC_DRUG_NAME. If there are other observations that you also require then have you tried adding the conditions for them to your where clause?
By default SAS performs case sensitive checks when comparing strings, so if your data is not in uppercase as per your code, then this will need to be fixed.
It would help if you supplied some example input data (ideally in the form of a data step) and what the corresponding output data should look like, with your reasons why you expect the data that is not appearing in your results.
Thanks & kind regards,
Amir.
... View more