Manipulating Text Fields in SAS: Compress, Tranwrd and Scan
by Sata Hackenbruck
This paper discusses how to use the COMPRESS, TRANWRD, and SCAN functions to manipulate text fields.
Often in medical research, prescription drugs may have many variations in their name. For example, a data-set may show "Fentanyl Citrate" as "Fentanyl Citrate Buccal Tab 100 MCG (Base Equiv)," "Fentanyl Citrate Inj 0.05 MG/ML," "Fentanyl Citrate Lollipop 1600 MCG," etc. This paper shows how to use Compress, Tranwrd, and Scan to condense these variations to their common name, to allow for easy categorization.
- Manipulating Text Fields in SAS, by Sata Hackenbruck, Oregon Department of Consumer and Business Services