BookmarkSubscribeRSS Feed
deleted_user
Not applicable
KINDLY HELP ME IN UNDERSTANDING THE code in the second line ( set sc.payroll1 ) below :-

data ticket_agents;
set sc.payroll1 (keep=IDNum JobCode Birth Gender Salary);
where JobCode like 'TA_';
run;

regards
markc
2 REPLIES 2
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
In addition to the SAS documentation, might I suggest the SAS support http://support.sas.com/ website which has much to offer (and it's free to use) for SAS-hosted manuals and supplemental technical and conference reference material. The website has a SEARCH facility or you can use your favorite Internet search choice, such as the Google advanced search argument below:

data step programming set statement site:sas.com

Here is a SAS SUGI/SGF conference tutorial paper for your consideration:

Programming with the KEEP, RENAME, and DROP Data Set Options
Stephen Philp, Pelican Programming, Los Angeles, CA

http://www2.sas.com/proceedings/sugi31/248-31.pdf

Scott Barry
SBBWorks, Inc.
deleted_user
Not applicable
Hi Mark,

If you are comfortable with SQL, in simple words-

set sc.payroll1 is equivalent to select * from sc.payroll1 where SC is the library where the dataset is stored and payroll1 is the dataset.

if you use the "keep" statement with the columns given below
select * -- changes to
select IDNum, JobCode, Birth, Gender, Salary from sc.payroll1.

setting the dataset basically copies the dataset into the input buffer for further use.

Thanks,
Saurabh.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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