13.07.2015 Views

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

862 Using the RANK Procedure 4 Chapter 29Output 29.16Using the CONTENTS ProcedureContents of the DELAY TableThe CONTENTS ProcedureData Set Name: MYDBLIB.DELAY Observations: .Member Type: DATA Variables: 7Engine: Oracle Indexes: 0Created: . Observation Length: 0Last Modified: . Deleted Observations: 0Protection: Compressed: NOData Set Type: Sorted: NOLabel:-----Alphabetic List of Variables and Attributes-----# Variable Type Len Pos Format In<strong>for</strong>mat Label-----------------------------------------------------------------------------2 DATES Num 8 8 DATETIME20. DATETIME20. DATES7 DELAY Num 8 64 DELAY5 DELAYCAT Char 15 32 $15. $15. DELAYCAT4 DEST Char 3 24 $3. $3. DEST6 DESTYPE Char 15 48 $15. $15. DESTYPE1 FLIGHT Char 3 0 $3. $3. FLIGHT3 ORIG Char 3 16 $3. $3. ORIGUsing the RANK ProcedureThis example uses the RANK procedure to rank flights in the DB2 table Delay bynumber of minutes delayed.libname mydblib db2 ssid=db2;options obs=20;proc rank data=mydblib.delay descendingties=low out=ranked;var delay;ranks RANKING;run;proc print data=ranked;title ’Ranking of Delayed Flights’;<strong>for</strong>mat delay 2.0dates datetime9.;run;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!