Playing With String Data David Fickbobm, Fireman's Fund Insurance Company, Novato, CA

Size: px
Start display at page:

Download "Playing With String Data David Fickbobm, Fireman's Fund Insurance Company, Novato, CA"

Transcription

1 Playing With String Data David Fickbobm, Fireman's Fund Insurance Company, Novato, CA Abstract This talk will introduce beginning SAS users to the idea of using string functions. Users will be introduced to several STRING functions that come with BASE SAS. Attendees will learn functions provide quick easy ways to work with STRING data. They will learn functions provide the building blocks for effective, more flexible SAS programs. Users will be introduced to the LENGTH, SUBSTR, COMPRESS, VERIFY, INPUT, PUT, TRANSLATE, SCAN, TRIM, UPCASE, REPEAT, II (concatenation), INDEX, and INDEXC functions. How Lengths of Character Variables are Set in a SAS Data Step Before discussing these functions, it would be helpful to understand bow base SAS assigns storage lengths to character variables and what the LENGTH function does for us. Look at the following program: DATA EXAMPLE!; INPUT STRING $3.; LEFT= 'X'; *X AND 4 BLANKS; RIGHT=' X'; *4 BLANKS AND X; Cl = SUBSTR(GROUP,l,2); C2 = REPEAT(GROUP,l); LGROUP = LENGTH(GROUP); LSTRING = LENGTH(STRING); LLEFT = LENGTH(LEFT); LRIGHT = LENGTH(RIGHT); LCJ = LENGTH(Cl); LC2 = LENGTH(C2); ABCDEFGH 123 XXX 4 y 5 PROC CONTENTS DATA=EXAMPLEI POSITION; TITLE 'OUTPUT FROM PROC CONTENTS'; PROC PRINT DATA=EXAMPLEI NOOBS; TITLE 'LISTING OF EXAMPLE I'; One purpose of this example is to explain the term LENGTH. If you look at the output from PROC CONTENTS, each of the variables is listed, along with a TYPE and LENGTH. Take a moment and look at the output from PROC CONTENTS below: Output From Proc Contents ----Variables Ordered by Position- # Variable Type Len Pos I GROUP Char STRING Char LEFT Char RIGHT Char Cl Char C2 Char LGROUP Num LSTRING Num LLEFT Num LRIGHT Num LCI Num LC2 Num The column labeled LEN (Length) is the number of storage positions needed to store the values for each variables listed. By default, all the numeric variables are stored in 8 bytes. But, what about the storage lengths of the character variables. First look at the two variables listed in the INPUT statement; GROUP and STRING. Since this is the first mention of these variables in this data step, their lengths will be assigned by the rules governing INPUT statements. No columns or IN FORMATS were associated with the variable GROUP, so its length will be set to 8 bytes, the default length for character variables in this situation. The variable STRING uses a $3. INFORMAT so its length is set to 3 bytes. The length oflleft and LRIGHT are controlled by the assignment statement. Most statements in SAS begin with a systatic name. The name defines what kind of instruction this is. The assignment statement begins with a variable name followed by the "=" and then a valid SAS statement. The storage lengths of C I and C2 are a bit more difficult to understand. The variable C 1 is defined to be a substring of the variable GROUP. The SUBSTR function takes the form: SUBSTR(char_var,start,length); which means to take a substring from char_var starting at the position indicated by the start argument for a length indicated by the length argument. Why then, is the length of C 1 equal to 8 and not 2? The SAS compiler determines 75

