For an input data set, excludes the specified columns from processing; for an output data set, excludes the specified columns from being written to the data set.
Valid in: | DATA and PROC steps |
Category: | Variable Control |
Supports: | All |
lists one or more column names. You can list the columns in any form that SAS allows.
data payroll; input idnum $3. +3 gender $1. +4 jobcode $3. +9 salary 5. +2 birth date7. +2 hired date7.; informat birth date7. hired date7.; format birth date7. hired date7.; datalines; 919 M TA2 34376 12SEP60 04JUN87 653 F ME2 35108 15OCT64 09AUG90 400 M ME1 29769 05NOV67 16OCT90 350 F FA3 32886 31AUG65 29JUL90 401 M TA3 38822 13DEC50 17NOV85 499 M ME3 43025 26APR54 07JUN80 101 M SCP 18723 06JUN62 01OCT90 333 M PT2 88606 30MAR61 10FEB81 402 M TA2 32615 17JAN63 02DEC90 479 F TA3 38785 22DEC68 05OCT89 403 M ME1 28072 28JAN69 21DEC91 739 M PT1 66517 25DEC64 27JAN91 658 M SCP 17943 08APR67 29FEB92 428 F PT1 68767 04APR60 16NOV91 782 M ME2 35345 04DEC70 22FEB92 244 M ME2 36925 31AUG63 17JAN88 383 M BCK 25823 25JAN68 20OCT92 574 M FA2 28572 27APR60 20DEC92 789 M SCP 18326 25JAN57 11APR78 404 M PT2 91376 24FEB53 01JAN80 437 F FA3 33104 20SEP60 31AUG84 639 F TA3 40260 26JUN57 28JAN84 269 M NA1 41690 03MAY72 28NOV92 065 M ME2 35090 26JAN44 07JAN87 876 M TA3 39675 20MAY58 27APR85 037 F TA1 28558 10APR64 13SEP92 129 F ME2 34929 08DEC61 17AUG91 988 M FA3 32217 30NOV59 18SEP84 405 M SCP 18056 05MAR66 26JAN92 430 F TA2 32925 28FEB62 27APR87 983 F FA3 33419 28FEB62 27APR87 134 F TA2 33462 05MAR69 21DEC88 118 M PT3 111379 16JAN44 18DEC80 438 F TA3 39223 15MAR65 18NOV87 125 F FA2 28888 08NOV68 11DEC87 475 F FA2 27787 15DEC61 13JUL90 117 M TA3 39771 05JUN63 13AUG92 935 F NA2 51081 28MAR54 16OCT81 124 F FA1 23177 10JUL58 01OCT90 422 F FA1 22454 04JUN64 06APR91 616 F TA2 34137 01MAR70 04JUN93 406 M ME2 35185 08MAR61 17FEB87 120 M ME1 28619 11SEP72 07OCT93 094 M FA1 22268 02APR70 17APR91 389 M BCK 25028 15JUL59 18AUG90 905 M PT1 65111 16APR72 29MAY92 407 M PT1 68096 23MAR69 18MAR90 114 F TA2 32928 18SEP69 27JUN87 410 M PT2 84685 03MAY67 07NOV86 439 F PT1 70736 06MAR64 10SEP90 409 M ME3 41551 19APR50 22OCT81 408 M TA2 34138 29MAR60 14OCT87 121 M ME1 29112 26SEP71 07DEC91 991 F TA1 27645 07MAY72 12DEC92 102 M TA2 34542 01OCT59 15APR91 356 M ME2 36869 26SEP57 22FEB83 545 M PT1 66130 12AUG59 29MAY90 292 F ME2 36691 28OCT64 02JUL89 440 F ME2 35757 27SEP62 09APR91 368 M FA2 27808 11JUN61 03NOV84 369 M TA2 33705 28DEC61 13MAR87 411 M FA2 27265 27MAY61 01DEC89 113 F FA1 22367 15JAN68 17OCT91 704 M BCK 25465 30AUG66 28JUN87 900 M ME2 35105 25MAY62 27OCT87 126 F TA3 40899 28MAY63 21NOV80 677 M BCK 26007 05NOV63 27MAR89 441 F FA2 27158 19NOV69 23MAR91 421 M TA2 33155 08JAN59 28FEB90 119 M TA1 26924 20JUN62 06SEP88 834 M BCK 26896 08FEB72 02JUL92 777 M PT3 109630 23SEP51 21JUN81 663 M BCK 26452 11JAN67 11AUG91 106 M PT2 89632 06NOV57 16AUG84 103 F FA1 23738 16FEB68 23JUL92 477 M FA2 28566 21MAR64 07MAR88 476 F TA2 34803 30MAY66 17MAR87 379 M ME3 42264 08AUG61 10JUN84 104 M SCP 17946 25APR63 10JUN91 009 M TA1 28880 02MAR59 26MAR92 412 M ME1 27799 18JUN56 05DEC91 115 F FA3 32699 22AUG60 29FEB80 128 F TA2 32777 23MAY65 20OCT90 442 F PT2 84536 05SEP66 12APR88 417 M NA2 52270 27JUN64 07MAR89 478 M PT2 84203 09AUG59 24OCT90 673 M BCK 25477 27FEB70 15JUL91 839 F NA1 43433 29NOV70 03JUL93 ;
data myfiles.plan1 myfiles.plan2; set myfiles.payroll (drop=salary gender); if hired <'01jan98'd then output myfiles.plan1; else output myfiles.plan2; run;
proc print data=myfiles.plan1(obs=2); title 'plan1'; proc print data=myfiles.plan2(obs=2); title 'plan2'; run;
data myfiles.plan1 myfiles.plan2 (drop=salary gender); set myfiles.payroll; if hired <'01jan98'd then output myfiles.plan1; else output myfiles.plan2; run;