BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hello,
Real simple question (Hopefully). In this simple script below, How do I choose which columns I want as the ouput to the data table "Scott_OUT"? For example ,say Scott_out has 3 columns, Name, address, and phone. What code do I use to post only 2 columns, say Name and Address, to the scott_out permanent data set?

LIBNAME Scott '/sas/userdata/Scott_Test';
data Scott_out;
set Scott.test;
run;
2 REPLIES 2
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
You will want to code a KEEP statement for your DATA step.

Scott Barry
SBBWorks, Inc.
deleted_user
Not applicable
Awesome, just what I was looking for. Thank you very much!

-Scott

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1074 views
  • 0 likes
  • 2 in conversation