1 / 20

SAS Base Cert. Prep. Guide

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.

powa
Download Presentation

SAS Base Cert. Prep. Guide

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SAS Base Cert. Prep. Guide CHAPTER 2 Referencing Files and Setting Options Creator: Nathaniel J. Clay

  2. 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

  3. 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

  4. 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

  5. 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

  6. 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

  7. 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

  8. PROC DATASETS <options>;CONTENTS DATA= <LIBREF._All_>;QUIT; Performs the same function as: PROC CONTENTS DATA=<LIBREF._ALL_>;RUN; Creator: Nathaniel J. Clay

  9. 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

  10. 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

  11. 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

  12. OPTIONS <options> Goes before DATA/PROC steps, and are used to specify what system options you wish to change. Creator: Nathaniel J. Clay

  13. 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

  14. 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

  15. 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

  16. OPTIONS FORMCHAR= ‘formatting characters’ Specifies formatting characters for your outputting device. Common to use in PROC FREQ and PROC TABULATE. Creator: Nathaniel J. Clay

  17. 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

  18. OPTIONS LABEL|NOLABEL Allows you to change the way in which variable names are displayed on output. Creator: Nathaniel J. Clay

  19. 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

  20. OPTIONS SOURCE|NOSOURCE Controls whether sas statements are written into the sas log or not. Default is SOURCE. Creator: Nathaniel J. Clay

More Related