# Ex4 - r title2 'New Price List'; proc print data=prices;...

This preview shows pages 1–2. Sign up to view the full content.

dm 'log;clear;output;clear;'; options ps=50 ls=75 pageno=1; o *********************************************************************; ** **; ** COURSE: STAT 6360 **; ** PURPOSE: In Class Exercise 4 **; *********************************************************************; * *4-1; * *The following title will appear as the first line of every page in the output window; title1 'Problem 4-1, STAT 6360'; t data regular; infile 'K:\6360\InClassExercise\Exercise4\Shoe.txt' firstobs=2; input Style \$ 1-15 ExerciseType \$ RegularPrice; run; r data discount; infile 'K:\6360\InClassExercise\Exercise4\Disc.txt' firstobs=2; input ExerciseType \$ Adjustment; run; r proc sort data=regular; by ExerciseType; run; r proc sort data=discount; by ExerciseType; run; r *Perform many-to-one match merge; data prices; merge regular discount; by ExerciseType; NewPrice=RegularPrice-RegularPrice*Adjustment; run;

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: r title2 'New Price List'; proc print data=prices; run; r *4-2; * *The following title will appear as the first line of every page in the output window; title1 'Problem 4-2, STAT 6360'; t *a; data south; infile 'K:\6360\InClassExercise\Exercise4\South.txt' firstobs=2; input Entrance \$ PassNumber PartySize Age; run; r data north; infile 'K:\6360\InClassExercise\Exercise4\North.txt' firstobs=2; input Entrance \$ PassNumber PartySize Age Lot; run; r *b; proc sort data=south; by PassNumber; run; r proc sort data=north; by PassNumber; run; r data interleave; set south north; by PassNumber; run; r proc print data=interleave; run; r *c; data paid; set south north; if Age&lt;3 then AmountPaid=0; else if Age&lt;65 then AmountPaid=35; else AmountPaid=27; e format AmountPaid dollar3. run; r proc print data=paid; run;...
View Full Document

## This note was uploaded on 06/06/2011 for the course STAT 4360 taught by Professor Park during the Spring '11 term at University of Georgia Athens.

### Page1 / 2

Ex4 - r title2 'New Price List'; proc print data=prices;...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online