SAS-LIBRARY-DATASET-Creation

SAS-LIBRARY-DATASET-Creation - SAS SAS Library Library And...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

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

Unformatted text preview: SAS SAS Library Library And And Datasets Datasets Last Updated : 29June, 2004 Center of Excellence Data Warehousing Review the concept of SAS data libraries. Review the LIBNAME statement. Review creating a new SAS data set from an existing data set. Review conditional processing. SAS Files SAS data sets and other files are stored in SAS data libraries. SASUSER WORK PROG2 SAS Data Libraries A SAS data library is a collection of SAS files that are recognized as a unit by SAS on your operating environment. WORK - temporary library SASUSER - permanent library You can create and access your own permanent libraries. PROG2 - permanent library WORK SASUSER PROG2 SAS Data Libraries The physical structure of a SAS data library depends on your operating system. Directory-based operating systems (Windows or UNIX) any folder or sub-directory OS/390 systems specially formatted sequential file The LIBNAME Statement The LIBNAME statement establishes the library reference (or libref), which is an alias for the SAS data library. General form of the LIBNAME statement: LIBNAME libref ' SAS-data-library ' <options> ; The libref must be 8 characters or fewer. The LIBNAME Statement: Examples OS/390 Batch and TSO libname prog2 'edu.prog2.sasdata' disp=shr ; Windows, DOS, and OS/2 libname prog2 'c:\prog2' ; UNIX libname prog2 '/user/prog2' ; Two-Level SAS Data Set Names Libref SAS Data Library SAS Data libref.SAS-filename The WORK Library The WORK library is the default library. If you do not specify a library reference on a SAS data set name, SAS assumes the libref is work. work.fltat1 fltat1 Accessing a Permanent SAS Data Set There are two steps when accessing a permanent SAS dataset: Use a LIBNAME statement to set up a libref that points to the location of the data set. Reference the data set using the libref as the first part of the data set name. If the libref has already been assigned in the SAS session, you do not need to assign it again. ... ... libname prog2 'c:\workshop\winsas\prog2' ; proc print data=prog2.test noobs; run; Viewing a Permanent SAS Data Set Windows Viewing a Permanent SAS Data Set LName Score SMITH 0.90 JONES 0.57 MOORE 0.85 LEE 0.98 LONG 0.67 GREEN 0.70 FOREMAN 0.69 ......
View Full Document

This note was uploaded on 12/08/2010 for the course USE 3425 taught by Professor Raman during the Spring '10 term at Punjab Engineering College.

Page1 / 46

SAS-LIBRARY-DATASET-Creation - SAS SAS Library Library And...

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

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