Search the site...

SASCRUNCH TRAINING
  • Home
  • Member's Area
  • How to Start
  • SAS Interface
  • Creating a Data Set
  • Practical SAS Training Course
  • SAS Certified Specialist Training Program
  • Proc SQL Course
  • Introduction to Time Series Analysis
  • SAS Project Training Course
  • Full Training / Membership
  • Sign up
  • About us
  • Contact us
  • Home
  • Member's Area
  • How to Start
  • SAS Interface
  • Creating a Data Set
  • Practical SAS Training Course
  • SAS Certified Specialist Training Program
  • Proc SQL Course
  • Introduction to Time Series Analysis
  • SAS Project Training Course
  • Full Training / Membership
  • Sign up
  • About us
  • Contact us
Sentry Page Protection
Please Wait...
Coding Exercise (Answer)

Exercise 1

Answer:
Proc Format;
Value Ques 
1= "Strongly Disagree"
2= "Somewhat Disagree"
3= "Neither Agree nor Disagree"
4= "Somewhat Agree"
5= "Strongly Agree";
Run;

Data Survey2;
Set Survey;
Format Q1 Q2 Q3 Ques.;
Label
Q1 = "Customer service representatives (CSRs) are well supervised."
Q2 = "Customer service representatives (CSRs) adhere to professional standards of conduct."
Q3 = "Customer service representatives (CSRs) act in my best interest.";
Run;

​
Exercise 2
Answer:
Data Listing2;
Set Listing;

Format DateList2 Date9. NumMth2 Best. Price2 dollar8.;

DateList2 = input(DateList, date9.);
NumMth2 = input(NumMth, best.);
Price2 = input(Price, dollar8.);

Drop DateList NumMth Price;
Run;

​
Exercise 3

Answer:
proc contents data=sashelp.jac;
run;

There are 5 variables and 7923 observations in the data set.


Exercise 4

Answer:
data temp2;
set temp;
format fah 4.1;
Fah = temp * 9/5 + 32;
run;
Next
Already a member? Go to member's area.