SAS-LIBRARY-DATASET-Creation

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

Info icon This preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon
SAS SAS Library Library And And Datasets Datasets Last Updated : 29June, 2004 Center of Excellence Data Warehousing
Image of page 1

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

View Full Document Right Arrow Icon
 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.
Image of page 2
SAS Files SAS data sets and  other files are stored in  SAS data libraries. SASUSER WORK PROG2
Image of page 3

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

View Full Document Right Arrow Icon
SAS Data Libraries 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
Image of page 4
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
Image of page 5

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

View Full Document Right Arrow Icon
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.
Image of page 6
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' ;
Image of page 7

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

View Full Document Right Arrow Icon
Two-Level SAS Data Set Names Libref SAS  Data  Library SAS Data libref.SAS-filename
Image of page 8
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
Image of page 9

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

View Full Document Right Arrow Icon
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.
Image of page 10
...
Image of page 11

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

View Full Document Right Arrow Icon
Image of page 12
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern