Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

College Algebra Enhanced With Graphing Utilities (Subscription)

Authors: Michael Sullivan, Michael Sullivan III

6th Edition

0321849167, 9780321849168

More Books

Students also viewed these Mathematics questions

Question

What are the short- and long-term effects of stress on the body?

Answered: 1 week ago

Question

L A -r- P[N]

Answered: 1 week ago

Question

1. To gain knowledge about the way information is stored in memory.

Answered: 1 week ago