SAS preparation session lab 1
* This is one way to write a note in SAS;
/* This is another way to write a note */
* This is a basic SAS program creating a temporary data set
SAS will create the data set, name it "prog1" and save it in the "work" library. "Prog 1" has three numeric variables
and three rows;
data prog1;
input var1 var2 _var3; datalines;
1 2 3
4 5 6
7 8 9
;
run;
* SAS data sets can have up to 412,977,617 variables & multiple millions of observations. Rows referred to as "observations" or "records";
* A variable name (e.g. "var1") can be a maximum
of 256 characters long. It must begin with either an alphabetic character or an underscore;
* An example of a data set with character variable; data prog2;
input var1 $ var2 _var3;
datalines; a 2 3
b 5 6
c 8 9
;
* Metadata;
* Labeling & formatting a variable;
* The label statement goes between the input and datalines statements;
data prog3;
input team $ ses ed_att $;
label team = "team's designation" ses = 'socioeconomic status' ed_att = 'educational attainment';
datalines; a 1 hs
b 2 sc
c 3 co
;
run;
proc format;
value $tm 'a' = 'team 1' 'b' = 'team 2' 'c' = 'team 3'; value stat 1 = 'lower' 2 = 'middle' 3 = 'upper';
value $ed 'hs' = 'high school' 'sc' = 'some college' 'co'
= 'college'; run;
proc print data = prog3 label;
format team $tm. ses stat. ed_att $ed.; run;
* Ok. Your turn
Create a sas data set using the data below. Give each variable a descriptive name.
Include a label and a format for the first and second variables;
c 1 80
c 2 88
c 3 80
c 4 99
c 5 100
t 6 70
t 7 72
t 8 83
t 9 71
t 10 94
* As written above, the data sets we created are temporary data sets. SAS will erase them
when we close the session. To keep the data set, store it in a permanent library;
CS 340 Milestone One Guidelines and Rubric Overview: For this assignment, you will implement the fundamental operations of create, read, update,
Retail Transaction Programming Project Project Requirements: Develop a program to emulate a purchase transaction at a retail store. This
7COM1028 Secure Systems Programming Referral Coursework: Secure
Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip
CS 340 Final Project Guidelines and Rubric Overview The final project will encompass developing a web service using a software stack and impleme