![]() Chapter Contents |
![]() Previous |
![]() Next |
| DROP= |
| Valid in: | DATA step and PROC steps |
| Category: | Variable Control |
| Syntax | |
| Syntax Description | |
| Details | |
| Comparisons | |
| Examples | |
| Example 1: Excluding Variables from Input | |
| Example 2: Processing Variables without Writing Them to a Data Set | |
| See Also | |
Syntax |
| DROP=variable(s) |
| Details |
If the option is associated with an input data set, the variables are not available for processing. If the DROP= data set option is associated with an output data set, SAS does not write the variables to the output data set, but they are available for processing.
| Comparisons |
| Examples |
In this example, the variables SALARY and GENDER are not included in processing and they are not written to either output data set:
data plan1 plan2; set payroll(drop=salary gender); if hired<'01jan98'd then output plan1; else output plan2; run;
You cannot use SALARY or GENDER in any logic in the
DATA step because DROP= prevents the SET statement from reading them from
PAYROLL.
In this example, SALARY and GENDER are not written to PLAN2, but they are written to PLAN1:
data plan1 plan2(drop=salary gender); set payroll; if hired<'01jan98'd then output plan1; else output plan2; run;
| See Also |
| Data Set Options:
| |||
| Statements:
|
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.