CSULB_STAT475_handout8

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

Info iconThis 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
Background image of page 1

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

View Full DocumentRight 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
Background 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 Note that the output includes the list of filenames, type of files, file sizes, dates and times
Background image of page 3

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

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

This note was uploaded on 12/14/2011 for the course STAT 475 taught by Professor Olgak during the Fall '11 term at CSU Long Beach.

Page1 / 10

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

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

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