From 36b6e0442032a11a853ea8bc2f8adfe00421599c Mon Sep 17 00:00:00 2001 From: Anne Nguyen Date: Sat, 15 Sep 2018 14:46:32 -0700 Subject: [PATCH 1/2] abc --- ...60-01_f18-week01_sas_recipes-19AUG2018.sas | 64 +++++++++---------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/STAT660-01_f18-week01_sas_recipes-19AUG2018.sas b/STAT660-01_f18-week01_sas_recipes-19AUG2018.sas index a8cc8e7..2909b25 100644 --- a/STAT660-01_f18-week01_sas_recipes-19AUG2018.sas +++ b/STAT660-01_f18-week01_sas_recipes-19AUG2018.sas @@ -5,7 +5,7 @@ *******************************************************************************; -* hello_world ; +* hello_world ; abc *******************************************************************************; /* Scenario: Printing to the SAS log. @@ -14,24 +14,24 @@ Approach: Use a null data step and put statement to write to the log Recipe : -data _null_; - put ""; +data _null_; + put ""; run; */ *Example; -data _null_; - put 'Hello, World!'; +data _null_; + put 'Hello, World!'; run; /* Notes: -(1) In this example, single-quotes have been used to delimit the string literal -'Hello, World!', meaning we know the string is everything between the opening -and closing single-quote marks. However, the recipe used double-quote marks. In -general, either single-quotes or double-quotes can be used to delimit SAS string -literals, but double-quotes should be used whenever so-called macro variables -are included in string literals, as we'll see later. (For now, just remember -that SAS treats single- and double-quotes differently for something called +(1) In this example, single-quotes have been used to delimit the string literal +'Hello, World!', meaning we know the string is everything between the opening +and closing single-quote marks. However, the recipe used double-quote marks. In +general, either single-quotes or double-quotes can be used to delimit SAS string +literals, but double-quotes should be used whenever so-called macro variables +are included in string literals, as we'll see later. (For now, just remember +that SAS treats single- and double-quotes differently for something called macros.) */ @@ -46,28 +46,28 @@ Approach: Use a null data step and business logic to write to the log */ *Example; -data _null_; - do i = 1 to 100; - if mod(i,3) = 0 then put 'Fizz'; - else if mod(i, 5) = 0 then put 'Buzz'; - else put i=; - end; +data _null_; + do i = 1 to 100; + if mod(i,3) = 0 then put 'Fizz'; + else if mod(i, 5) = 0 then put 'Buzz'; + else put i=; + end; run; ) /* Notes: -(1) In this example, the four main components of imperative programming are -used: (1) The variable i is used to hold a value that varies; (2) the mod -function is called with behavior dependent on a variable's current value (e.g., -mod(i,3) evaluates to 0 if i is divisible by 3, and is 1 otherwise); (3) -conditional statement execution in the form an if-else if-else branching -structure, where only one of the three branches is executed, depending upon -whether i is divisible by 3, by 5, or by neither; and (4) looping in the form of -the do-loop repeating the same block of code (the 3-line if-else if-else -branching structure) 100 times, once for each value of i, which starts with the -value 1 and is incremented by 1 repeatedly. -(2) In general, SAS data steps will use these four components, in addition to -dataset access methods, to prepare/clean data for analysis. This type of -programming is commonly called "business logic" since it encapsulated domain +(1) In this example, the four main components of imperative programming are +used: (1) The variable i is used to hold a value that varies; (2) the mod +function is called with behavior dependent on a variable's current value (e.g., +mod(i,3) evaluates to 0 if i is divisible by 3, and is 1 otherwise); (3) +conditional statement execution in the form an if-else if-else branching +structure, where only one of the three branches is executed, depending upon +whether i is divisible by 3, by 5, or by neither; and (4) looping in the form of +the do-loop repeating the same block of code (the 3-line if-else if-else +branching structure) 100 times, once for each value of i, which starts with the +value 1 and is incremented by 1 repeatedly. +(2) In general, SAS data steps will use these four components, in addition to +dataset access methods, to prepare/clean data for analysis. This type of +programming is commonly called "business logic" since it encapsulated domain specific behavior, here to solve a specific programming challenge. -*/ \ No newline at end of file +*/ From 78cf029f1c266f4871d39f7902b73b78425064e2 Mon Sep 17 00:00:00 2001 From: Anne Nguyen Date: Sat, 15 Sep 2018 14:49:17 -0700 Subject: [PATCH 2/2] cdef --- STAT660-01_f18-week01_sas_recipes-19AUG2018.sas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/STAT660-01_f18-week01_sas_recipes-19AUG2018.sas b/STAT660-01_f18-week01_sas_recipes-19AUG2018.sas index 2909b25..52ca0e1 100644 --- a/STAT660-01_f18-week01_sas_recipes-19AUG2018.sas +++ b/STAT660-01_f18-week01_sas_recipes-19AUG2018.sas @@ -5,7 +5,7 @@ *******************************************************************************; -* hello_world ; abc +* hello_world ; abccdef *******************************************************************************; /* Scenario: Printing to the SAS log.