Hello! I am creating code that takes data from an excel file I imported, and creates a very specific listed and ordered output that a data entry person can then use to enter the data directly from the output into an online database (a lot of clicking to enter things into the database, we can't just copy and paste the SAS output). I created new variables using if-then statements. If my new variable's value is blank, I want to drop the variable from the output so it shows a cleaner output for the data entry person. I do not want to drop the observation itself, just a variable, and only IF it comes up blank. I am new and figured out that I have no idea how to appropriately use "drop" statements. Here is the code that I tried and obviously is wrong: data mmria.rename; set mmria.rename; if Cytomeglovirus= " " then drop; if GroupBStrep= " " then drop; if HIV= " " then drop; Can anybody help with the syntax that I should be using? Should I be trying a different logic to achieve what I want? All of the SAS community answers I filtered through are too advanced for me, I have no idea what people are doing. Thanks a bunch!!
... View more