2 lengths at compile time. Since the starting position and length arguments of the SUBSTR function can be a variable, the compiler must set the length of C I equal to the largest possible value it can ever attaln, the length of GROUP. The same logic determines the length of C2, defined by the REPEAT function. Since the number of additional replications is defined by the second argument of the REPEAT function, and this argument can be a variable expression, the compiler sets the length of C2 to the largest possible value, 200; the maximum length of a character variable in the SAS system. Therefore, always use a LENGTH statement for any character variable that does not derive its length elsewhere. For example, to set the length of C2 to 16, you would write: LENGTH C2 $ 16; The LENGTH function returns the length of a character string, not including trailing blanks. The value of LEFT and RIGHT are one and five respectively, for every observation. This demonstrates that the trailing blanks in LEFT are not counted by the LENGTH function while the leading blanks in RIGHT are. The table below summarizes the values returned by the LENGTH function for the remaining variables: OBS group Lgroup string Lstring I abcdefgh XXX y 1 5 OBS Cl LC1 C2 1 ab 2 ABCDEFGHABCDEFGH 2 XX 2 XXX XXX 3 Y I Y Y The values oflgroup and LSTRING are very understandable. The value of LC 1 is 1 for the third observation since C I is only I byte in length in the third observation. The values for LC2 are not as easy to understand. The REPEAT function says to take the original value and repeat it n times. As a result, the first observation, LC2 is 16 (2 times 8). Looking at observations 2 and 3, the trailing blanks must be accounted for. In observation 2, the value of GROUP is 'XXXbbbbb' (where the b's stand for blanks). When we repeat this string one time, we get: 'XXXbbbbbXXXbbbbb'. We do not count the trailing blanks, so the length is II == I 1 The same logic applies to the third observation; we have a 'Y' followed by 7 blanks repeated once. We do not count the last 7 trailing blanks, so we have a length of9 = 8 + I. The foundation being set, we now start to get our string tools out of our toolbox. Using the proper tools makes building anything much easier, makes us more efficient, and more effective. Let us look at some of the string functions tools available in SAS software toolbox. How to Remove Charaeters from a String A common problem is removing selected characters from a string. For example, suppose you want to remove blanks, parentheses, and dashes from a telephone number or any other variable that has been stored as a character value. We take our COMPRESS function tool outof our toolbox. The COMPRESS function can remove any number of specified characters from a character variable. The program below uses the COMPRESS function twice: To remove blanks from the string; and to remove blanks, paoontheses, and dashes. Here is the code: DATA EXAMPLE2; INPUT PHONE$ 1-15; APHONE = COMPRESS(PHONE); BPHONE = COMPRESS(PHONE,'(-) '); (415) (510) PROC PRINT DATA=EXAMPLE2; TITLE 'LISTING OF EXAMPLE 2'; The blanks have been removed from APHONE. Please note we did not use a second argument in this situation. When a second argument is omitted, the COMPRESS function removes only blanks. For the variable BPHONE, the second argument contains a list of the characters to remove: left parenthesis, blank, right parenthesis, and blank. This string can be placed in single or double quotes. Cbaracter Data Verification Validation is a common job in information technology. As an example you need to be sure that only certain values are in a character variable. Below, only 'A', '8', 'C', 'D', and 'E' are valid data values. An easy way to test ifthere are any invalid characters present is shown next: 76

3 DATA EXAMPLE3; INPUT ID $ 1-3 ANSWER$ 5-9; P = VERIFY(ANSWER,'ABCDE'); OK=PEQO; 001 ACBED 002ABXDE CCE 004ABC E PROC PRINT DATA=EXAMPLE3 NOOBS; TITLE 'LISTING OF EXAMPLE 3'; The function tool we use in this program is the VERIFY function. It iuspects every character in the first argument and, if it finds a value not in the verity string (the second argument), it will return the position of the first erroneous value. If all values in the string are located in the verity string. a value of 0 is returned. In the first observation P = 0 and OK = 1. The P in the second observation-will be 3 (the position of the 'X') and OK will be 0. The P in the third observation is a 1 and OK will be 0. The P in the fourth observation will be a 5 and OK will be 0. The Substring Tool The substring function works with part of a longer string. In our example, we want to create two variables from our ID code input. Our data contains a two-position state abbreviation code in positions 1 and 2. Positions 7, 8, and 9 are a county code. We want to create two variables from this data; one containing the two digit state codes and the other, a numeric variable representing the county within the state. The county code will be from positions 7,8, and 9. We can use the SUBSTR tool very nicely here. The code follows: DATA EXAMPLE4; INPUT ID $ 1-9; LENGTHSTATE$2; LENGTH NUM $ 3.; STATE= SUBSTR(ID,l,2); NUM = INPUT(SUBSTR(ID,7,3),3.); CAXXXXI23 NV PROC PRINT DATA=EXAMPLE4 NOOBS; TITLE 'LISTING OF EXAMPLE 4'; Creating the state code is easy. We use the SUBSTR function. The first argument is the variable from which we want to extract the substring, the second argument is the starting position of the substring. and the last argument is the length of the substring. Note it is the length, NOT the last position of the substring. Also, note the use of the LENGTH statement to set the length of STATE to 2 bytes. Extracting the three digit number code is more work. First, we use a length statement to set the length ofnum to 3. Next, we use the SUBSTR function to pull out the three numbers. However, the result of a SUBSTR function is always a character value. We want numeric output, so we use our INPUT tool to convert the character value to a number. If we had not used a length statement, num would default to 8 when it was converted from character to numeric.. The INPUT function takes the first argument and "reads" it as if it were coming from a file, according to the informat listed as the second argument. So, the SUBSTR function would return the string '123' for the first observation and the INPUT function would convert this to the number 123. Here is a little tip, you may use a longer informat as the second argument and SAS will NOT object. For example, the INPUT statement could have been written as: INPUT (SUBSTR{ID,7,3),8.); and everything would have been fine. If you do not know the length of the string ahead of time, using a longer informat is very useful. Using the SUBSTR Function on the Left Hand Side of the Equal Sign The SUBSTR function, placed on the left-hand side of the equal sign, can place characters in specific locations within a string. Suppose you have some resting heart rate measurements (RHR) and some stress heart rate measurements (SHR) in a SAS data set. You want to print out these values and star high values with an asterisk Here is a program that uses the SUBSTR function on the left of the equals sign to do that: DATA EXAMPLES; INPUT RHR LENGTH RHR_CHK SHR_CHK $4; RHR_CHK = PUT(RHR,3.); SHR_CHK = PUT(SHR,3.); IF SHR GT 130 THEN SUBSTR(SHR_CHK,4,1) = '*'; IF RHR GT 90 THEN 77

4 SUBSTR(RHR _ CHK,4, 1) = '*'; PROC PRINT DATA=EXAMPLES NOOBS; TITLE 'LISTING OF EXAMPLE 5'; First I set the lengths of RHR _ CHK and SHR_ CHK to 4 (three spaces for the value plus one for the possible asterisk). Then, we use the PUT function to perform a numeric to character conversion. The PUT function is similar to the INPUT function. It "creates" the value of the first argument, according to the FORMAT specified in the second argument. In other words "creates" actually assigns the value to the variable on the left of the equal sign. The SUBSTR function then places an asterisk in the fourth position when a value ofwhr is greater than 130 or a value ofrhr is greater than 80. Doing the Previous Example tbe Hard Way It is possible and informative to create the above results without using the SUBSTR function. This solution uses a number of character functions that can be useful. Therefore, this is a great way to demonstrate them. Here is the program: DATA EXAMPLE6; INPUT SHR LENGTH SHR_CHK RHR_CHK $ 4; SHR_CHK = PUT(SHR,3.); RHR_CHK = PUT(RHR,3.); IF SHR GT 160 THEN SHR_CHK = SUBSTR(SHR_CHK,l,3) II'*'; IF RHR GT 90 THEN RHR_CHK = TRIM(RHR_CHK) II'*'; ' PROC PRINT DATA=EXAMPLE6 NOOBS; TITLE 'LISTING OF EXAMPLE 6'; Actually example6 is not much more complex but not as elegant as examples. This program uses the concatenation operator (II) to join the 3 character heart rate values with an asterisk. Since SHR _ CHK and RHR _ CHK were.both assigned a length of 4, we wanted to be sure to concatenate at most the first 3 positions with the asterisk. I did this two ways to show more uses of functions. For the SHR_ CHK variable, we used a SUBSTR function to extract the first 3 bytes. For the RHR_CHK variable, the TRIM function was used. The TRIM function removes trailing blanks from a character string. Unpacking a String To save disk space, I sometimes store several single digit numbers in a longer character string. As an example, storing four numbers as numeric variables with the default 8 bytes each would take up 32 positions of disk space for each observation. Even reducing this to 3 positions each would result in 12 positions ofspace. Instead, store the four digits as a single character value, you will need only 4 positions. This is fine, but at some point, you will want to use the numbers for computational purposes. Here is an easy way to do this: DATA EXAMPLE7; INPUT STRING $ 1-4; DATA UNPACK; SET EXAMPLE7; ARRAY X[4];. DOJ =I T04; X[J] =INPUT( SUBSTR(STRING,J,l),l.); END; DROPJ; PROC PRINT DATA=UNPACK NOOBS; TITLE 'LISTING OF UNPACK'; First, I created an array to hold the four numbers, XI to X4. Do NOT worry if you do not see any variables listed on the ARRAY statement. ARRAY X[4]; is the same as ARRAY X[4] Xl X4; We use a DO loop to cycle through each of the 4 starting positions corresponding to the four numbers we want. As we mentioned before, since the result of the SUBSTR function is a character value, we need to use the INPUT function to perform the character to numeric conversion Parsing a String Parsing means to take something apart based on some rules. The example that follows shows how five separate character values were placed together on a line with either a space, a comma, a semi-colon, a period, or an explanation mark 78

5 between them. Our job, if we should accept it, is to extract the five values and assign them to five separate variables. Fortunately, the SCAN function makes this job easy: DATA EXAMPLES; INPUT LONG_STR $ 1-80; ARRAY PARTS[5] $ 10 PARTS1-PARTS5; DO I= I TO 5; PARTS[!]= SCAN(LONG_STR,I,',;.! '); END; DROP LONG_STR I; DATALINES4; THIS LINE,CONTAINS!FIVE.WORDS ABCDEFGHIJKL AAA;BBB,, PROC PRINT DATA=EXAMPLE8 NOOBS; TITLE 'LISTING OF EXAMPLE 8'; Before our discussion of the SCAN function, I want to explain OAT ALINES4 and the four semi-colons ending the data. If you have data values that can include semicolons,.you cannot use a simple OAT ALINES (or CARDS) statement since the semicolon would signal the end of your data. Instead, the statement DATALINES4 (or CARDS4) is used. This causes the program to continue reading data values until four semicolons are read. The SCAN (char var,n,'list-of-delimiters') function returns the nth "word" from the char_var, where a "word" is defmed as anything between two delimiters. If there are fewer than n words in the character variable, the SCAN function will return a blank. Placing the SCAN function in a DO loop will let us pick out the nth word in the character string. Loeating tbe Position of One String witbin Anotber String Two somewhat similar functions, INDEX and INDEXC, can be used to locate a string, or one of several strings within a longer string. For instance, if you have a string ABCDEFG and want the location of the letters DEF (starting position 4), the following INDEX function could be used: INDEX('ABCDEFG','DEF') this would return a value of 4. If you want to know the starting position of any one of several strings, the INDEXC function can be used. As an example, if you want to find the starting position of either 'BC', or 'FG' in the string 'ABCDEFG', you would code: INDEXC('ABCDEFG','BC','FG'); The function would return a value of2, the starting position of'bc'. A short program which demonstrate these two functions follows: DATAEX_9; INPUT STRING $ 1-10; FIRST= INDEX(STRING,'XYZ'); FIRST_C= INDEXC(STRING,'X','Y','Z'); ABCXYZI ABCX1Y2Z39 ABCZZZXYZ3 PROC PRINTDATA=EX_9NOOBS; TITLE 'LISTING OF EXAMPLE 9'; FIRST and FIRST_ C for each of the the 4 observations are: OBS FIRST FIRST_ C I When the search fails, both functions return a zero. Cbanging Lower Case to Upper Case The UPCASE function does exactly what you expect it to do. This function is useful when a mixture of upper and lower cases values are entered for the same variable. The answer is to convert them all to uppercase. An easy way to handle this is by placing the character variables in an array and UPCASE them all. Here is an example of such a program: DATAEX_IO; LENGTHABCDE$1; INPUT A B C DE X Y; NGRr'E23 OmnFN45 DATA UPWEGO; SETEX_lO; ARRAY ALL_C[*]_CHARACTER_; DO I= I TO DIM(ALL_C); 79

6 ALL_C[I] ""UPCASE(ALL_C[I]); END; DROP I; PROC PRINT DATA=UPWEGO NOOBS; TITLE 'LISTING OF UPWEGO'; This program uses the_ CHARACTER_ keyword to select all the character variables. Running this job converts the values of the variables A, B, C, D and E to upper case. Substituting One Character for Another TRANSLATE is a very nice character function. This tool allows us to convert one character to another in a string. As an example, multiple choices survey answers have been entered as I, 2, 3, 4, 5, these numbers represent the letters 'A' through 'E' respectively. When the answers are printed out, we want to see the characters A' through 'E' rather than' I' through '5'. While formats would accomplish this nicely, this method provides an example for the TRANSLATE function. Here is the code: DATAEX II; INPUT ANS : ANS= TRANSLATE(ANS,'ABCDE','12345'); PROC PRINT DATA=EX_ll NOOBS; TITLE 'LISTING OF EXAMPLE II'; The TRANSLATE function syntax is: TRANSLATE( char_ var,to _string, from_ string) Each value in the from_ string will be translated to the corresponding value in the to_ string. One more use of the TRANSLATE function is changing character variables to numeric variables depending on the value of the character variable. Maybe you want to set values of'n' to 0 and values of 'Y' to I. This is easily done with IF-THEN/ELSE statements but we can also do it using the TRANSLATE function. Here gbes: UPCASE(CHAR),'OI','NY'),l.); NYnyABOI ' PROC PRINT DATA=EX_12 NOOBS; TITLE 'LISTING OF EXAMPLE 12'; The UPCASE function sets all values to upper case. Next, the TRANSLATE function converts values of'n' to '0' and 'Y' to 'I'. Finally, the INPUT function converts the numerals '0' and 'I' to the numbers 0 and I respectively. Conclusions Well, that is all of the character string tools we have time and space to discuss. This hopefully has gotten you interested in using these tools. So go out there and have a ball with strings! Acknowledgements Thanks to Virginia "Gigi" Gruber for reviewing the topics and content of this paper for clarity, completeness, and usefulness. Thanks to Francis "Fran" Larson for reviewing the paper for SAS accuracy. The paper and I are both better for it. SAS is a registered trademark of the SAS Institute Inc., Cary, NC, USA Any comments, questions, or thoughts on your experiences with these functions are most welcome. David can be contacted atthe following address: Fireman's Fund Insurance Company 777 San Marin Drive Novato, CA David Fickbohm@FFIC.COM (415) DATAEX_l2; LENGTH CHAR$ I; INPUT X=INPUT( TRANSLATE( 80

II (concatenation), INDEX, INDEXC, AND SOUNDEX. Wow, did you realize there were so many string functions? let's get started.

II (concatenation), INDEX, INDEXC, AND SOUNDEX. Wow, did you realize there were so many string functions? let's get started. Having a Ball with Strings Ronald Cody, Ed.D. Robert Wood Johnson Medical School Introduction SAS software is especially rich in its assortment of functions that deal with character data. This class of

More information

INTRODUCTION TO SAS HOW SAS WORKS READING RAW DATA INTO SAS

INTRODUCTION 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 information

Introduction. Getting Started with the Macro Facility CHAPTER 1

Introduction. Getting Started with the Macro Facility CHAPTER 1 1 CHAPTER 1 Introduction Getting Started with the Macro Facility 1 Replacing Text Strings Using Macro Variables 2 Generating SAS Code Using Macros 3 Inserting Comments in Macros 4 Macro Definition Containing

More information

Data Cleansing Functions Caroline Bahler, Meridian Software Inc

Data Cleansing Functions Caroline Bahler, Meridian Software Inc Data Cleansing Functions Caroline Bahler, Meridian Software Inc Introduction Functions are small programming subroutines and can be defined as the work horses of any data cleansing operation. Dirty data,

More information

Hidden in plain sight: my top ten underpublicized enhancements in SAS Versions 9.2 and 9.3

Hidden in plain sight: my top ten underpublicized enhancements in SAS Versions 9.2 and 9.3 Hidden in plain sight: my top ten underpublicized enhancements in SAS Versions 9.2 and 9.3 Bruce Gilsen, Federal Reserve Board, Washington, DC ABSTRACT SAS Versions 9.2 and 9.3 contain many interesting

More information

Once Written, Twice Applied: The Basics of Array Processing In SAS Elizabeth A. Roth, RAND Corporation, Santa Monica, CA

Once Written, Twice Applied: The Basics of Array Processing In SAS Elizabeth A. Roth, RAND Corporation, Santa Monica, CA Once Written, Twice Applied: The Basics of Array Processing In SAS Elizabeth A. Roth, RAND Corporation, Santa Monica, CA ABSTRACT Using arrays in DATA step programming can streamline programming in important

More information

Chapter 2, Part I Introduction to C Programming

Chapter 2, Part I Introduction to C Programming Chapter 2, Part I Introduction to C Programming C How to Program, 8/e, GE 2016 Pearson Education, Ltd. All rights reserved. 1 2016 Pearson Education, Ltd. All rights reserved. 2 2016 Pearson Education,

More information

Are Strings Tying You in Knots? Deb Cassidy Cardinal Distribution, Dublin, OH

Are Strings Tying You in Knots? Deb Cassidy Cardinal Distribution, Dublin, OH Are Strings Tying You in Knots? Deb Cassidy Cardinal Distribution, Dublin, OH ABSTRACT If the answer to the title questions is YE, then this presentation is for you. You will learn how to make sure you

More information

SAS Macro Language: Reference

SAS 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 information

Programming for Engineers Introduction to C

Programming 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 information

Fifteen Functions to Supercharge Your SAS Code

Fifteen 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 information

3. Conditional Execution

3. Conditional Execution 3. Conditional Execution Topics: Boolean values Relational operators if statements The Boolean type Motivation Problem: Assign positive float values to variables a and b and print the values a**b and b**a.

More information

Intro. Scheme Basics. scm> 5 5. scm>

Intro. Scheme Basics. scm> 5 5. scm> Intro Let s take some time to talk about LISP. It stands for LISt Processing a way of coding using only lists! It sounds pretty radical, and it is. There are lots of cool things to know about LISP; if

More information

3. Conditional Execution

3. Conditional Execution 3. Conditional Execution Topics: Boolean values Relational operators if statements The Boolean type Motivation Problem: Assign positive float values to variables a and b and print the values a**b and b**a.

More information

The Basics of PROC FCMP. Dachao Liu Northwestern Universtiy Chicago

The Basics of PROC FCMP. Dachao Liu Northwestern Universtiy Chicago The Basics of PROC FCMP Dachao Liu Northwestern Universtiy Chicago ABSTRACT SAS Functions can save SAS users time and effort in programming. Each release of SAS has new functions added. Up to the latest

More information

Lecture 1 Getting Started with SAS

Lecture 1 Getting Started with SAS SAS for Data Management, Analysis, and Reporting Lecture 1 Getting Started with SAS Portions reproduced with permission of SAS Institute Inc., Cary, NC, USA Goals of the course To provide skills required

More information

How to Use Adhoc Parameters in Actuate Reports

How to Use Adhoc Parameters in Actuate Reports How to Use Adhoc Parameters in Actuate Reports By Chris Geiss chris_geiss@yahoo.com http://www.chrisgeiss.com How to Use Adhoc Parameters in Actuate Reports By Chris Geiss Revised 3/31/2002 This document

More information

CdmCL Language - Syntax

CdmCL Language - Syntax CdmCL Language - Syntax This documents illustrates the language syntax to express constraints September, 2014 Version 1.0 by Ahmed AHMED, Jean Philippe BABAU CdmCL language In the following, the different

More information

Perl Regular Expression The Power to Know the PERL in Your Data

Perl Regular Expression The Power to Know the PERL in Your Data ABSTRACT MWSUG 2018 Paper SB-145 Perl Regular Expression The Power to Know the PERL in Your Data Kaushal Chaudhary, Eli Lilly and Company, Indianapolis, IN Dhruba Ghimire, Eli Lilly and Company, Indianapolis,

More information

How Actuate Reports Process Adhoc Parameter Values and Expressions

How Actuate Reports Process Adhoc Parameter Values and Expressions How Actuate Reports Process Adhoc Parameter Values and Expressions By Chris Geiss chris_geiss@yahoo.com How Actuate Reports Process Adhoc Parameter Values and Expressions By Chris Geiss (chris_geiss@yahoo.com)

More information

SAS Macro. SAS Training Courses. Amadeus Software Ltd

SAS Macro. SAS Training Courses. Amadeus Software Ltd SAS Macro SAS Training Courses By Amadeus Software Ltd AMADEUS SOFTWARE LIMITED SAS TRAINING Amadeus have been delivering SAS Training since 1989 and our aim is to provide you with best quality SAS training

More information

Section 2.2 Your First Program in Java: Printing a Line of Text

Section 2.2 Your First Program in Java: Printing a Line of Text Chapter 2 Introduction to Java Applications Section 2.2 Your First Program in Java: Printing a Line of Text 2.2 Q1: End-of-line comments that should be ignored by the compiler are denoted using a. Two

More information

Expressions. Definitions CHAPTER 12

Expressions. Definitions CHAPTER 12 131 CHAPTER 12 Expressions Definitions 131 SAS Constants in Expressions 132 Definition 132 Character Constants 132 Using Quotation Marks 132 Comparing Character Constants and Character Variables 133 Hexadecimal

More information

Starting with a great calculator... Variables. Comments. Topic 5: Introduction to Programming in Matlab CSSE, UWA

Starting with a great calculator... Variables. Comments. Topic 5: Introduction to Programming in Matlab CSSE, UWA Starting with a great calculator... Topic 5: Introduction to Programming in Matlab CSSE, UWA! MATLAB is a high level language that allows you to perform calculations on numbers, or arrays of numbers, in

More information

A Brief Tutorial on PERL Regular Expressions

A Brief Tutorial on PERL Regular Expressions bt002 An Introduction to PERL Regular Expressions Ronald Cody, Ed.D., Robert Wood Johnson Medical School, Piscataway, NJ Introduction PERL regular expressions were added to SAS in Version 9. SAS regular

More information

BASIC OPERATORS AND FUNCTIONS

BASIC OPERATORS AND FUNCTIONS 4 BASIC OPERATORS AND FUNCTIONS Chapter 3 covers the use of isolated constants and variables in a CL procedure. This chapter explains the various manipulations you can perform in CL to combine two or more

More information

Language Basics. /* The NUMBER GAME - User tries to guess a number between 1 and 10 */ /* Generate a random number between 1 and 10 */

Language 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 information

Principles of Compiler Design Prof. Y. N. Srikant Department of Computer Science and Automation Indian Institute of Science, Bangalore

Principles of Compiler Design Prof. Y. N. Srikant Department of Computer Science and Automation Indian Institute of Science, Bangalore (Refer Slide Time: 00:20) Principles of Compiler Design Prof. Y. N. Srikant Department of Computer Science and Automation Indian Institute of Science, Bangalore Lecture - 4 Lexical Analysis-Part-3 Welcome

More information

Java Programming Fundamentals - Day Instructor: Jason Yoon Website:

Java Programming Fundamentals - Day Instructor: Jason Yoon Website: Java Programming Fundamentals - Day 1 07.09.2016 Instructor: Jason Yoon Website: http://mryoon.weebly.com Quick Advice Before We Get Started Java is not the same as javascript! Don t get them confused

More information

Chapter 7 File Access. Chapter Table of Contents

Chapter 7 File Access. Chapter Table of Contents Chapter 7 File Access Chapter Table of Contents OVERVIEW...105 REFERRING TO AN EXTERNAL FILE...105 TypesofExternalFiles...106 READING FROM AN EXTERNAL FILE...107 UsingtheINFILEStatement...107 UsingtheINPUTStatement...108

More information

Fundamentals of Programming Session 4

Fundamentals of Programming Session 4 Fundamentals of Programming Session 4 Instructor: Reza Entezari-Maleki Email: entezari@ce.sharif.edu 1 Fall 2011 These slides are created using Deitel s slides, ( 1992-2010 by Pearson Education, Inc).

More information

Top 10 SAS Functions in A brief summary of SAS Communities Survey - by Flora Fang Liu

Top 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 information

Downloaded from Chapter 2. Functions

Downloaded from   Chapter 2. Functions Chapter 2 Functions After studying this lesson, students will be able to: Understand and apply the concept of module programming Write functions Identify and invoke appropriate predefined functions Create

More information

Full file at

Full file at Chapter 2 Introduction to Java Applications Section 2.1 Introduction ( none ) Section 2.2 First Program in Java: Printing a Line of Text 2.2 Q1: End-of-line comments that should be ignored by the compiler

More information

IT 374 C# and Applications/ IT695 C# Data Structures

IT 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 information

Python for Non-programmers

Python for Non-programmers Python for Non-programmers A Gentle Introduction 1 Yann Tambouret Scientific Computing and Visualization Information Services & Technology Boston University 111 Cummington St. yannpaul@bu.edu Winter 2013

More information

SAS Online Training: Course contents: Agenda:

SAS Online Training: Course contents: Agenda: SAS Online Training: Course contents: Agenda: (1) Base SAS (6) Clinical SAS Online Training with Real time Projects (2) Advance SAS (7) Financial SAS Training Real time Projects (3) SQL (8) CV preparation

More information

Fundamentals of Programming. Lecture 3: Introduction to C Programming

Fundamentals of Programming. Lecture 3: Introduction to C Programming Fundamentals of Programming Lecture 3: Introduction to C Programming Instructor: Fatemeh Zamani f_zamani@ce.sharif.edu Sharif University of Technology Computer Engineering Department Outline A Simple C

More information

Base and Advance SAS

Base 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 information

The name of our class will be Yo. Type that in where it says Class Name. Don t hit the OK button yet.

The name of our class will be Yo. Type that in where it says Class Name. Don t hit the OK button yet. Mr G s Java Jive #2: Yo! Our First Program With this handout you ll write your first program, which we ll call Yo. Programs, Classes, and Objects, Oh My! People regularly refer to Java as a language that

More information

Chapter 2 Author Notes

Chapter 2 Author Notes Chapter 2 Author Notes Good Programming Practice 2.1 Every program should begin with a comment that explains the purpose of the program, the author and the date and time the program was last modified.

More information

Using SAS Files. Introduction CHAPTER 5

Using SAS Files. Introduction CHAPTER 5 123 CHAPTER 5 Using SAS Files Introduction 123 SAS Data Libraries 124 Accessing SAS Files 124 Advantages of Using Librefs Rather than OpenVMS Logical Names 124 Assigning Librefs 124 Using the LIBNAME Statement

More information

Project 2: How Parentheses and the Order of Operations Impose Structure on Expressions

Project 2: How Parentheses and the Order of Operations Impose Structure on Expressions MAT 51 Wladis Project 2: How Parentheses and the Order of Operations Impose Structure on Expressions Parentheses show us how things should be grouped together. The sole purpose of parentheses in algebraic

More information

UNIT- 3 Introduction to C++

UNIT- 3 Introduction to C++ UNIT- 3 Introduction to C++ C++ Character Sets: Letters A-Z, a-z Digits 0-9 Special Symbols Space + - * / ^ \ ( ) [ ] =!= . $, ; : %! &? _ # = @ White Spaces Blank spaces, horizontal tab, carriage

More information

SAS 9 Programming Enhancements Marje Fecht, Prowerk Consulting Ltd Mississauga, Ontario, Canada

SAS 9 Programming Enhancements Marje Fecht, Prowerk Consulting Ltd Mississauga, Ontario, Canada SAS 9 Programming Enhancements Marje Fecht, Prowerk Consulting Ltd Mississauga, Ontario, Canada ABSTRACT Performance improvements are the well-publicized enhancement to SAS 9, but what else has changed

More information

Chapter 2: Getting Data Into SAS

Chapter 2: Getting Data Into SAS Chapter 2: Getting Data Into SAS Data stored in many different forms/formats. Four categories of ways to read in data. 1. Entering data directly through keyboard 2. Creating SAS data sets from raw data

More information

Chapter 1 The DATA Step

Chapter 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 information

Purrfectly Fabulous Feline Functions

Purrfectly Fabulous Feline Functions PharmaSUG 2018 - Paper EP-13 Purrfectly Fabulous Feline Functions Louise S. Hadden, Abt Associates Inc. ABSTRACT Explore the fabulous feline functions and calls available in SAS 9.1 and later. Using CAT

More information

Solution sheet 1. Introduction. Exercise 1 - Types of values. Exercise 2 - Constructors

Solution sheet 1. Introduction. Exercise 1 - Types of values. Exercise 2 - Constructors Solution sheet 1 Introduction Please note that there can be other solutions than those listed in this document. This is a literate Haskell file which is available as PDF, as well as literate Haskell source

More information

Shell Programming Overview

Shell Programming Overview Overview Shell programming is a way of taking several command line instructions that you would use in a Unix command prompt and incorporating them into one program. There are many versions of Unix. Some

More information

SAS Certification Handout #11: Adv. Prog. Ch. 9-10

SAS Certification Handout #11: Adv. Prog. Ch. 9-10 SAS Certification Handout #11: Adv. Prog. Ch. 9-10 /************ Ch. 9 ********************/ /* SAS Macros -- like writing your own functions in SAS; especially useful for reproducing analyses or reports

More information

Introduction to C++ Programming Pearson Education, Inc. All rights reserved.

Introduction to C++ Programming Pearson Education, Inc. All rights reserved. 1 2 Introduction to C++ Programming 2 What s in a name? that which we call a rose By any other name would smell as sweet. William Shakespeare When faced with a decision, I always ask, What would be the

More information

Excel Formulas 2018 Cindy Kredo Page 1 of 23

Excel 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 information

Python allows variables to hold string values, just like any other type (Boolean, int, float). So, the following assignment statements are valid:

Python allows variables to hold string values, just like any other type (Boolean, int, float). So, the following assignment statements are valid: 1 STRINGS Objectives: How text data is internally represented as a string Accessing individual characters by a positive or negative index String slices Operations on strings: concatenation, comparison,

More information

Symbol Table Generator (New and Improved) Jim Johnson, JKL Consulting, North Wales, PA

Symbol Table Generator (New and Improved) Jim Johnson, JKL Consulting, North Wales, PA PharmaSUG2011 - Paper AD19 Symbol Table Generator (New and Improved) Jim Johnson, JKL Consulting, North Wales, PA ABSTRACT In Seattle at the PharmaSUG 2000 meeting the Symbol Table Generator was first

More information

ECLT 5810 SAS Programming - Introduction

ECLT 5810 SAS Programming - Introduction ECLT 5810 SAS Programming - Introduction Why SAS? Able to process data set(s). Easy to handle multiple variables. Generate useful basic analysis Summary statistics Graphs Many companies and government

More information

Form / Bank Request List 1 August 2016

Form / Bank Request List 1 August 2016 Training Notes Form / Bank Request List 1 August 2016 The Request List determines the Bank Account and PrintBoss Form used when printing. This is only necessary for accounting software that does not use

More information

TOPIC 2 INTRODUCTION TO JAVA AND DR JAVA

TOPIC 2 INTRODUCTION TO JAVA AND DR JAVA 1 TOPIC 2 INTRODUCTION TO JAVA AND DR JAVA Notes adapted from Introduction to Computing and Programming with Java: A Multimedia Approach by M. Guzdial and B. Ericson, and instructor materials prepared

More information

SAS Macro Programming for Beginners

SAS Macro Programming for Beginners ABSTRACT SAS Macro Programming for Beginners Lora D. Delwiche, Winters, CA Susan J. Slaughter, Avocet Solutions, Davis, CA Macro programming is generally considered an advanced topic. But, while macros

More information

Formulas, LookUp Tables and PivotTables Prepared for Aero Controlex

Formulas, LookUp Tables and PivotTables Prepared for Aero Controlex Basic Topics: Formulas, LookUp Tables and PivotTables Prepared for Aero Controlex Review ribbon terminology such as tabs, groups and commands Navigate a worksheet, workbook, and multiple workbooks Prepare

More information

Introduction. CHAPTER 3 Working in the SAS Windowing Environment

Introduction. CHAPTER 3 Working in the SAS Windowing Environment 57 CHAPTER 3 Working in the SAS Windowing Environment Introduction 57 Using Function Keys 58 Using the SAS ToolBox 60 Using the Command Window 60 Using the Toolbar 61 Using the Tool Icons 61 Opening Files

More information

Using SAS to Parse External Data

Using SAS to Parse External Data Using SAS to Parse External Data Andrew T. Kuligowski presented to Calgary SUG on 25 Oct 2011 Edmonton SUG on 26 Oct 2011 Introduction Using SAS to Parse External Data Introduction Parsers A Primer (a

More information

Pace University. Fundamental Concepts of CS121 1

Pace University. Fundamental Concepts of CS121 1 Pace University Fundamental Concepts of CS121 1 Dr. Lixin Tao http://csis.pace.edu/~lixin Computer Science Department Pace University October 12, 2005 This document complements my tutorial Introduction

More information

for (i=1; i<=100000; i++) { x = sqrt (y); // square root function cout << x+i << endl; }

for (i=1; i<=100000; i++) { x = sqrt (y); // square root function cout << x+i << endl; } Ex: The difference between Compiler and Interpreter The interpreter actually carries out the computations specified in the source program. In other words, the output of a compiler is a program, whereas

More information

12/22/11. Java How to Program, 9/e. Help you get started with Eclipse and NetBeans integrated development environments.

12/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 information

title1 "Visits at &string1"; proc print data=hospitalvisits; where sitecode="&string1";

title1 Visits at &string1; proc print data=hospitalvisits; where sitecode=&string1; PharmaSUG 2012 Paper TF01 Macro Quoting to the Rescue: Passing Special Characters Mary F. O. Rosenbloom, Edwards Lifesciences LLC, Irvine, CA Art Carpenter, California Occidental Consultants, Anchorage,

More information

Excel Tips for Compensation Practitioners Weeks Text Formulae

Excel Tips for Compensation Practitioners Weeks Text Formulae Excel Tips for Compensation Practitioners Weeks 70-73 Text Formulae Week 70 Using Left, Mid and Right Formulae When analysing compensation data, you generally extract data from the payroll, the HR system,

More information

C How to Program, 6/e by Pearson Education, Inc. All Rights Reserved.

C How to Program, 6/e by Pearson Education, Inc. All Rights Reserved. C How to Program, 6/e 1992-2010 by Pearson Education, Inc. An important part of the solution to any problem is the presentation of the results. In this chapter, we discuss in depth the formatting features

More information

CITS2401 Computer Analysis & Visualisation

CITS2401 Computer Analysis & Visualisation FACULTY OF ENGINEERING, COMPUTING AND MATHEMATICS CITS2401 Computer Analysis & Visualisation SCHOOL OF COMPUTER SCIENCE AND SOFTWARE ENGINEERING Topic 3 Introduction to Matlab Material from MATLAB for

More information

A Quick and Gentle Introduction to PROC SQL

A Quick and Gentle Introduction to PROC SQL ABSTRACT Paper B2B 9 A Quick and Gentle Introduction to PROC SQL Shane Rosanbalm, Rho, Inc. Sam Gillett, Rho, Inc. If you are afraid of SQL, it is most likely because you haven t been properly introduced.

More information

Civil Engineering Computation

Civil Engineering Computation Civil Engineering Computation First Steps in VBA Homework Evaluation 2 1 Homework Evaluation 3 Based on this rubric, you may resubmit Homework 1 and Homework 2 (along with today s homework) by next Monday

More information

Functional abstraction. What is abstraction? Eating apples. Readings: HtDP, sections Language level: Intermediate Student With Lambda

Functional abstraction. What is abstraction? Eating apples. Readings: HtDP, sections Language level: Intermediate Student With Lambda Functional abstraction Readings: HtDP, sections 19-24. Language level: Intermediate Student With Lambda different order used in lecture section 24 material introduced much earlier sections 22, 23 not covered

More information

Functional abstraction

Functional abstraction Functional abstraction Readings: HtDP, sections 19-24. Language level: Intermediate Student With Lambda different order used in lecture section 24 material introduced much earlier sections 22, 23 not covered

More information

Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay

Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay Lecture - 11 Coding Strategies and Introduction to Huffman Coding The Fundamental

More information

Understanding Regular Expressions, Special Characters, and Patterns

Understanding Regular Expressions, Special Characters, and Patterns APPENDIXA Understanding Regular Expressions, Special Characters, and Patterns This appendix describes the regular expressions, special or wildcard characters, and patterns that can be used with filters

More information

Section 2.2 Your First Program in Java: Printing a Line of Text

Section 2.2 Your First Program in Java: Printing a Line of Text Chapter 2 Introduction to Java Applications Section 2.2 Your First Program in Java: Printing a Line of Text 2.2 Q1: End-of-line comments that should be ignored by the compiler are denoted using a. Two

More information

Cody s Collection of Popular SAS Programming Tasks and How to Tackle Them

Cody s Collection of Popular SAS Programming Tasks and How to Tackle Them Cody s Collection of Popular SAS Programming Tasks and How to Tackle Them Ron Cody Contents List of Programs... ix About This Book... xv About The Author... xix Acknowledgments... xxi Chapter 1 Tasks Involving

More information

Intro to Computer Programming (ICP) Rab Nawaz Jadoon

Intro to Computer Programming (ICP) Rab Nawaz Jadoon Intro to Computer Programming (ICP) Rab Nawaz Jadoon DCS COMSATS Institute of Information Technology Assistant Professor COMSATS IIT, Abbottabad Pakistan Introduction to Computer Programming (ICP) What

More information

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

CHAOTIC DATA EXAMPLES. Paper CC-033

CHAOTIC DATA EXAMPLES. Paper CC-033 Paper CC-033 Creating Order from Chaos Using SAS Functions Kristine L. Dougherty, Florida Department of Corrections, Tallahassee, FL Vicky Feldman, Florida Department of Corrections, Tallahassee, FL ABSTRACT

More information

QUEST Procedure Reference

QUEST Procedure Reference 111 CHAPTER 9 QUEST Procedure Reference Introduction 111 QUEST Procedure Syntax 111 Description 112 PROC QUEST Statement Options 112 Procedure Statements 112 SYSTEM 2000 Statement 114 ECHO ON and ECHO

More information

ADARSH VIDYA KENDRA NAGERCOIL COMPUTER SCIENCE. Grade: IX C++ PROGRAMMING. Department of Computer Science 1

ADARSH VIDYA KENDRA NAGERCOIL COMPUTER SCIENCE. Grade: IX C++ PROGRAMMING. Department of Computer Science 1 NAGERCOIL COMPUTER SCIENCE Grade: IX C++ PROGRAMMING 1 C++ 1. Object Oriented Programming OOP is Object Oriented Programming. It was developed to overcome the flaws of the procedural approach to programming.

More information

Foundations and Fundamentals. SAS System Options: The True Heroes of Macro Debugging Kevin Russell and Russ Tyndall, SAS Institute Inc.

Foundations and Fundamentals. SAS System Options: The True Heroes of Macro Debugging Kevin Russell and Russ Tyndall, SAS Institute Inc. SAS System Options: The True Heroes of Macro Debugging Kevin Russell and Russ Tyndall, SAS Institute Inc., Cary, NC ABSTRACT It is not uncommon for the first draft of any macro application to contain errors.

More information

While Statement Examples. While Statement (35.15) Until Statement (35.15) Until Statement Example

While Statement Examples. While Statement (35.15) Until Statement (35.15) Until Statement Example While Statement (35.15) General form. The commands in the loop are performed while the condition is true. while condition one-or-more-commands While Statement Examples # process commands until a stop is

More information

The Power of PROC SQL Techniques and SAS Dictionary Tables in Handling Data

The Power of PROC SQL Techniques and SAS Dictionary Tables in Handling Data Paper PO31 The Power of PROC SQL Techniques and SAS Dictionary Tables in Handling Data MaryAnne DePesquo Hope, Health Services Advisory Group, Phoenix, Arizona Fen Fen Li, Health Services Advisory Group,

More information

CSE : Python Programming

CSE : Python Programming CSE 399-004: Python Programming Lecture 11: Regular expressions April 2, 2007 http://www.seas.upenn.edu/~cse39904/ Announcements About those meeting from last week If I said I was going to look into something

More information

Syntax Conventions for SAS Programming Languages

Syntax Conventions for SAS Programming Languages Syntax Conventions for SAS Programming Languages SAS Syntax Components Keywords A keyword is one or more literal name components of a language element. Keywords are uppercase, and in reference documentation,

More information

SYSTEM 2000 Essentials

SYSTEM 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 information

CSI Lab 02. Tuesday, January 21st

CSI Lab 02. Tuesday, January 21st CSI Lab 02 Tuesday, January 21st Objectives: Explore some basic functionality of python Introduction Last week we talked about the fact that a computer is, among other things, a tool to perform high speed

More information

Formatting: Cleaning Up Data

Formatting: Cleaning Up Data Formatting: Cleaning Up Data Hello and welcome to our lesson on cleaning up data, which is one of the final ones in this Formatting Module. What we re going to be doing in this lesson is using some of

More information

PRELIMINARY APPLE BASIC USERS MANUAL OCTOBER Apple Computer Company. 770 Welch Rd., Palo Alto, CA (415)

PRELIMINARY APPLE BASIC USERS MANUAL OCTOBER Apple Computer Company. 770 Welch Rd., Palo Alto, CA (415) PRELIMINARY APPLE BASIC USERS MANUAL OCTOBER 1976 Apple Computer Company. 770 Welch Rd., Palo Alto, CA 94304 (415) 326-4248 This is a PRELIMINARY manual. It will, most likley, contain errors, incorrect

More information

what are strings today: strings strings: output strings: declaring and initializing what are strings and why to use them reading: textbook chapter 8

what are strings today: strings strings: output strings: declaring and initializing what are strings and why to use them reading: textbook chapter 8 today: strings what are strings what are strings and why to use them reading: textbook chapter 8 a string in C++ is one of a special kind of data type called a class we will talk more about classes in

More information

Using SAS 9.4M5 and the Varchar Data Type to Manage Text Strings Exceeding 32kb

Using SAS 9.4M5 and the Varchar Data Type to Manage Text Strings Exceeding 32kb ABSTRACT Paper 2690-2018 Using SAS 9.4M5 and the Varchar Data Type to Manage Text Strings Exceeding 32kb John Schmitz, Luminare Data LLC Database systems support text fields much longer than the 32kb limit

More information

PRXChange: Accept No Substitutions Kenneth W. Borowiak, PPD, Inc.

PRXChange: Accept No Substitutions Kenneth W. Borowiak, PPD, Inc. CT-03 PRXChange: Accept No Substitutions Kenneth W. Borowiak, PPD, Inc. Abstract SAS provides a variety of functions for removing and replacing text, such as COMPRESS, TRANSLATE & TRANWRD. However, when

More information

APPENDIX 4 Migrating from QMF to SAS/ ASSIST Software. Each of these steps can be executed independently.

APPENDIX 4 Migrating from QMF to SAS/ ASSIST Software. Each of these steps can be executed independently. 255 APPENDIX 4 Migrating from QMF to SAS/ ASSIST Software Introduction 255 Generating a QMF Export Procedure 255 Exporting Queries from QMF 257 Importing QMF Queries into Query and Reporting 257 Alternate

More information

Programming Fundamentals and Python

Programming Fundamentals and Python Chapter 2 Programming Fundamentals and Python This chapter provides a non-technical overview of Python and will cover the basic programming knowledge needed for the rest of the chapters in Part 1. It contains

More information

Chapter 2 SYSTEM OVERVIEW. SYS-ED/ Computer Education Techniques, Inc.

Chapter 2 SYSTEM OVERVIEW. SYS-ED/ Computer Education Techniques, Inc. Chapter 2 SYSTEM OVERVIEW SYS-ED/ Computer Education Techniques, Inc. Objectives You will learn: Structure of a program. Easytrieve Plus job processing logic. Easytrieve Plus syntax rules. How to use listing

More information

More About SAS Macros

More About SAS Macros More About SAS Macros (Than You Thought Possible) Donald P. Gallogly DCBS IMD Topics The SAS Macros System Macro Variables Writing Macros The SAS Macros System The SAS Macros System SAS macros and macro

More information

Lecture 2 Tao Wang 1

Lecture 2 Tao Wang 1 Lecture 2 Tao Wang 1 Objectives In this chapter, you will learn about: Modular programs Programming style Data types Arithmetic operations Variables and declaration statements Common programming errors

More information

Assoc. Prof. Dr. Marenglen Biba. (C) 2010 Pearson Education, Inc. All rights reserved.

Assoc. Prof. Dr. Marenglen Biba. (C) 2010 Pearson Education, Inc. All rights reserved. Assoc. Prof. Dr. Marenglen Biba (C) 2010 Pearson Education, Inc. All rights reserved. Java application A computer program that executes when you use the java command to launch the Java Virtual Machine

More information