The data step allows for creation, assembly and modification of SAS data sets.
|
|
- Ashlyn Malone
- 6 years ago
- Views:
Transcription
1
2 The data step allows for creation, assembly and modification of SAS data sets. Sources of information include existing SAS data sets, database files, spreadsheets and other raw data files. Like a procedure, a data step is a block of code that opens with the data statement and is typically closed with the run statement.
3 Many different statements are permitted in a data step. data name(s); SAS statements The named data set(s) will be created by the data step. The set statement allows current SAS data set(s) to be selected for use. General assignment statements can be used to create new variables. Format and label statements can be used to set or change defaults for the data set.
4 For the following data step: data new; cla=salary*0.015; A data set called new will be created in the work library: It will be derived from the employees data set from the mysas library It will contain one additional variable, cla computed as shown. How does this occur?
5 Two phases, compilation and execution. During compilation: data new; cla=salary*0.015;
6 Two phases, compilation and execution. During compilation: data new; cla=salary*0.015; Sets up output data set
7 data new; cla=salary*0.015; Gathers all information on variables in this data set Division HireDate LastName FirstName Phone EmpID JobCode Salary And creates a working space with information on all of these variables, including types, labels and formats Known as the Program Data Vector (PDV)
8 data new; cla=salary*0.015; Scans other statements for variable definitions Always of the form: variable = expression; Division HireDate LastName FirstName Phone EmpID JobCode Salary
9 data new; cla=salary*0.015; Scans other statements for variable definitions Division HireDate LastName FirstName Phone EmpID JobCode Salary cla Adds any it finds to the PDV Since the definition of cla involves a numeric expression on the right side of the =, it is defined as numeric
10 data new; cla=salary*0.015; Once all statements are scanned and complied, execution starts. Division HireDate LastName FirstName Phone EmpID JobCode Salary cla
11 data new; cla=salary*0.015; Read observations (starting from 1 st ) from this data set Division HireDate LastName FirstName Phone EmpID JobCode Salary cla FLI 11MAR1992 MILLS DOROTHY E 2380 E00001 FLTAT3 $25,000. PDV is populated with information from first record, other variables are missing
12 data new; cla=salary*0.015; Process other statements in order. Division HireDate LastName FirstName Phone EmpID JobCode Salary cla FLI 11MAR1992 MILLS DOROTHY E 2380 E00001 FLTAT3 $25, cla is computed and placed in its location in the PDV
13 data new; cla=salary*0.015; When the bottom of the data step is reached, two things happen... The current PDV is output as a record to the data set being created Division HireDate LastName FirstName Phone EmpID JobCode Salary cla FLI 11MAR1992 MILLS DOROTHY E 2380 E00001 FLTAT3 $25, work.new Division HireDate LastName FirstName Phone EmpID JobCode Salary cla FLI 11MAR1992 MILLS DOROTHY E 2380 E00001 FLTAT3 $25,
14 data new; cla=salary*0.015; Automatic return to read next record Variables not present in data are reset to missing by default. Division HireDate LastName FirstName Phone EmpID JobCode Salary cla FIN 19DEC1983 BOWER EILEEN A E00002 FINCLK $27,000. work.new Division HireDate LastName FirstName Phone EmpID JobCode Salary cla FLI 11MAR1992 MILLS DOROTHY E 2380 E00001 FLTAT3 $25,
15 data new; cla=salary*0.015; And the process continues like before Division HireDate LastName FirstName Phone EmpID JobCode Salary cla FIN 19DEC1983 BOWER EILEEN A E00002 FINCLK $27, work.new Division HireDate LastName FirstName Phone EmpID JobCode Salary cla FLI 11MAR1992 MILLS DOROTHY E 2380 E00001 FLTAT3 $25,
16 data new; cla=salary*0.015; With the implicit output and return occurring each time, until all records are read Division HireDate LastName FirstName Phone EmpID JobCode Salary cla FIN 19DEC1983 BOWER EILEEN A E00002 FINCLK $27, work.new Division HireDate LastName FirstName Phone EmpID JobCode Salary cla FLI 11MAR1992 MILLS DOROTHY E 2380 E00001 FLTAT3 $25, FIN 19DEC1983 BOWER EILEEN A E00002 FINCLK $27,
17 Here is the table view of the resulting data set:
18 Order of certain statements can make a significant difference in a data step, consider: data newa; cla=salary*0.015; new_salary=salary+cla; vs. data newb; new_salary=salary+cla; cla=salary*0.015; One of these does what you would like
19 Run PROC CONTENTS on this data set and the original: Formats and labels will be the same as those from the original data set, new variables will have none Format and label statements can be made in a data step to set/reset defaults.
20 Consider the following modification of the previous: data new; cla=salary*0.015; format cla dollar8.; label cla='cost of Living Adjustment';
21 Consider the following modification of the previous: data new; cla=salary*0.015; format cla dollar8.; label cla='cost of Living Adjustment'; These attributes are now associated with the cla variable in the PDV at compilation. (They are inactive during execution)
22 Consider the following modification of the previous: data new; cla=salary*0.015; format cla dollar8.; label cla='cost of Living Adjustment'; These attributes are now associated with the cla variable in the PDV at compilation. (They are inactive during execution) The location of the format and label statements in the data step generally makes little difference.
23
24 Were it written like this, there is a slight difference in the result: data new2; format cla dollar8.; label cla='cost of Living Adjustment'; cla=salary*0.015;
25 Why do you think this column is first this time?
26 Not limited to working with only the new variables: data new3; cla=salary*0.015; format cla dollar8. hiredate mmddyy10.; label cla='cost of Living Adjustment' empid='employee ID';
27 Not limited to working with only the new variables: data new3; cla=salary*0.015; format cla dollar8. hiredate mmddyy10.; label cla='cost of Living Adjustment' empid='employee ID'; These attributes are now associated with the corresponding variables in the PDV at compilation, overriding the previous.
28 Old format and label are replaced.
29 Many functions are available to you in the data step, including character functions. PROPCASE(argument) Proper case. Converts all letters to lowercase. Converts the first letter and each letter after a delimiter (space, slash, tab, etc) to uppercase.
30 Try: data new4; cla=salary*0.015; lastname=propcase(lastname); firstname=propcase(firstname); format cla dollar8. hiredate mmddyy10.; label cla='cost of Living Adjustment' empid='employee ID';
31 Try: data new4; cla=salary*0.015; lastname=propcase(lastname); firstname=propcase(firstname); format cla dollar8. hiredate mmddyy10.; Same variable is used on both sides of assignment. Perfectly legal, current value is used in expression on right and then becomes the replacement value. label cla='cost of Living Adjustment' empid='employee ID';
32 Values have been converted.
33 Several character values can be assembled into one via concatenation CAT(argument1, argument2, ) Puts values together in listed order, can be variables or literal (quoted) references. CATS (argument1, argument2, ) Same as CAT except leading and trailing blanks are removed before concatenation. CATX(delimiter, argument1, argument2, ) Like CATS, but the specified delimiter (first item listed) is placed between all values.
34 Consider: data new5; lastname=propcase(lastname); firstname=propcase(firstname); name1=cat(firstname, lastname); name2=cats(firstname, lastname); name3=catx(' ', firstname, lastname); name4=catx(', ', lastname, firstname);
35
36 Consider: Since lengths vary, extra space is data new5; preserved. lastname=propcase(lastname); firstname=propcase(firstname); name1=cat(firstname, lastname); name2=cats(firstname, lastname); name3=catx(' ', firstname, lastname); name4=catx(', ', lastname, firstname);
37 Consider: Trimming all the spaces is not data new5; quite optimal for this example. lastname=propcase(lastname); firstname=propcase(firstname); name1=cat(firstname, lastname); name2=cats(firstname, lastname); name3=catx(' ', firstname, lastname); name4=catx(', ', lastname, firstname);
38 Consider: The delimiter in CATX allows me data new5; to fix the previous problem. lastname=propcase(lastname); firstname=propcase(firstname); name1=cat(firstname, lastname); name2=cats(firstname, lastname); name3=catx(' ', firstname, lastname); name4=catx(', ', lastname, firstname);
39 Consider: I might consider this form as well, note the importance of the space data new5; in,. lastname=propcase(lastname); firstname=propcase(firstname); name1=cat(firstname, lastname); name2=cats(firstname, lastname); name3=catx(' ', firstname, lastname); name4=catx(', ', lastname, firstname);
40 For whichever is chosen, the previous can be made a bit simpler by nesting functions: data new6; name=catx(' ',propcase(firstname),propcase(lastname)); Proper casing is applied to each of first name and last before the concatenation function is applied.
41 It may seem redundant to have both firstname and lastname in the data set with the new variable name.
42 Variables can be selected to be dropped or kept in two basic ways, via a drop/keep statement or via a drop/keep option. DROP/KEEP statement Legal only in the data step Syntax: drop variable1 variable2 ; keep variable1 variable2 ; Only one of the two should be used in any one data step.
43 How does it work? Consider: data new6; name=catx(' ',propcase(firstname),propcase(lastname)); drop lastname firstname; At compilation
44 data new6; The PDV will include a flag to drop these variables when records are output. name=catx(' ',propcase(firstname),propcase(lastname)); drop lastname firstname; Drop Drop Division HireDate LastName FirstName Phone EmpID JobCode Salary name
45 By default, all variables from input data new6; data sets and all created with expressions are flagged as keep. name=catx(' ',propcase(firstname),propcase(lastname)); drop lastname firstname; Keep Keep Drop Drop Keep Keep Keep Keep Keep Division HireDate LastName FirstName Phone EmpID JobCode Salary name
46 If a keep statement is used, only data new7; those listed are flagged to be kept, all others get a drop flag. name=catx(' ',propcase(firstname),propcase(lastname)); keep name empid division jobcode salary; Keep Drop Drop Drop Drop Keep Keep Keep Keep Division HireDate LastName FirstName Phone EmpID JobCode Salary name
47 Either way, all variables are available during processing for computational purposes, keeping/dropping only applies at output. data new7; name=catx(' ',propcase(firstname),propcase(lastname)); keep name empid division jobcode salary; Keep Drop Drop Drop Drop Keep Keep Keep Keep Division HireDate LastName FirstName Phone EmpID JobCode Salary name
48 DROP/KEEP option Legal nearly anywhere a data set is selected. Syntax: dataset(drop=variable1 variable2 ) dataset(keep=variable1 variable2 ) Again, only one of the two should be used with any one data set.
49 So this is equivalent to the previous use of the drop statement: data new8(drop=lastname firstname); name=catx(' ',propcase(firstname),propcase(lastname));
50 This is not: data new9; set mysas.employees(drop=lastname firstname); name=catx(' ',propcase(firstname),propcase(lastname)); Check the log and resulting data set
51 Nothing
52 The names never existed as far as this data step is concerned they were not in the PDV because they were dropped during input. The unknown variables are presumed to be numeric hence the two dots.
53 Typically, in the data step, using the keep/drop statement is easiest. When using the option in other procedures, make sure you are aware of the difference in using them during input versus output.
54 Suppose for the projects data, the jobtotal was incorrectly computed. Rather than the sum of equipment and personnel costs, there needed to be an accounting for incidental costs, which were 3% on personnel 1.5% on equipment Produce the following modified data set:
55
56 Insert some reasonable formats and labels to produce:
57 Create single latitude and longitude variables for the fish data
Introduction to the SAS Macro Facility
Introduction to the SAS Macro Facility Uses for SAS Macros The macro language allows for programs that are dynamic capable of selfmodification. The major components of the macro language include: Macro
More informationWelcome to Top 10 SAS Functions
Welcome to Top 10 SAS Functions Goal and Agenda By the end of this meeting, you will understand 10 key SAS functions purpose, value and features. What are SAS functions? Why use them? Use Case Manipulating
More informationTop 10 SAS Functions in A brief summary of SAS Communities Survey - by Flora Fang Liu
Top 10 SAS Functions in 2017 A brief summary of SAS Communities Survey - by Flora Fang Liu 1 What are SAS Functions? Why use SAS Functions? What? SAS functions perform computations, data manipulation,
More informationManaging User Data in Bulk via CSV BSC Health & Safety e-learning Platform
Managing User Data in Bulk via CSV BSC Health & Safety e-learning Platform Contents Introduction... 1 Creating Accounts... 1 Step One: Creating the CSV file... 1 Step Two: Uploading your data... 4 Updating
More informationRetrieving Data Using the SQL SELECT Statement. Copyright 2009, Oracle. All rights reserved.
Retrieving Data Using the SQL SELECT Statement Objectives After completing this lesson, you should be able to do the following: List the capabilities of SQL SELECT statements Execute a basic SELECT statement
More informationchapter 2 G ETTING I NFORMATION FROM A TABLE
chapter 2 Chapter G ETTING I NFORMATION FROM A TABLE This chapter explains the basic technique for getting the information you want from a table when you do not want to make any changes to the data and
More informationOther Data Sources SAS can read data from a variety of sources:
Other Data Sources SAS can read data from a variety of sources: Plain text files, including delimited and fixed-column files Spreadsheets, such as Excel Databases XML Others Text Files Text files of various
More informationc) Comments do not cause any machine language object code to be generated. d) Lengthy comments can cause poor execution-time performance.
2.1 Introduction (No questions.) 2.2 A Simple Program: Printing a Line of Text 2.1 Which of the following must every C program have? (a) main (b) #include (c) /* (d) 2.2 Every statement in C
More informationINTRODUCTION TO SAS HOW SAS WORKS READING RAW DATA INTO SAS
TO SAS NEED FOR SAS WHO USES SAS WHAT IS SAS? OVERVIEW OF BASE SAS SOFTWARE DATA MANAGEMENT FACILITY STRUCTURE OF SAS DATASET SAS PROGRAM PROGRAMMING LANGUAGE ELEMENTS OF THE SAS LANGUAGE RULES FOR SAS
More informationFull file at C How to Program, 6/e Multiple Choice Test Bank
2.1 Introduction 2.2 A Simple Program: Printing a Line of Text 2.1 Lines beginning with let the computer know that the rest of the line is a comment. (a) /* (b) ** (c) REM (d)
More informationEVALUATION ONLY. In this chapter, you will learn new. Text and Analysis EXCEL 2016 CHAPTER TIMING PROJECT: ANALYZING SALES INFORMATION
EXCEL 2016 3Advanced Functions for Text and Analysis In this chapter, you will learn new functions that give you greater ability for analysis and decision making. They include functions that either sum
More informationChapter 1 The DATA Step
Chapter 1 The DATA Step 1.1 Structure of SAS Programs...1-3 1.2 SAS Data Sets... 1-12 1.3 Creating a Permanent SAS Data Set... 1-18 1.4 Writing a SAS DATA Step... 1-24 1.5 Creating a DATA Step View...
More informationACCESS Procedure Reference
59 CHAPTER 5 ACCESS Procedure Reference Introduction 59 Case Sensitivity in the ACCESS Procedure 60 ACCESS Procedure 60 Description 61 PROC ACCESS Statement Options 62 Options 62 SAS System Passwords for
More informationDBLOAD Procedure Reference
131 CHAPTER 10 DBLOAD Procedure Reference Introduction 131 Naming Limits in the DBLOAD Procedure 131 Case Sensitivity in the DBLOAD Procedure 132 DBLOAD Procedure 132 133 PROC DBLOAD Statement Options
More informationFifteen Functions to Supercharge Your SAS Code
MWSUG 2017 - Paper BB071 Fifteen Functions to Supercharge Your SAS Code Joshua M. Horstman, Nested Loop Consulting, Indianapolis, IN ABSTRACT The number of functions included in SAS software has exploded
More informationThey grow as needed, and may be made to shrink. Officially, a Perl array is a variable whose value is a list.
Arrays Perl arrays store lists of scalar values, which may be of different types. They grow as needed, and may be made to shrink. Officially, a Perl array is a variable whose value is a list. A list literal
More informationRESTRICTING AND SORTING DATA
RESTRICTING AND SORTING DATA http://www.tutorialspoint.com/sql_certificate/restricting_and_sorting_data.htm Copyright tutorialspoint.com The essential capabilities of SELECT statement are Selection, Projection
More information1. What type of error produces incorrect results but does not prevent the program from running? a. syntax b. logic c. grammatical d.
Gaddis: Starting Out with Python, 2e - Test Bank Chapter Two MULTIPLE CHOICE 1. What type of error produces incorrect results but does not prevent the program from running? a. syntax b. logic c. grammatical
More informationTOP 10 (OR MORE) WAYS TO OPTIMIZE YOUR SAS CODE
TOP 10 (OR MORE) WAYS TO OPTIMIZE YOUR SAS CODE Handy Tips for the Savvy Programmer SAS PROGRAMMING BEST PRACTICES Create Readable Code Basic Coding Recommendations» Efficiently choosing data for processing»
More informationSkyBuild. Export File Builder Overview of Export File Builder Using a Prebuilt Export Interface Creating an Export from Scratch Running an Export
SkyBuild Overview What is SkyBuild and how is it used? Basic Export Information Basic Import Information Key Terminology for Export/Import File Builder Export File Builder Overview of Export File Builder
More informationRetrieving Data Using the SQL SELECT Statement. Copyright 2004, Oracle. All rights reserved.
Retrieving Data Using the SQL SELECT Statement Objectives After completing this lesson, you should be able to do the following: List the capabilities of SQL SELECT statements Execute a basic SELECT statement
More informationCS 2316 Exam 2 Practice ANSWER KEY
CS 2316 Exam 2 Practice ANSWER KEY Signing signifies you are aware of and in accordance with the Academic Honor Code of Georgia Tech. Calculators and cell phones are NOT allowed. This is a Python programming
More informationExcel Formulas 2018 Cindy Kredo Page 1 of 23
Excel file: Excel_Formulas_BeyondIntro_Data.xlsx Lab One: Sumif, AverageIf and Countif Goal: On the Demographics tab add formulas in Cells C32, D32 and E32 using the above functions. Use the cross-hair
More informationConverting a Lowercase Letter Character to Uppercase (Or Vice Versa)
Looping Forward Through the Characters of a C String A lot of C string algorithms require looping forward through all of the characters of the string. We can use a for loop to do that. The first character
More informationFull file at
Java Programming: From Problem Analysis to Program Design, 3 rd Edition 2-1 Chapter 2 Basic Elements of Java At a Glance Instructor s Manual Table of Contents Overview Objectives s Quick Quizzes Class
More informationSAS PROGRAMMING AND APPLICATIONS (STAT 5110/6110): FALL 2015 Module 2
SAS PROGRAMMING AND APPLICATIONS (STAT 5110/6110): FALL 2015 Department of MathemaGcs and StaGsGcs Phone: 4-3620 Office: Parker 364- A E- mail: carpedm@auburn.edu Web: hup://www.auburn.edu/~carpedm/stat6110
More informationIntroduction to the SAS System
Introduction to the SAS System The SAS Environment The SAS Environment The SAS Environment has five main windows The SAS Environment The Program Editor The SAS Environment The Log: Notes, Warnings and
More informationFSEDIT Procedure Windows
25 CHAPTER 4 FSEDIT Procedure Windows Overview 26 Viewing and Editing Observations 26 How the Control Level Affects Editing 27 Scrolling 28 Adding Observations 28 Entering and Editing Variable Values 28
More informationGiftWorks Import Guide Page 2
Import Guide Introduction... 2 GiftWorks Import Services... 3 Import Sources... 4 Preparing for Import... 9 Importing and Matching to Existing Donors... 11 Handling Receipting of Imported Donations...
More informationRetrieving Data Using the SQL SELECT Statement. Copyright 2004, Oracle. All rights reserved.
Retrieving Data Using the SQL SELECT Statement Copyright 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: List the capabilities of SQL
More informationRemaining Enhanced Labs
Here are some announcements regarding the end of the semester, and the specifications for the last Enhanced Labs. Don t forget that you need to take the Common Final Examination on Saturday, May 5, from
More informationBEPI USER MANUAL. As with any programming, examples are invaluable and these can be downloaded from the EMACSYS web site at
BEPI USER MANUAL General This manual is intended for those with little or no experience of programming. More experienced programmers may prefer to refer to a shorter document BEPI for Programmers. As with
More informationGetting Information from a Table
ch02.fm Page 45 Wednesday, April 14, 1999 2:44 PM Chapter 2 Getting Information from a Table This chapter explains the basic technique of getting the information you want from a table when you do not want
More informationCS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 3: SEP. 13TH INSTRUCTOR: JIAYIN WANG
CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 3: SEP. 13TH INSTRUCTOR: JIAYIN WANG 1 Notice Reading Assignment Chapter 1: Introduction to Java Programming Homework 1 It is due this coming Sunday
More informationImplementing ADQL in Postgres using PgSphere.
Implementing ADQL in Postgres using PgSphere. PgSphere is a free add-on to Postgres which extends the standard GIS capabilities of Postgres to geometric objects on a sphere. PgSphere was intended to address
More informationSAS Data Libraries. Objectives. Airline Data Library. SAS Data Libraries. SAS Data Libraries FILES LIBRARIES
Reading Raw Data, Formats and Data Types 2.1 SAS Data Libraries 2.2 SAS List Reports from SAS Data Sets 2.3 Formats in SAS 2.4 Reading Raw Data into SAS 2.5 Minitab List Reports from Minitab Worksheets
More informationExcel 2010 Functions. 4/18/2011 Archdiocese of Chicago Mike Riley
Excel 2010 Functions 4/18/2011 Archdiocese of Chicago Mike Riley i VIDEO TUTORIALS AVAILABLE Almost 100,000 video tutorials are available from VTC. The available tutorials include Windows 7, GroupWise
More informationSimple sets of data can be expressed in a simple table, much like a
Chapter 1: Building Master and Detail Pages In This Chapter Developing master and detail pages at the same time Building your master and detail pages separately Putting together master and detail pages
More informationCS 374 Fall 2014 Homework 2 Due Tuesday, September 16, 2014 at noon
CS 374 Fall 2014 Homework 2 Due Tuesday, September 16, 2014 at noon Groups of up to three students may submit common solutions for each problem in this homework and in all future homeworks You are responsible
More informationCSCI 2010 Principles of Computer Science. Data and Expressions 08/09/2013 CSCI
CSCI 2010 Principles of Computer Science Data and Expressions 08/09/2013 CSCI 2010 1 Data Types, Variables and Expressions in Java We look at the primitive data types, strings and expressions that are
More informationMODULE 02: BASIC COMPUTATION IN JAVA
MODULE 02: BASIC COMPUTATION IN JAVA Outline Variables Naming Conventions Data Types Primitive Data Types Review: int, double New: boolean, char The String Class Type Conversion Expressions Assignment
More informationIT 374 C# and Applications/ IT695 C# Data Structures
IT 374 C# and Applications/ IT695 C# Data Structures Module 2.1: Introduction to C# App Programming Xianrong (Shawn) Zheng Spring 2017 1 Outline Introduction Creating a Simple App String Interpolation
More informationSo, Your Data are in Excel! Ed Heaton, Westat
Paper AD02_05 So, Your Data are in Excel! Ed Heaton, Westat Abstract You say your customer sent you the data in an Excel workbook. Well then, I guess you'll have to work with it. This paper will discuss
More informationproc print data=account; <insert statement here> run;
Statistics 6250 Name: Fall 2012 (print: first last ) Prof. Fan NetID #: Midterm Three Instructions: This is an in-class and open book midterm. You must write your answers on the provide spaces. Give concise
More informationSardar Vallabhbhai Patel Institute of Technology (SVIT), Vasad M.C.A. Department COSMOS LECTURE SERIES ( ) (ODD) Code Optimization
Sardar Vallabhbhai Patel Institute of Technology (SVIT), Vasad M.C.A. Department COSMOS LECTURE SERIES (2018-19) (ODD) Code Optimization Prof. Jonita Roman Date: 30/06/2018 Time: 9:45 to 10:45 Venue: MCA
More informationUsing DbVisualizer Variables
Using DbVisualizer Variables DbVisualizer variables are used to build parameterized SQL statements and let DbVisualizer prompt you for the values when the SQL is executed. This is handy if you are executing
More informationThe PCAT Programming Language Reference Manual
The PCAT Programming Language Reference Manual Andrew Tolmach and Jingke Li Dept. of Computer Science Portland State University September 27, 1995 (revised October 15, 2002) 1 Introduction The PCAT language
More informationLogical Operators and switch
Lecture 5 Relational and Equivalence Operators SYS-1S22 / MTH-1A66 Logical Operators and switch Stuart Gibson sg@sys.uea.ac.uk S01.09A 1 Relational Operator Meaning < Less than > Greater than
More informationHow SAS Thinks Neil Howard, Basking Ridge, NJ
Paper HW01_05 How SAS Thinks Neil Howard, Basking Ridge, NJ ABSTRACT The DATA step is the most powerful tool in the SAS system. Understanding the internals of DATA step processing, what is happening and
More informationSELF TEST. List the Capabilities of SQL SELECT Statements
98 SELF TEST The following questions will help you measure your understanding of the material presented in this chapter. Read all the choices carefully because there might be more than one correct answer.
More informationExcel 2016: Formulas & Functions
Excel 2016: Formulas & Functions Rylander Consulting www.rylanderconsulting.com sandy@rylanderconsulting.com 425.445.0064 ii Excel 2016: Formulas & Functions Excel 2016: Formulas & Functions i Table of
More informationLanguage Basics. /* The NUMBER GAME - User tries to guess a number between 1 and 10 */ /* Generate a random number between 1 and 10 */
Overview Language Basics This chapter describes the basic elements of Rexx. It discusses the simple components that make up the language. These include script structure, elements of the language, operators,
More informationRestricting and Sorting Data. Copyright 2004, Oracle. All rights reserved.
Restricting and Sorting Data Objectives After completing this lesson, you should be able to do the following: Limit the rows that are retrieved by a query Sort the rows that are retrieved by a query Use
More informationprintf( Please enter another number: ); scanf( %d, &num2);
CIT 593 Intro to Computer Systems Lecture #13 (11/1/12) Now that we've looked at how an assembly language program runs on a computer, we're ready to move up a level and start working with more powerful
More informationMATH 707-ST: Introduction to Statistical Computing with SAS and R. MID-TERM EXAM (Writing part) Fall, (Time allowed: TWO Hours)
MATH 707-ST: Introduction to Statistical Computing with SAS and R MID-TERM EXAM (Writing part) Fall, 2013 (Time allowed: TWO Hours) Highlight your answer clearly for each question. There is only one correct
More informationPayflow Implementer's Guide FAQs
Payflow Implementer's Guide FAQs FS-PF-FAQ-UG-201702--R016.00 Fairsail 2017. All rights reserved. This document contains information proprietary to Fairsail and may not be reproduced, disclosed, or used
More informationPL / SQL Basics. Chapter 3
PL / SQL Basics Chapter 3 PL / SQL Basics PL / SQL block Lexical units Variable declarations PL / SQL types Expressions and operators PL / SQL control structures PL / SQL style guide 2 PL / SQL Block Basic
More informationBEPI FOR PROGRAMMERS
BEPI FOR PROGRAMMERS General This manual is intended for those with some experience of programming. Less experienced programmers may prefer to refer to a longer document BEPI User Manual. As with any programming
More informationControl Structures. Code can be purely arithmetic assignments. At some point we will need some kind of control or decision making process to occur
Control Structures Code can be purely arithmetic assignments At some point we will need some kind of control or decision making process to occur C uses the if keyword as part of it s control structure
More informationText. Text Actions. String Contains
Text The Text Actions are intended to refine the texts acquired during other actions, for example, from web-elements, remove unnecessary blank spaces, check, if the text matches the defined content; and
More informationLet the CAT Out of the Bag: String Concatenation in SAS 9
Let the CAT Out of the Bag: String Concatenation in SAS 9 Joshua M. Horstman, Nested Loop Consulting, Indianapolis, IN, USA ABSTRACT Are you still using TRIM, LEFT, and vertical bar operators to concatenate
More informationRegular Expressions. Upsorn Praphamontripong. CS 1111 Introduction to Programming Spring [Ref: https://docs.python.org/3/library/re.
Regular Expressions Upsorn Praphamontripong CS 1111 Introduction to Programming Spring 2018 [Ref: https://docs.python.org/3/library/re.html] Overview: Regular Expressions What are regular expressions?
More informationTen Great Reasons to Learn SAS Software's SQL Procedure
Ten Great Reasons to Learn SAS Software's SQL Procedure Kirk Paul Lafler, Software Intelligence Corporation ABSTRACT The SQL Procedure has so many great features for both end-users and programmers. It's
More informationTables From Existing Tables
Creating Tables From Existing Tables After completing this module, you will be able to: Create a clone of an existing table. Create a new table from many tables using a SQL SELECT. Define your own table
More informationSYSTEM 2000 Essentials
7 CHAPTER 2 SYSTEM 2000 Essentials Introduction 7 SYSTEM 2000 Software 8 SYSTEM 2000 Databases 8 Database Name 9 Labeling Data 9 Grouping Data 10 Establishing Relationships between Schema Records 10 Logical
More informationDOWNLOAD PDF MICROSOFT EXCEL ALL FORMULAS LIST WITH EXAMPLES
Chapter 1 : Examples of commonly used formulas - Office Support A collection of useful Excel formulas for sums and counts, dates and times, text manipularion, conditional formatting, percentages, Excel
More informationSAS Certification Handout #5: Ch /************ Ch. 13 ********************/ /* NOTE: Ch. 13 presents loads of functions; see pp.
SAS Certification Handout #5: Ch. 13-15 /************ Ch. 13 ********************/ /* NOTE: Ch. 13 presents loads of functions see pp. 452-455 */ /* MEAN function */ data a5 input X1-X5 Xmeans = mean(of
More informationSAS Macro Language: Reference
SAS Macro Language: Reference INTRODUCTION Getting Started with the Macro Facility This is the macro facility language reference for the SAS System. It is a reference for the SAS macro language processor
More informationBase and Advance SAS
Base and Advance SAS BASE SAS INTRODUCTION An Overview of the SAS System SAS Tasks Output produced by the SAS System SAS Tools (SAS Program - Data step and Proc step) A sample SAS program Exploring SAS
More informationBasics of Java Programming
Basics of Java Programming Lecture 2 COP 3252 Summer 2017 May 16, 2017 Components of a Java Program statements - A statement is some action or sequence of actions, given as a command in code. A statement
More informationHow to bulk upload users
City & Guilds How to bulk upload users How to bulk upload users The purpose of this document is to guide a user how to bulk upload learners and tutors onto SmartScreen. 2014 City and Guilds of London Institute.
More informationSAS 101. Based on Learning SAS by Example: A Programmer s Guide Chapters 9, 11 & 12. By Tasha Chapman, Oregon Health Authority
SAS 101 Based on Learning SAS by Example: A Programmer s Guide Chapters 9, 11 & 12 By Tasha Chapman, Oregon Health Authority Topics covered SAS dates Date functions Numeric functions Character functions
More informationMore with SQL Queries. Advanced SAS Programming
More with SQL Queries Advanced SAS Programming Some PROC SQL Options Options available in the PROC SQL statement FEEDBACK(NOFEEDBACK): provides more detailed information in the SAS log. FLOW(noflow):
More informationBabu Madhav Institute of Information Technology, UTU 2015
Five years Integrated M.Sc.(IT)(Semester 5) Question Bank 060010502:Programming in Python Unit-1:Introduction To Python Q-1 Answer the following Questions in short. 1. Which operator is used for slicing?
More informationCROSSREF Manual. Tools and Utilities Library
Tools and Utilities Library CROSSREF Manual Abstract This manual describes the CROSSREF cross-referencing utility, including how to use it with C, COBOL 74, COBOL85, EXTENDED BASIC, FORTRAN, Pascal, SCREEN
More informationFORGOT PASSWORD INSTRUCTIONS
FORGOT PASSWORD INSTRUCTIONS Before continuing, please read the following: If you are a NEW user to the Employee Self Service (ESS) application or if you have accessed ESS previously but NEVER established
More informationExcel Templates. & Quote/Invoice Maker for ACT! v.5.0. for ACT! Another efficient and affordable ACT! Add-On by.
Excel Templates & Quote/Invoice Maker for ACT! v.5.0 for ACT! 2006 Another efficient and affordable ACT! Add-On by http://www.exponenciel.com Excel Templates for ACT! User s Manual 2 Table of content Purpose
More informationSample Test #1 Questions
Sample Test #1 Questions 1. Fibonacci numbers & Iteration Structures/using elsif a. Another program to generate Fibonacci numbers b. Makes use of the elsif selection structure c. It saves us of repeated
More informationArithmetic Operations
232 Chapter 4 Variables and Arithmetic Operations Arithmetic Operations The ability to perform arithmetic operations on numeric data is fundamental to computer programs. Many programs require arithmetic
More informationThe SPL Programming Language Reference Manual
The SPL Programming Language Reference Manual Leonidas Fegaras University of Texas at Arlington Arlington, TX 76019 fegaras@cse.uta.edu February 27, 2018 1 Introduction The SPL language is a Small Programming
More informationThe PSHUP File Load and Maintenance is a combination of four specific processes.
One Time PSHUP File Load and Maintenance - 13i Purpose: Use this document as a reference for how to: load the One Time PSHUP Template.CSV file to the staging table, make changes to that data once loaded,
More informationProgramming for Engineers Introduction to C
Programming for Engineers Introduction to C ICEN 200 Spring 2018 Prof. Dola Saha 1 Simple Program 2 Comments // Fig. 2.1: fig02_01.c // A first program in C begin with //, indicating that these two lines
More informationGIFT Department of Computing Science Data Selection and Filtering using the SELECT Statement
GIFT Department of Computing Science [Spring 2013] CS-217: Database Systems Lab-2 Manual Data Selection and Filtering using the SELECT Statement V1.0 4/12/2016 Introduction to Lab-2 This lab reinforces
More information$Id: asg4-shell-tree.mm,v :36: $
cmps012b 2002q2 Assignment 4 Shell and Tree Structure page 1 $Id: asg4-shell-tree.mm,v 323.32 2002-05-08 15:36:09-07 - - $ 1. Overview A data structure that is useful in many applications is the Tree.
More informationMAILMERGE WORD MESSAGES
MAILMERGE WORD 2007 It is recommended that Excel spreadsheets are used as source files and created with separate columns for each field, e.g. FirstName, LastName, Title, Address1, Address2, City, State,
More informationChapter 6: Deferred Report Writer
Chapter 6: Deferred Report Writer CHAPTER 6: DEFERRED REPORT WRITER... 1 DEFERRED REPORT WRITER OVERVIEW... 2 REPORT TITLE (TYPE 01 PARAMETER)... 3 Type 01 Parameter Fields... 3 EXPANDER OPTION (TYPE 02
More informationData and Expressions. Outline. Data and Expressions 12/18/2010. Let's explore some other fundamental programming concepts. Chapter 2 focuses on:
Data and Expressions Data and Expressions Let's explore some other fundamental programming concepts Chapter 2 focuses on: Character Strings Primitive Data The Declaration And Use Of Variables Expressions
More informationCONTENTS: Compilation Data and Expressions COMP 202. More on Chapter 2
CONTENTS: Compilation Data and Expressions COMP 202 More on Chapter 2 Programming Language Levels There are many programming language levels: machine language assembly language high-level language Java,
More informationHonors Computer Science Python Mr. Clausen Programs 4A, 4B, 4C, 4D, 4E, 4F
PROGRAM 4A Full Names (25 points) Honors Computer Science Python Mr. Clausen Programs 4A, 4B, 4C, 4D, 4E, 4F This program should ask the user for their full name: first name, a space, middle name, a space,
More informationIntro to Programming. Unit 7. What is Programming? What is Programming? Intro to Programming
Intro to Programming Unit 7 Intro to Programming 1 What is Programming? 1. Programming Languages 2. Markup vs. Programming 1. Introduction 2. Print Statement 3. Strings 4. Types and Values 5. Math Externals
More informationSAS Certification Handout #8: Adv. Prog. Ch. 1-2
/* First, make example data SAS Certification Handout #8: Adv. Prog. Ch. 1-2 libname cert 'C:/jrstevens/Teaching/SAS_Cert/AdvNotes' /* In SAS Studio, after creating SAS_Cert folder with username jrstevens:
More informationML 4 A Lexer for OCaml s Type System
ML 4 A Lexer for OCaml s Type System CS 421 Fall 2017 Revision 1.0 Assigned October 26, 2017 Due November 2, 2017 Extension November 4, 2017 1 Change Log 1.0 Initial Release. 2 Overview To complete this
More informationRestricting and Sorting Data. Copyright 2004, Oracle. All rights reserved.
Restricting and Sorting Data Copyright 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Limit the rows that are retrieved by a query Sort
More information12/22/11. Java How to Program, 9/e. Help you get started with Eclipse and NetBeans integrated development environments.
Java How to Program, 9/e Education, Inc. All Rights Reserved. } Java application programming } Use tools from the JDK to compile and run programs. } Videos at www.deitel.com/books/jhtp9/ Help you get started
More informationDesigning Role Based Security to Make Your Job Easier
Designing Role Based Security to Make Your Job Easier Many sites are still using the User Based security schema put into place many Munis versions ago. This is creating extra work with maintenance of security.
More informationBEYOND FORMAT BASICS 1
BEYOND FORMAT BASICS 1 CNTLIN DATA SETS...LABELING VALUES OF VARIABLE One common use of a format in SAS is to assign labels to values of a variable. The rules for creating a format with PROC FORMAT are
More informationPart 1: Access Privileges
Part 1: Access Privileges In database management systems, we often do not want to provide the users full control over our database for different reasons. For example, if Amazon.com customers could delete
More informationCS125 : Introduction to Computer Science. Lecture Notes #4 Type Checking, Input/Output, and Programming Style
CS125 : Introduction to Computer Science Lecture Notes #4 Type Checking, Input/Output, and Programming Style c 2005, 2004, 2002, 2001, 2000 Jason Zych 1 Lecture 4 : Type Checking, Input/Output, and Programming
More informationORACLE: PL/SQL Programming
%ROWTYPE Attribute... 4:23 %ROWTYPE... 2:6 %TYPE... 2:6 %TYPE Attribute... 4:22 A Actual Parameters... 9:7 Actual versus Formal Parameters... 9:7 Aliases... 8:10 Anonymous Blocks... 3:1 Assigning Collection
More informationCSc 10200! Introduction to Computing. Lecture 2-3 Edgardo Molina Fall 2013 City College of New York
CSc 10200! Introduction to Computing Lecture 2-3 Edgardo Molina Fall 2013 City College of New York 1 C++ for Engineers and Scientists Third Edition Chapter 2 Problem Solving Using C++ 2 Objectives In this
More information