assignment1

assignment1 - dm 'log;clear;output;clear;'; o options ps=50...

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

View Full Document Right Arrow Icon
dm 'log;clear;output;clear;'; options ps=50 ls=75 pageno=1; o *********************************************************************; ** PURPOSE: Assignment 1 **; *********************************************************************; * *The following title will appear as the first line of the first question in the output window; title1 'Question 1'; t *1a; title2 'a. Create data called stocks with formatted input'; t data sasdata.stocks; infile 'K:\6360\Assignments\Assignment1\stockprices.txt'; input @1 Stock $ 4. @5 PurDate mmddyy10. @15 PurPrice dollar6.1 @21 Number 4. @25 SellDate mmddyy10. @35 SellPrice dollar6.1; run; r *1b; title3 'b. List of the 3 and 4 observations'; t proc print data=sasdata.stocks (firstobs=2 obs=4); format PurDate mmddyy10. PurPrice dollar6.1 SellDate mmddyy10. SellPrice dollar6.1; run; r *1c; title2 'c. Create new variables and new dataset'; data sasdata.Profit; set sasdata.stocks; TotalPur=Number*PurPrice; TotalSell=Number*SellPrice; Profit=TotalSell-TotalPur;
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

assignment1 - dm 'log;clear;output;clear;'; o options ps=50...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online