{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

CSULB_STAT475_handout8

CSULB_STAT475_handout8 - STAT 475 Chapter 1 Chapters 1 2 5...

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

View Full Document Right Arrow Icon
STAT 475 Chapters 1, 2, 5, and 7 MISCELLANEOUS Chapter 1. DESCRIPTOR AND DATA PORTIONS OF SAS DATA FILES Conceptually, a SAS data set is a file that consists of two parts: a descriptor portion and a data portion . The descriptor portion of a SAS data set contains information about the data set, including o the name of the data set o the date and time when the data set was created o the number of observations o the number of variables The data portion of a SAS data set is a collection of data values that are arranged in a rectangular table. Observations for a particular individual are stored in rows and variables are stored in columns . In addition to general information about the data set, the descriptor portion contains information about the attributes of each variable in the data set. The attribute information includes the variable’s name, type (numeric or character), length, format, informat, and label. In SAS, the length of a variable is the number of bytes SAS allocates for storing the variable. It is not necessarily the same as the number of characters or digits in the variable. Character variables can have values up to 32, 767 bytes long. Numeric variables have a default length of 8 bytes. Variables containing integer values can be stored using less than 8 bytes. Largest integer represented exactly  by length for SAS variables  Length in  bytes Largest integer represented  exactly 3 8,192 1
Image of page 1

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

View Full Document Right Arrow Icon
4 2,097,152 5 536,870,912 6 137,438,953,472 7 35,184,372,088,832 8 9,007,199,254,740,990 Chapter 2. SAS LIBRARY ENGINES Data formatted by other software products may be read by SAS without using Import/Export Wizard. It suffices to specify the engine type in the LIBRARYNAME statement. The syntax is LIBNAME libref engine 'path\filename'; Note that the actual filename is specified, not just the path. This is an exception to the rules of libref’s. Example. The SPSS engine is designed for reading SPSS portable data (*.por) directly into SAS. To do so, type libname libref spss 'H:\spssdata.por'; SAS creates a library libref and stores a datafile _first_ in it. To print the file, for example, type proc print data=libref._first_; run ; THE CONTENTS PROCEDURE PROC CONTENTS may be used to view the contents of a library. The syntax is proc contents data=libref._all_ nodetails; run; where the filename _all_ requests a listing of all files in the library, and nodetails (or nods ) suppresses the printing of detailed information about each file. Nodetails option may be used only if the filename _all_ is specified. 2
Image of page 2
Example. To view without any details the contents of the library thumb that contains a single file exercise , type proc contents data=thumb._all_ nods; run ; The output is The SAS System 19:04 Tuesday, July 20, 2010 1 The CONTENTS Procedure Directory Libref THUMB Engine V9 Physical Name I:\ Filename I:\ Member File # Name Type Size Last Modified 1 EXERCISE DATA 5120 20Jul10:19:05:30
Image of page 3

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

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