These can all be accomplished with SAS functions.
This list has SAS functions by category so you can search for the function that you need.
http://support.sas.com/documentation/cdl/en/lefunctionsref/69762/HTML/default/viewer.htm#p0w6napahk6x0an0z2dzozh2ouzm.htm
Pas an example:
1. SUBSTR() to take a portion of a string.
2. SCAN() allows you to extract strings based on a delimiter
2. TRANWRD() allows you to replace a word
FYI - the number of rows doesn't matter. The code is the same unles you maybe have 20 million plus. Then you'll save time processing.
Data example;
Set SASHELP.class;
Name = substr(name, 1,5); *takes first 5 characters of the name;
Sample_text = "Hudson County";
County = scan(sample_text, 1);
Run;
Proc print data=example;
Run;
... View more