Previous Page | Next Page

Examples of Data Transfer Services (DTS)

Example 6. DTS: Transferring Data by Using Data Set Options and Attributes


Purpose

PROC UPLOAD and PROC DOWNLOAD permit you to specify SAS data set options in the DATA= and OUT= options. Note that SAS data set options are not supported when using the INLIB= and OUTLIB= options, even when you upload only data sets.

The data set options must be associated with a specific SAS data set, so they must be used in the DATA= or OUT= options. For details about additional restrictions, see The UPLOAD Procedure and The DOWNLOAD Procedure.

This example illustrates using the DATA= option and the INDEX=NO option. It also shows the use of the RENAME= and DROP= SAS data set options.

Note:   Because the OUT= option is not specified, the transferred data set inherits all the characteristics of the input data set except for the index (because the INDEX=NO option is specified).  [cautionend]


Program

rsubmit;
data survey(compress=yes index=(comments));
 r='response';
 comments='comments';
 x=1;
run;

proc download data=survey
   (rename=(r=response) drop=comments)
   index=no;
run;

Previous Page | Next Page | Top of Page