As the first step in the decommissioning of the site has been converted to read-only mode.

Here are some tips for How to share your SAS knowledge with your professional network.

Tip of the Day:July 22

From sasCommunity
Jump to: navigation, search

sasCommunity Tip of the Day

Occasionally, some SAS users might need to use a simple data step with datalines input. However, for certain cases, quoted text might be required. Under normal circumstances, this will cause error due to delimiters in data. However, we can use the tilde format modifier to change the behavior of how the data are read in.

data scores;
   infile datalines dsd;
   input Name : $9. Score1-Score3 
         Team ~ $25. Div $;
Joseph,11,32,76,"Red Racers, Washington",AAA
Mitchel,13,29,82,"Blue Bunnies, Richmond",AAA
Sue Ellen,14,27,74,"Green Gazelles, Atlanta",AA
                        The SAS System                        1
OBS Name      Score1 Score2 Score3           Team            Div
 1  Joseph      11     32     76   "Red Racers, Washington"  AAA
 2  Mitchel     13     29     82   "Blue Bunnies, Richmond"  AAA
 3  Sue Ellen   14     27     74   "Green Gazelles, Atlanta" AA

Submitted by Murphy Choy. Contact me at my Discussion Page.

Feel free to comment on this tip.

Prior tip - Next tip - Random Tip

Submit a Tip