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

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 1108 views
  • 0 likes
  • 2 in conversation