Working With SAS_2

Working With SAS_2 - Working With SAS Rajesh Chandwadkar...

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

View Full Document Right Arrow Icon
Working With SAS Rajesh Chandwadkar
Image of page 1

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

View Full Document Right Arrow Icon
Working with SAS SAS Data Library Importing files with import wizard Import Ms-Excel file Import Ms-Access table Import txt files, multiple rows Importing files with Proc import Importing data from multiple text files RDBMS tables using SAS/ACCESS
Image of page 2
A SAS data library is a collection of SAS files that are recognized as a unit by SAS. OS/390: userid .mysas.files Windows: c:\mysasfiles UNIX: /users/dept/mysasfiles SAS Data Library SAS File SAS File SAS File OS/390 (MVS) A SAS data library is an operating system file. Directory-based A SAS data library is Systems a directory. A SAS data set is a type of SAS file. SAS Data Libraries
Image of page 3

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

View Full Document Right Arrow Icon
FILES LIBRARIES You can think of a SAS data library as a drawer in a filing cabinet and a SAS data set as one of the file folders in the drawer. SAS Data Libraries
Image of page 4
Regardless of which host operating system you use, you identify SAS data libraries by assigning each a library reference name (libref). libref Assigning a Libref
Image of page 5

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

View Full Document Right Arrow Icon
work sasuser ia work - temporary library sasuser - permanent library When you invoke SAS, you automatically have access to a temporary and a permanent SAS data library. You can create and access your own permanent libraries. ia - permanent library SAS Data Libraries
Image of page 6
LIBNAME libref ' SAS-data-library ' <options>; Rules for naming a libref: must be 8 characters or less must begin with a letter or underscore remaining characters are letters, numbers, or underscores. Assigning a Libref You can use the LIBNAME statement to assign a libref to a SAS data library. General form of the LIBNAME statement:
Image of page 7

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

View Full Document Right Arrow Icon
libname ia 'c:\workshop\winsas\prog1'; libname ia '/users/prog1'; libname ia 'edc.prog1.sasdata' disp=shr; Assigning a Libref Examples: Windows UNIX OS/390
Image of page 8
When you submit the LIBNAME statement, a connection is made between a libref in SAS and the physical location of files on your operating system. Windows 'c:\workshop\winsas\prog1' UNIX '/users/prog1' OS/390 'edc.prog1.sasdata' Making the Connection
Image of page 9

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

View Full Document Right Arrow Icon
work.employee employee Temporary SAS Filename The libref work can be omitted when you refer to a file in the work library. The default libref is work if the libref is omitted.
Image of page 10
Creating library reference using Window option
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