SAS: How to check if a sub-string is present on a char variable in SAS?

This is a very common use case where we need to write code to check if a substring is present on a character variable in SAS. That substring can be a character string, a character, or any special character. Depending on the outcomes you can perform your specific operations.  You can achieve this by using … Read more

The FIND Function in SAS (FIND v/s FINDC v/s FINDW)

The FIND function in SAS searches for a specific substring in a given string or character variable and returns the position of its first occurrence.  The FIND function is mostly used where any specific character, keyword, or phrase you want to identify, and/or extract. It is especially helpful when you read raw, scattered, and long … Read more

PROC SQL: How to ALTER table and UPDATE columns in SAS Data Set

The ALTER TABLE statement is used to add new variables, delete existing variables, or modify format of variables.  This method gives you more flexibility while adding new variables or modifying existing ones. It is also possible to add values on those newly added columns with UPDATE TABLE statement. The following example demonstrates that two new … Read more