How are your SAS Skills? Chapter 1: Accessing Data (Question # 1)

Slides:



Advertisements
Similar presentations
Chapter 4 - Control Statements
Advertisements

CHAPTER 11 FILE INPUT & OUTPUT Introduction to Computer Science Using Ruby (c) 2012 Ophir Frieder et al.
Chapter 7: User-Defined Simple Data Types, Namespaces, and the string Type.
Objectives In this chapter, you will:
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 6P. 1Winter Quarter I/O in C Lecture 6.
How to Program in C++ CHAPTER 3: INPUT & OUTPUT INSTRUCTOR: MOHAMMAD MOJADDAM.
C++ for Engineers and Scientists Third Edition
Basic And Advanced SAS Programming
Chapter 7. 2 Objectives You should be able to describe: The string Class Character Manipulation Methods Exception Handling Input Data Validation Namespaces.
Welcome to SAS…Session..!. What is SAS..! A Complete programming language with report formatting with statistical and mathematical capabilities.
Structured COBOL Programming, Stern & Stern, 9th Edition
1 Chapter 4: Selection Structures. In this chapter, you will learn about: – Selection criteria – The if-else statement – Nested if statements – The switch.
Chapter 3 Processing and Interactive Input. 2 Assignment  The general syntax for an assignment statement is variable = operand; The operand to the right.
CNG 140 C Programming Lecture Notes 2 Processing and Interactive Input Spring 2007.
A First Book of ANSI C Fourth Edition Chapter 3 Processing and Interactive Input.
1 CSC103: Introduction to Computer and Programming Lecture No 6.
Chapter 1 Working with strings. Objectives Understand simple programs using character strings and the string library. Get acquainted with declarations,
Flow of Control Part 1: Selection
Microsoft Visual Basic 2005: Reloaded Second Edition Chapter 3 Variables, Constants, Methods, and Calculations.
BIS Database Systems School of Management, Business Information Systems, Assumption University A.Thanop Somprasong Chapter # 8 Advanced SQL.
Priya Ramaswami Janssen R&D US. Advantages of PROC REPORT -Very powerful -Perform lists, subsets, statistics, computations, formatting within one procedure.
ME 142 Engineering Computation I Using Subroutines Effectively.
1 STRINGS String data type Basic operations on strings String functions String procedures.
Chapter 11 Data Validation. Question Should your program assume the data is correct, or should your program edit the data to ensure it is correct?
Programming Fundamentals. Summary of previous lectures Programming Language Phases of C++ Environment Variables and Data Types.
Chapter 9: Completing the Basics. In this chapter, you will learn about: – Exception handling – Exceptions and file checking – The string class – Character.
A FIRST BOOK OF C++ CHAPTER 14 THE STRING CLASS AND EXCEPTION HANDLING.
Chapter 6: Modifying and Combining Data Sets  The SET statement is a powerful statement in the DATA step DATA newdatasetname; SET olddatasetname;.. run;
CSC 4630 Perl 3 adapted from R. E. Beck. Problem But we worked on it first: Input: Read from a text file named in a command line argument Output: List.
FILES AND EXCEPTIONS Topics Introduction to File Input and Output Using Loops to Process Files Processing Records Exceptions.
Working Efficiently with Large SAS® Datasets Vishal Jain Senior Programmer.
SAS ® 101 Based on Learning SAS by Example: A Programmer’s Guide Chapters 16 & 17 By Tasha Chapman, Oregon Health Authority.
C++ for Engineers and Scientists Second Edition Chapter 4 Selection Structures.
Chapter 1 Connections to Algebra Review
Applied Business Forecasting and Regression Analysis
Input and Output Upsorn Praphamontripong CS 1110
Objectives In this chapter, you will:
Enumeration Type Data type: a set of values with a set of operations on them Enumeration type: a simple data type created by the programmer To define an.
Chapter 6: Modifying and Combining Data Sets
Database Systems: Design, Implementation, and Management Tenth Edition
Organization of Programming Languages
Exam 3 Review.
Two “identical” programs
Chapter 3: Working With Your Data
Chapter 7 Arrays.
Chapter 19 JavaScript.
ECONOMETRICS ii – spring 2018
Introduction to Classes and Objects
Chapter 18: Modifying SAS Data Sets and Tracking Changes
Instructor: Raul Cruz-Cano
SAS in Data Cleaning.
Tamara Arenovich Tony Panzarella
Topics Introduction to File Input and Output
Chapter 24 (4th ed.): Creating Functions
A First Book of ANSI C Fourth Edition
Introduction to SAS A SAS program is a list of SAS statements executed in order Every SAS statement ends with a semicolon! SAS statements can be in caps.
Chapter 14 Sorting and Merging.
Defining and Calling a Macro
Chapter 3: Input/Output
Strings Dr. Soha S. Zaghloul updated by Rasha ALEidan
Computing in COBOL: The Arithmetic Verbs and Intrinsic Functions
CHAPTER 17 The Report Writer Module
Topics Introduction to File Input and Output
Objectives In this chapter, you will:
Assignment #3 Programming Language, Spring 2003
The Selection Structure
Topics Introduction to File Input and Output
Introduction to SAS Essentials Mastering SAS for Data Analytics
Introduction to Computer Science
Challenge Guide Grade Code Type Slides
Presentation transcript:

How are your SAS Skills? Chapter 1: Accessing Data (Question # 1) When merging data sets using the MERGE statement, which data set, first or second, has data values that overwrite data values for common variables? Sharpening Your SAS Skills, Sunil Gupta, www.SASSavvy.com

How are your SAS Skills? Chapter 1: Accessing Data (Answer # 1) For common variables, the second data set has data values that overwrite data values of the first data set when merging two data sets using the MERGE statement. Sharpening Your SAS Skills, Sunil Gupta, www.SASSavvy.com

How are your SAS Skills? Chapter 2: Creating Data Structures (Question # 2) What is the order of sequence if both DROP and KEEP statements are applied within the DATA step? Sharpening Your SAS Skills, Sunil Gupta, www.SASSavvy.com

How are your SAS Skills? Chapter 2: Creating Data Structures (Answer # 2) If both DROP and KEEP statements are applied within the DATA step, then the order of priority is DROP and then KEEP. Sharpening Your SAS Skills, Sunil Gupta, www.SASSavvy.com

How are your SAS Skills? Chapter 3: Managing Data (Question # 3) Is it possible to use the RETAIN statement to preserve a character string in a character variable? Sharpening Your SAS Skills, Sunil Gupta, www.SASSavvy.com

How are your SAS Skills? Chapter 3: Managing Data (Answer # 3) Yes, it is possible to use the RETAIN statement to preserve a character string in a character variable without resetting to blanks for the next observation. Also works for numeric variables. Sharpening Your SAS Skills, Sunil Gupta, www.SASSavvy.com

How are your SAS Skills? Chapter 4: Generating Reports (Question # 4) What is one difference between the MEANS procedure and the SUMMARY procedure? Sharpening Your SAS Skills, Sunil Gupta, www.SASSavvy.com

How are your SAS Skills? Chapter 4: Generating Reports (Answer # 4) By default, the MEANS procedure produces a report while the SUMMARY procedure provides an output data set unless the PRINT option is specified. Other than that, the two SAS procedures are similar in syntax and results. Sharpening Your SAS Skills, Sunil Gupta, www.SASSavvy.com

How are your SAS Skills? Chapter 5: Handling Errors (Question # 5) Is it possible to get the note ‘Invalid Data’ when using the SET statement in a DATA step? Sharpening Your SAS Skills, Sunil Gupta, www.SASSavvy.com

How are your SAS Skills? Chapter 5: Handling Errors (Answer # 5) No, the ‘Invalid Data’ note appears when SAS encounters unexpected data while reading the data using the INPUT statement. When using the SET statement, you are accessing a data set that is already created. Sharpening Your SAS Skills, Sunil Gupta, www.SASSavvy.com