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:August 21

From sasCommunity
Jump to: navigation, search

sasCommunity Tip of the Day

You don't have to memorize the exact syntax and all of the options of PROC EXPORT or PROC IMPORT, or go fumbling for the documentation every time you need to use them. Instead, create a PROC EXPORT template and a PROC IMPORT template for yourself using the wizards in SAS Display Manager. Then, copy and modify either template in your programs to suit your particular needs.

In SAS Display Manager, select: <File>, then <Export Data>. Choose the SASHELP.CLASS SAS data set just to have something to work with. Then, go through all of the subsequent windows, choosing all of the available options. When you get to the window that states:

The EXPORT wizard can create a file containing PROC EXPORT commands that can be used in SAS programs to export this data again. If you want these statements to be generated, enter the filename where they should be saved.

...simply choose a directory and then a meaningful program name, such as "Export to Excel". When you click <Finish>, you will have a SAS program that looks something like this:

            OUTFILE= "C:\Documents and Settings\RAITHEL_M\SAS Class.XLS" 
     RANGE="SAS Class"; 

You can reverse this process with the Import Data wizard to create a PROC IMPORT template.

Submitted by Michael A. Raithel, The man who wrote the book on performance.. Contact me at my Discussion Page.

Feel free to comment on this tip.

Prior tip - Next tip - Random Tip

Submit a Tip