Question
sas NEED HELP WITH SAS FORMATTING - NO ACTUAL DATA SET PROVIDED, QUESTION IS WHAT WORD TO USE pointing to a data set employee_organization. department
sas
NEED HELP WITH SAS FORMATTING - NO ACTUAL DATA SET PROVIDED, QUESTION IS WHAT WORD TO USE
pointing to a data set employee_organization. department variables include administration, stock & shipping, and purchasing.
GIVEN CODE
libname prg2 '/home/STA; proc freq data=prg2.employee_organization ; tables department; run; TO DO
Use a single data step and conditional output to create three files:
work.admin should contain observations for which Department is Administration.
work.stock should contain observations for which Department is Stock & Shipping.
work.purchasing should contain observations for which Department is Purchasing.
Check the log to make sure the number of observations on the created data sets matches those displayed in the results of the proc freq step above.
Use three proc print steps to print the first 3 observations on each of the created data sets.
Having trouble finding correct code where i use conditional output and a single data step
ive tried
data work.admin work.stock work.purchasing; set prg2.employee_organization; if Department ='administration' then output work.admin; if department ='Stock & shipping' then output work.stock; if Department ='purchasing' then output work.purchasing; run; proc print data=work.admin(obs=3); proc print data=work.stock(obs=3); proc print data=work.purchasing(obs=3); run;
but it gives no output data. i also have tried putting a keep statement to keep only department variable but it doesn't work.
NO CODE NEEDED to answer just a syntax question
NO DATA SET NEEDED
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started