Sas base cert prep guide
Download
1 / 20

SAS Base Cert. Prep. Guide - PowerPoint PPT Presentation


  • 117 Views
  • Uploaded on

SAS Base Cert. Prep. Guide. CHAPTER 2 Referencing Files and Setting Options. LIBNAME .libref. Creates the library specified in the libref portion of the LIBNAME statement.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' SAS Base Cert. Prep. Guide' - powa


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Sas base cert prep guide

SAS Base Cert. Prep. Guide

CHAPTER 2

Referencing Files and Setting Options

Creator: Nathaniel J. Clay


Libname libref
LIBNAME.libref

Creates the library specified in the libref portion of the LIBNAME statement.

The libref portion may be 1-8 characters long, begin with an underscore or letter, and may contain only letters, numbers, or underscores.

Creator: Nathaniel J. Clay


Proc contents data sas file specification run
PROC CONTENTS DATA=<SAS file specification>RUN;

Allows you to see the contents of the SAS file specified in the SAS file specification.

Variables will be displayed in alphabetical order, NOT the order in which they were created.

Creator: Nathaniel J. Clay


Proc contents data libref all run
PROC CONTENTS DATA=<LIBREF._ALL_>;RUN;

Allows you to see detailed contents of all files contained within the library specified by LIBREF.

Creator: Nathaniel J. Clay


Proc contents data libref all nods run
PROC CONTENTS DATA=<LIBREF._ALL_> NODS;RUN;

Allows you to see the contents of all files contained within the library specified by LIBREF; however, the NODS option suppresses detailed information from being displayed.

Creator: Nathaniel J. Clay


What is wrong with the following statement below proc contents data sas file specification nods run
What is wrong with the following statement below?PROC CONTENTS DATA=<sas file specification> NODS;RUN;

You can only use the NODS option when using:

<LIBREF._ALL_>

Creator: Nathaniel J. Clay


Proc datasets options contents data sas file specification quit
PROC DATASETS <options>;CONTENTS DATA= <sas file specification>;QUIT;

Performs the same function as:

PROC CONTENTS DATA=<SAS file specification>;RUN;

Creator: Nathaniel J. Clay


Proc datasets options contents data libref all quit
PROC DATASETS <options>;CONTENTS DATA= <LIBREF._All_>;QUIT;

Performs the same function as:

PROC CONTENTS DATA=<LIBREF._ALL_>;RUN;

Creator: Nathaniel J. Clay


Proc datasets options contents data libref all nods quit
PROC DATASETS <options>;CONTENTS DATA= <LIBREF._All_> NODS;QUIT;

Performs the same function as:

PROC CONTENTS DATA=<LIBREF._ALL_> NODS;RUN;

Creator: Nathaniel J. Clay


Proc datasets options contents data sas file specification varnum quit
PROC DATASETS <options>;CONTENTS DATA= <sas file specification> VARNUM;QUIT;

Performs the same function as:

PROC CONTENTS DATA=<sas file specification> VARNUM;RUN;

Creator: Nathaniel J. Clay


What s the difference between proc contents and proc datasets
What’s the difference between PROC CONTENTS and PROC DATASETS?

They perform essentially the same function, however the options allowed in PROC DATASETS allows you to also modify a data set, whereas PROC CONTENTS only allows you to view information about a dataset.

Creator: Nathaniel J. Clay


Options options
OPTIONS <options>

Goes before DATA/PROC steps, and are used to specify what system options you wish to change.

Creator: Nathaniel J. Clay


Options date nodate number nonumber pageno
OPTIONS DATE|NODATE NUMBER|NONUMBER PAGENO=

DATE|NODATETellssas to include or not include the current date on output.

NUMBER|NONUMBERTellssas to include or not include page numbers on output.

PAGENO=  Tells sas what value you wish page numbers to begin on.

Creator: Nathaniel J. Clay


Options pagesize linesize yearcutoff
OPTIONS PAGESIZE= LINESIZE= YEARCUTOFF=

PAGESIZE=  Specifies the number of lines to include on each page of output. Values for PAGESIZE can be between 15 and 32,767.

LINESIZE=  Specifies the width of the print line. Values for LINESIZE can be between 64 and 256.

YEARCUTOFF= Tells sas how to handel two-digit years. SAS interprets YEARCUTOFF as a 100 year span starting with the year you specify.

Creator: Nathaniel J. Clay


Options firstobs obs
OPTIONS FIRSTOBS= OBS=

FIRSTOBS=  Tells sas the value of the observation to start at.

OBS=  Tells sas the value of the observation to stop at.

Creator: Nathaniel J. Clay


Options formchar formatting characters
OPTIONS FORMCHAR= ‘formatting characters’

Specifies formatting characters for your outputting device. Common to use in PROC FREQ and PROC TABULATE.

Creator: Nathaniel J. Clay


Options formdlim delimit character
OPTIONS FORMDLIM= ‘delimit-character’

Tells sas the character which should be used in order to delimit page breaks in sas system output.

The default value of FORMDLIM is NULL.

Creator: Nathaniel J. Clay


Options label nolabel
OPTIONS LABEL|NOLABEL

Allows you to change the way in which variable names are displayed on output.

Creator: Nathaniel J. Clay


Options replace noreplace
OPTIONS REPLACE|NOREPLACE

Specifies whether permanently stored sas files are replaced or not. This option is good because it prevents a user from inadvertently replacing existing sas data sets.

Creator: Nathaniel J. Clay


Options source nosource
OPTIONS SOURCE|NOSOURCE

Controls whether sas statements are written into the sas log or not. Default is SOURCE.

Creator: Nathaniel J. Clay


ad