Learn SAS

Learn about the latest tips, tutorials, upcoming events and certifications

Learn SAS
Jim Simon 3
DATA STEP text file tricks

When reading a text file (common extensions: TXT, DAT; or, for the adventurous: HTML) with the DATA STEP, you should always view several lines from the text file, and compare to the record layout, before completing the INPUT statement.  There are many ways to view a text file.  I use

Learn SAS
Jim Simon 3
Weird PROC FREQ trick

Default PROC FREQ output looks like this: Suppose you don't want the two cumulative statistic columns above.  No problem.  Those can be suppressed with the NOCUM option on the TABLE statement, like this: proc freq data=sashelp.shoes; table product / nocum; run;

Learn SAS
Jim Simon 8
Dataset too big for PROC PRINT?

Dataset too big for PROC PRINT? One weird trick solves your problem! proc print data=bigdata (obs=10); run; The OBS= dataset option specifies the last observation to process from an input dataset. In the above example, regardless of dataset size, only the first 10 observations are printed; an easy way to

1 21 22 23 24 25 56

Back to Top