{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

a9 - NOTE DATA statement used(Total process time real time...

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

View Full Document Right Arrow Icon
EXAMPLE A9 SAS Program data ledger; retain store region month; input type $1. @; if type='S' then input @3 store 4. region $10. month : $8. ; else do; input @4 date ddmmyy8. sales 7.2; output; end; drop type; datalines; S 0021 Southeast March 10/05/04 134510 12/05/04 23675 21/05/04 96860 28/05/04 265036 S 0173 Northwest January 15/05/04 67200 18/05/04 158325 29/05/04 127950 30/05/04 45845 02/06/04 304730 ; run; proc print data=ledger; id store; format store z4. date ddmmyy8. sales dollar10.2 ; title 'Sales analysis for Martin & Co.'; run;
Background image of page 1

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

View Full Document Right Arrow Icon
SAS Log 1 options ls=80 nodate pageno=1; 2 data ledger; 3 retain store region month; 4 input type $1. @; 5 if type='S' then input @3 store 4. region $10. month : $8. ; 6 else do; 7 input @4 date ddmmyy8. sales 7.2; 8 output; 9 end; 10 drop type; 11 datalines; NOTE: The data set WORK.LEDGER has 9 observations and 5 variables.
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: NOTE: DATA statement used (Total process time): real time 0.15 seconds cpu time 0.02 seconds 23 ; 24 run; 25 proc print data=ledger; 26 id store; 27 format store z4. date ddmmyy8. sales dollar10.2 ; 28 title 'Sales analysis for Martin & Co.'; 29 run; NOTE: There were 9 observations read from the data set WORK.LEDGER. NOTE: PROCEDURE PRINT used (Total process time): real time 0.16 seconds cpu time 0.01 seconds SAS Output Sales analysis for Martin & Co. 1 store region month date sales 0021 Southeast March 10/05/04 $1,345.10 0021 Southeast March 12/05/04 $236.75 0021 Southeast March 21/05/04 $968.60 0021 Southeast March 28/05/04 $2,650.36 0173 Northwest January 15/05/04 $672.00 0173 Northwest January 18/05/04 $1,583.25 0173 Northwest January 29/05/04 $1,279.50 0173 Northwest January 30/05/04 $458.45 0173 Northwest January 02/06/04 $3,047.30...
View Full Document

  • Winter '08
  • Staff
  • Central processing unit, System time, Southeast Southeast Southeast Southeast Northwest Northwest Northwest Northwest Northwest

{[ snackBarMessage ]}

Page1 / 3

a9 - NOTE DATA statement used(Total process time real time...

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

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