Lesson 14: Data Step Options

Lesson 14: Data Step Options

Overview

In this lesson, we explore the various DATA step options that are available in SAS to control the structure and contents of a SAS data set when the input is from a SAS data set. For example, we might want to select only those observations in a SAS data set that meet a certain condition. Or, we might want to select only a subset of variables to keep in a working analysis data set.

Options illustrated in this lesson include:

  • FIRSTOBS= and OBS=, to reduce the number of observations in the dataset.
  • DROP= and KEEP=, to reduce the number of variables in the dataset.
  • IN=, to create an indicator variable (0,1) which indicates whether the current observation came from the data set. (This is useful when merging and concatenating data sets which we'll study in the next two lessons).
  • RENAME=, to change the name of a variable.
  • WHERE=, to select observations from a SAS data set that meet a specified condition.

Objectives

Upon completion of this lesson, you should be able to:

Upon completing this lesson, you should be able to do the following:

  • write a SAS DATA step that correctly uses the FIRSTOBS= and/or OBS= options
  • write a SAS DATA step that correctly uses the DROP= and/or KEEP= options
  • understand the difference between the DROP= and KEEP= options attached to the SET statement and the DROP= and KEEP= options attached to the DATA statement (and therefore be able to choose which is more appropriate for a given situation)
  • explain the difference between the DROP= and KEEP= options attached to the SET statement and the DROP and KEEP statements within a data step (and therefore be able to choose which is more appropriate for a given situation)
  • write a SAS DATA step that correctly uses the WHERE= option
  • write a SAS DATA step that uses the WHERE= option to divide a larger data set up into two or more smaller data sets
  • explain the difference between the WHERE= option attached to the SET statement and the WHERE= option attached to the DATA statement
  • write a SAS DATA step that correctly uses the RENAME= option
  • explain the difference between the RENAME= option attached to the SET statement and the RENAME= option attached to the DATA statement
  • write a SAS DATA step that correctly uses the IN= option
  • write a SAS DATA step that uses more than one DATA step option at a time

14.1 - The FIRSTOBS= and OBS= options

14.1 - The FIRSTOBS= and OBS= options

Working with subsets created from an existing SAS data set can make more efficient use of computer resources than working with the original, larger data set. Reading fewer observations means that fewer iterations of the DATA step must occur.

  • The SET statement's FIRSTOBS= option tells SAS to begin reading the data from the input SAS data set at the line number specified by FIRSTOBS.
  • The SET statement's OBS= option tells SAS to stop reading the data from the input SAS data set at the line number specified by OBS.

We'll start by using the OBS= option to create the data set that we'll be working with throughout this lesson. The data set we'll use contains demographic (or "background") information collected on 638 subjects once enrolled in the National Institute of Health's Interstitial Cystitis Data Base (ICDB) Study. Not surprisingly, the ICDB Study collected data on people who were diagnosed as having interstitial cystitis! The primary reason for conducting the study was that interstitial cystitis is a poorly understood condition that causes severe bladder and pelvic pain, urinary frequency, and painful urination in the absence of any identifiable cause. Although the disease is more prevalent in women, it affects both men and women of all ages. (If you want to learn more about the ICDB Study, I refer you to one of the National Institute of Health's websites in which a general description is given and the database documentation.

Given that we'll use the ICDB Study's background data, it would probably be helpful for you to take a peek at the background data form on which the data were collected. In order to run the SAS programs in this lesson, you'll need to download and save the background data set (right-click to save!) in a folder on your computer.

Example 14.1

The DATA step in the following program uses the OBS= option to tell SAS to create a temporary data set called back by selecting the first 25 observations from the permanent background data set icdb.back:

OPTIONS PS=58 LS=80 NODATE NONUMBER;
DATA back;
    set icdb.back (obs=25);
RUN;
PROC PRINT data=back;
    title 'A Subset of the Background Data Set';
RUN;

A Subset of the Background Data Set

Obs

subj

v_type

v_date

r_id

b_date

sex

state

country

race

ethnic

relig

mar_st

ed_level

emp_st

job_chng

income

1

110027

0

10/05/93

2068

07/05/62

2

5

1

4

0

0

1

3

1

.

2

2

110029

0

10/05/93

2068

09/07/26

2

5

1

4

0

2

1

5

8

.

2

3

110039

0

12/07/93

2068

07/24/24

2

22

1

4

0

3

1

3

8

.

2

4

110040

0

11/30/93

2068

10/20/67

2

32

1

4

0

7

1

5

1

.

2

5

110045

0

01/11/94

2068

04/18/25

1

36

1

4

0

3

1

1

8

0

2

6

110049

0

01/25/94

2068

10/05/23

2

37

1

4

0

1

1

5

8

0

2

7

110051

0

01/25/94

2068

12/02/42

2

42

1

4

0

3

1

3

1

0

2

8

110052

0

01/27/94

1808

01/04/25

2

5

1

4

0

0

1

4

8

0

2

9

110053

0

02/22/94

1808

03/15/22

2

5

1

4

1

3

1

1

8

0

1

10

110055

0

03/15/94

1808

03/31/41

2

5

1

4

0

0

1

3

1

0

2

11

110057

0

03/15/94

2068

07/10/44

2

5

1

4

0

3

1

4

2

0

2

12

110058

0

03/18/94

1808

09/09/50

2

.

13

4

1

0

1

3

1

0

1

13

110059

0

03/18/94

1808

07/25/34

2

13

1

4

0

1

1

3

8

0

1

14

110060

0

06/14/94

1808

05/29/36

2

13

1

4

0

3

1

3

1

0

2

15

110062

0

03/31/94

1808

04/21/36

2

3

1

4

0

1

1

4

5

0

2

16

110065

0

04/04/94

1808

10/12/52

2

5

1

4

0

3

1

4

4

1

1

17

110066

0

04/12/94

1808

08/28/62

2

5

1

4

0

0

1

4

6

0

2

18

110067

0

04/26/94

1808

02/22/72

2

5

1

4

0

1

6

4

2

0

2

19

110068

0

06/13/94

1808

09/10/55

2

25

1

4

0

11

1

3

7

0

2

20

110069

0

05/31/94

1808

08/17/38

2

32

1

4

0

0

1

3

1

0

2

21

110070

0

05/24/94

1808

12/12/41

2

30

1

4

0

1

1

3

2

0

2

22

110074

0

06/16/94

1808

10/16/63

2

47

1

4

0

1

6

4

6

1

1

23

110075

0

06/14/94

1808

11/04/60

2

47

1

4

0

1

6

4

1

0

1

24

110076

0

07/22/94

1808

01/09/64

2

5

1

4

0

3

1

4

9

0

2

25

110077

0

07/26/94

2068

07/24/40

2

5

1

4

0

3

2

4

2

0

2

The program is pretty straightforward. The main thing to keep in mind is that you have to enclose the OBS= option in parentheses.

If you haven't already done so, download and save the background data set (click to save!) to a convenient location on your computer. Then, launch the SAS program, and edit the LIBNAME statement so that it reflects the location in which you've saved the data set. Then, run  the SAS program, and review the output from the PRINT procedure to familiarize yourself with the data set.

Example 14.2

The following program uses the SET statement's FIRSTOBS= and OBS= options to tell SAS to include fourteen observations — observations 7, 8, 9, ..., and 20 — from the permanent icdb.back data set in the temporary back data set:

LIBNAME icdb 'C:\yourdrivename\Stat481WC\02datastep\sasndata';
DATA back1;
	set icdb.back (FIRSTOBS=7 OBS=20);
RUN;
 
PROC PRINT data=back1;
	title 'Output Dataset: BACK1';
RUN;

Output Dataset: BACK1

Obs

subj

v_type

v_date

r_id

b_date

sex

state

country

race

ethnic

relig

mar_st

ed_level

emp_st

job_chng

income

1

110051

0

01/25/94

2068

12/02/42

2

42

1

4

0

3

1

3

1

0

2

2

110052

0

01/27/94

1808

01/04/25

2

5

1

4

0

0

1

4

8

0

2

3

110053

0

02/22/94

1808

03/15/22

2

5

1

4

1

3

1

1

8

0

1

4

110055

0

03/15/94

1808

03/31/41

2

5

1

4

0

0

1

3

1

0

2

5

110057

0

03/15/94

2068

07/10/44

2

5

1

4

0

3

1

4

2

0

2

6

110058

0

03/18/94

1808

09/09/50

2

.

13

4

1

0

1

3

1

0

1

7

110059

0

03/18/94

1808

07/25/34

2

13

1

4

0

1

1

3

8

0

1

8

110060

0

06/14/94

1808

05/29/36

2

13

1

4

0

3

1

3

1

0

2

9

110062

0

03/31/94

1808

04/21/36

2

3

1

4

0

1

1

4

5

0

2

10

110065

0

04/04/94

1808

10/12/52

2

5

1

4

0

3

1

4

4

1

1

11

110066

0

04/12/94

1808

08/28/62

2

5

1

4

0

0

1

4

6

0

2

12

110067

0

04/26/94

1808

02/22/72

2

5

1

4

0

1

6

4

2

0

2

13

110068

0

06/13/94

1808

09/10/55

2

25

1

4

0

11

1

3

7

0

2

14

110069

0

05/31/94

1808

08/17/38

2

32

1

4

0

0

1

3

1

0

2

Launch the SAS program, and edit the LIBNAME statement so that it reflects the location in which you saved the background data set. Then, run  the SAS program, and review the output from the PRINT procedure. Compare the output to the output of that from the previous example to convince yourself that the temporary data set back1 indeed contains fourteen observations — observations 7, 8, ..., 20 in the original background data set.


14.2 - The DROP= and KEEP= options

14.2 - The DROP= and KEEP= options

There may be (many!) occasions in which you can get away with using fewer variables that

appear in your input SAS data set. The advantage is that, when you can get away with reading in fewer variables, SAS uses a smaller program data vector and therefore runs much more efficiently.

  • The DROP= option tells SAS which variables you want to drop from a data set. If you place the DROP= option on the SET statement, SAS drops the specified variables when it reads the input data set. On the other hand, if you place the DROP= option on the DATA statement, SAS drops the specified variables when it writes to the output data set.
  • The KEEP= option tells SAS which variables you want to keep in a data set. If you place the KEEP= option on the SET statement, SAS keeps the specified variables when it reads the input data set. On the other hand, if you place the KEEP= option on the DATA statement, SAS keeps the specified variables when it writes to the output data set.

Which option should you use? The choice of whether to use the DROP= option or the KEEP= option in a given situation is personal. Or rather, let's say that most people will choose the option that requires the least amount of typing! I still try though, whenever possible, to use the KEEP= option, as then when I read my programs I know exactly which variables my data sets contain. Using the DROP= option, on the other hand, requires one to think about what variables were in the data set before the dropping took place.

On the SET Statement

Example 14.3

The following program tells SAS to keep just three variables — subj, v_date, and b_date — when reading from the back1 data set in order to create the back2 data set:

DATA back2;
	set back1 (keep = subj v_date b_date);
	age = (v_date - b_date)/365;  * Calculate AGE in years;
	format age 4.1;
RUN;
 
PROC PRINT data=back2;
	title 'Output Dataset: BACK2';

Output Dataset: BACK2

Obs

subj

v_date

b_date

age

1

110051

01/25/94

12/02/42

51.2

2

110052

01/27/94

01/04/25

69.1

3

110053

02/22/94

03/15/22

72.0

4

110055

03/15/94

03/31/41

53.0

5

110057

03/15/94

07/10/44

49.7

6

110058

03/18/94

09/09/50

43.6

7

110059

03/18/94

07/25/34

59.7

8

110060

06/14/94

05/29/36

58.1

9

110062

03/31/94

04/21/36

58.0

10

110065

04/04/94

10/12/52

41.5

11

110066

04/12/94

08/28/62

31.6

12

110067

04/26/94

02/22/72

22.2

13

110068

06/13/94

09/10/55

38.8

14

110069

05/31/94

08/17/38

55.8

The SET statement's KEEP= option is used to tell SAS to read three variables — subject (subj), visit date (v_date), and birth date (b_date) — from the temporary data set back1 and to store them in a new temporary data set back2. Note that the KEEP= option must be placed in parentheses and follow the name of the data set from you which you want SAS to select variables. The list of variables that you specify to keep must be separated by at least one blank space.

Then, the subject's age (age) at the time of the visit is calculated by subtracting the difference between the visit date (v_date) and birth date (b_date) and dividing by 365 to get (an approximate) age in years.

Launch and run  the SAS program, and review the output from the PRINT procedure to convince yourself that the temporary data set back2 contains the three kept variables (subj, v_date, and b_date), as well as the newly calculated variable (age).

Example 14.4

The following program tells SAS to drop nine variables — r_id, race, ..., and income — when reading from the back1 data set in order to create the back3 data set:

DATA back3;
 	 set back1 (drop = r_id race ethnic relig mar_st
            						ed_level emp_st job_chng income);
RUN;
PROC PRINT data=back3;
     title 'Output Dataset: BACK3';
RUN;

Output Dataset: BACK3

Obs

subj

v_type

v_date

b_date

sex

state

country

1

110051

0

01/25/94

12/02/42

2

42

1

2

110052

0

01/27/94

01/04/25

2

5

1

3

110053

0

02/22/94

03/15/22

2

5

1

4

110055

0

03/15/94

03/31/41

2

5

1

5

110057

0

03/15/94

07/10/44

2

5

1

6

110058

0

03/18/94

09/09/50

2

.

13

7

110059

0

03/18/94

07/25/34

2

13

1

8

110060

0

06/14/94

05/29/36

2

13

1

9

110062

0

03/31/94

04/21/36

2

3

1

10

110065

0

04/04/94

10/12/52

2

5

1

11

110066

0

04/12/94

08/28/62

2

5

1

12

110067

0

04/26/94

02/22/72

2

5

1

13

110068

0

06/13/94

09/10/55

2

25

1

14

110069

0

05/31/94

08/17/38

2

32

1

The SET statement's DROP= option tells SAS to drop nine variables — the id number of the reviewer of the data form (r_id), as well as the subject's race (race), ethnicity (ethnic), religion (relig), marital status (mar_st), education level (ed_level), employment status (emp_st), job change status (job_chng), and income (income) — from the temporary data set back1 and to store the remaining variables in a new temporary data set back3. Therefore, the program data vector used to create the SAS data set back3 contains only seven variables — subject id (subj), visit type (v_type), visit date (v_date), birth date (b_date), gender (sex), and the state (state) and country (country) in which the subject resides.

Note that, just like the KEEP= option, the DROP= option must be placed in parentheses and follow the name of the data set from you that you want SAS to exclude variables. The list of variables that you specify to drop must be separated by at least one blank space.

Launch and run  the SAS program. Review the output from the PRINT procedure to convince yourself that the temporary data set back3 contains the seven remaining variables that were not dropped from the data set.

Example 14.5: On the DATA Statement

Rather than using the KEEP= option on the SET statement, you can use the KEEP= option on the DATA statement. The following program tells SAS to keep four variables — subj, v_date, b_date, and age — when writing to the output data set called back2a:

DATA back2a (keep = subj v_date b_date age);
    set back1;
    age = (v_date - b_date)/365;  * Calculate AGE in years;
    format age 4.1;
RUN;
PROC PRINT data=back2a;
    title 'Output Dataset: BACK2A';
RUN;

Output Dataset: BACK2A

Obs

subj

v_date

b_date

age

1

110051

01/25/94

12/02/42

51.2

2

110052

01/27/94

01/04/25

69.1

3

110053

02/22/94

03/15/22

72.0

4

110055

03/15/94

03/31/41

53.0

5

110057

03/15/94

07/10/44

49.7

6

110058

03/18/94

09/09/50

43.6

7

110059

03/18/94

07/25/34

59.7

8

110060

06/14/94

05/29/36

58.1

9

110062

03/31/94

04/21/36

58.0

10

110065

04/04/94

10/12/52

41.5

11

110066

04/12/94

08/28/62

31.6

12

110067

04/26/94

02/22/72

22.2

13

110068

06/13/94

09/10/55

38.8

14

110069

05/31/94

08/17/38

55.8

The DATA statement's KEEP= option is used to tell SAS to write four variables — subj, v_date, b_date, and age — from the program data vector at the end of each iteration of the DATA step to the back2a data set. As before, the KEEP= option must be placed in parentheses and follow the name of the data set from you which you want SAS to select variables. The list of variables that you specify to keep must be separated by at least one blank space.

Launch and run  the SAS program, and review the output from the PRINT procedure to convince yourself that the temporary data set back2a is identical to the back2 data set created in Example 2.3. That is, the back2a data set, like the back2 data set, contains the four kept variables (subj, v_date, b_date, and age).

Example 14.6

Rather than using the DROP= option on the SET statement, you can use the DROP= option on the DATA statement. The following program tells SAS to drop nine variables — r_id, race, ..., and income — when writing to the output data set back3a:

DATA back3a (drop = r_id race ethnic relig mar_st
		ed_level emp_st job_chng income);
	set back1;
RUN;
 
PROC PRINT data=back3a;
	title 'Output Dataset: BACK3A';
RUN;

Output Dataset: BACK3A

Obs

subj

v_type

v_date

b_date

sex

state

country

1

110051

0

01/25/94

12/02/42

2

42

1

2

110052

0

01/27/94

01/04/25

2

5

1

3

110053

0

02/22/94

03/15/22

2

5

1

4

110055

0

03/15/94

03/31/41

2

5

1

5

110057

0

03/15/94

07/10/44

2

5

1

6

110058

0

03/18/94

09/09/50

2

.

13

7

110059

0

03/18/94

07/25/34

2

13

1

8

110060

0

06/14/94

05/29/36

2

13

1

9

110062

0

03/31/94

04/21/36

2

3

1

10

110065

0

04/04/94

10/12/52

2

5

1

11

110066

0

04/12/94

08/28/62

2

5

1

12

110067

0

04/26/94

02/22/72

2

5

1

13

110068

0

06/13/94

09/10/55

2

25

1

14

110069

0

05/31/94

08/17/38

2

32

1

The DATA statement's DROP= option tells SAS to drop nine variables — r_id, race, ethnic, relig, mar_st, ed_level, emp_st, job_chng, and income — before writing the contents of the program data vector into the back3a data set. Therefore, the program data vector starts out with sixteen data set variables, but only writes seven of them to the back3a data set. As before, the DROP= option must be placed in parentheses and follow the name of the data set from you that you want SAS to exclude variables. The list of variables that you specify to drop must be separated by at least one blank space.

Launch and run  the SAS program. Review the output from the PRINT procedure to convince yourself that the back3a data set, just like the back3 data set, contains the seven variables that were not dropped from the data set.

What to Use When

After reviewing the previous four examples, your head might be spinning and you might be wondering how you would know which to use — the KEEP= option on the SET statement? the DROP= option on the SET statement? the KEEP= option on the DATA statement? or the DROP= option on the DATA statement? Here are the key facts that will help us devise a strategy:

  • As stated earlier, the choice between KEEP= and DROP= is a matter of personal choice. It's whether you place the options on the SET statement or the DATA statement that makes a difference.
  • In the SET statement, the DROP= and KEEP= options determine which variables are read from the input SAS dataset. That is, when you specify the DROP= or KEEP= option in the SET statement, the excluded variables are never even read into the program data vector.
  • In the DATA statement, the DROP= and KEEP= options determine which variables are written from the program data vector to the resulting SAS data set. That is, when you specify the DROP= or KEEP= option in the DATA statement, all of the variables in the input data set are read into the program data vector, but only the selected variables are written from the program data vector to the output data set.

Those facts stated it becomes obvious that we can construct a more efficient DATA step by not reading unneeded variables from the input data set. That said, we might have a working strategy:

  • use the KEEP= option (or DROP= option) in the SET statement to tell SAS only those variables that you need from the input data set read into the program data vector in order to achieve the goals of your program
  • use the KEEP= option (or DROP= option) in the DATA statement to tell SAS all of the variables that you want to be written from the program data vector into the output data set

Let's try our working strategy out on an example!

Example 14.7

The following SAS program illustrates our working strategy of when to use the KEEP= option in the SET statement and when to use the KEEP= option in the DATA statement:

DATA back6 (keep = subj age);
	set back1 (keep= subj v_date b_date);
	age = (v_date - b_date)/365;
	format age 4.1;
RUN;

PROC PRINT data=back6;
	title 'Output Dataset: BACK6';
RUN;

 

Output Dataset: BACK6

Obs

subj

age

1

110051

51.2

2

110052

69.1

3

110053

72.0

4

110055

53.0

5

110057

49.7

6

110058

43.6

7

110059

59.7

8

110060

58.1

9

110062

58.0

10

110065

41.5

11

110066

31.6

12

110067

22.2

13

110068

38.8

14

110069

55.8

Here, the KEEP= option on the SET statement tells SAS to keep only three variables — subj, v_date, and b_date — from the input data set. The v_date and b_date variables are kept because we need them in order to calculate the age variable. The subject's age is calculated by subtracting b_date from v_date and dividing by 365. Therefore, the program data vector contains four variables — subj, v_date, b_date, and age —all, none or any of which can be written to the output back6 data set. The KEEP= option of the DATA statement tells SAS which variables to write from the program data vector to the output data set. Here, SAS is told to write only the subject's id (subj) and age (age) to back6.

Launch and run  the SAS program. Review the output from the PRINT procedure to convince yourself that the temporary data set back6 does indeed contain only the subject's id (subj) and age (age).

Alternative KEEP and DROP Statements

Let's add another potential layer of confusion! Here goes ... the DROP= and KEEP= options in the DATA statement are comparable, respectively, to the DROP and KEEP statements placed within the DATA step. That is, the KEEP and DROP statements, just like the DROP= and KEEP= options on a DATA statement, affect which variables are written from the program data vector to the resulting SAS data set. Let's take a look at two examples.

Example 14.8

Rather than using the KEEP= option of the DATA statement, you can also tell SAS which variables in a data set to keep using a KEEP statement within your DATA step. The following SAS program illustrates the use of the KEEP statement:

DATA back4;
	set back1;
	age = (v_date - b_date)/365;
	format age 4.1;
	keep subj v_date b_date;
RUN;
 
PROC PRINT data=back4;
	title 'Output Dataset: BACK4';
RUN;

Output Dataset: BACK4

Obs

subj

v_date

b_date

1

110051

01/25/94

12/02/42

2

110052

01/27/94

01/04/25

3

110053

02/22/94

03/15/22

4

110055

03/15/94

03/31/41

5

110057

03/15/94

07/10/44

6

110058

03/18/94

09/09/50

7

110059

03/18/94

07/25/34

8

110060

06/14/94

05/29/36

9

110062

03/31/94

04/21/36

10

110065

04/04/94

10/12/52

11

110066

04/12/94

08/28/62

12

110067

04/26/94

02/22/72

13

110068

06/13/94

09/10/55

14

110069

05/31/94

08/17/38

If you look at this program quickly, you might think that its effect should be the same as that of the program used in Example 2.3 to create the back2 data set. Note, though, that in using the KEEP statement, you must identify all of the variables that you want to keep in your output data set, regardless of whether the variables were obtained from the original input data set or whether they were created within the DATA step. Case in point — note that the age variable is not kept in the back4 data set, because SAS was not explicitly told to do so. Also, note that an equal sign (=) is not used in a KEEP statement as it is in the KEEP= option of a SET or DATA statement.

Launch and run  the SAS program. Review the output from the PRINT procedure to convince yourself that the back4 data set contains the three kept variables (subj, v_date, and b_date), but not the newly calculated variable (age).

Example 14.9

Of course, rather than using the DROP= option of the DATA statement, you can also tell SAS which variables in a data set to drop using a DROP statement within your DATA step. The following SAS program illustrates the use of the DROP statement:

DATA back5;
	set back1;
	age = (v_date - b_date)/365;
	format age 4.1;
	drop r_id race ethnic relig mar_st ed_level emp_st job_chng
	income sex state country;
RUN;
 
PROC PRINT data=back5;
	title 'Output Dataset: BACK5';
RUN;

 

Output Dataset: BACK5

Obs

subj

v_type

v_date

b_date

age

1

110051

0

01/25/94

12/02/42

51.2

2

110052

0

01/27/94

01/04/25

69.1

3

110053

0

02/22/94

03/15/22

72.0

4

110055

0

03/15/94

03/31/41

53.0

5

110057

0

03/15/94

07/10/44

49.7

6

110058

0

03/18/94

09/09/50

43.6

7

110059

0

03/18/94

07/25/34

59.7

8

110060

0

06/14/94

05/29/36

58.1

9

110062

0

03/31/94

04/21/36

58.0

10

110065

0

04/04/94

10/12/52

41.5

11

110066

0

04/12/94

08/28/62

31.6

12

110067

0

04/26/94

02/22/72

22.2

13

110068

0

06/13/94

09/10/55

38.8

14

110069

0

05/31/94

08/17/38

55.8

Launch and run  the SAS program. Review the output from the PRINT procedure to convince yourself that the back5 data set has, as it should, the same structure and contents of the back2 data set that was created above in Example 14.3, except for the additional v_type variable.


14.3 - The WHERE= option

14.3 - The WHERE= option

The WHERE= option allows one to select only those observations from a SAS data set that meet a certain condition. Just as is true for the KEEP= and DROP= options, the WHERE= option can be attached to the SET statement or the DATA statement. If the WHERE= option is attached to the SET statement, SAS selects the observations that meet the condition as it reads in the data. If the WHERE= option is attached to the DATA statement, SAS selects the observations as it writes the data from the program data vector to the output data set.

Example 14.10

The following program illustrates the use of the WHERE= option to select observations from a SAS data set that meet a certain condition. Because the WHERE= option is attached to the DATA statement, the selection process takes place as SAS writes the data from the program data vector to the output data set:

LIBNAME icdb 'C:\yourdrivename\Stat481WC\02datastep\sasndata';
DATA temple (where = (int(subj/10000)=23)) 
		okla (where = (int(subj/10000)=31));
	set icdb.back;
	drop r_id race ethnic relig mar_st ed_level 
		emp_st job_chng income;
RUN;

PROC PRINT data=temple;
	title 'Output Dataset: TEMPLE';
RUN;

PROC PRINT data=okla;
	title 'Output Dataset: OKLA';
RUN;

Output Dataset: TEMPLE

Obs

subj

v_type

v_date

b_date

sex

state

country

1

230003

0

07/09/93

10/25/47

2

22

1

2

230004

0

01/04/94

08/15/23

2

38

1

3

230005

0

01/06/94

05/25/49

2

10

1

4

230006

0

01/06/94

04/24/49

2

21

1

5

230008

0

10/03/96

08/09/60

2

38

1

6

230009

0

10/31/96

11/13/50

1

38

1

 


Output Dataset: OKLA

Obs

subj

v_type

v_date

b_date

sex

state

country

1

310020

0

06/18/93

08/09/43

2

43

1

2

310032

0

08/03/93

04/02/34

2

13

1

3

310037

0

11/08/93

04/25/39

2

36

1

4

310041

0

10/27/93

11/01/26

2

43

1

5

310049

0

02/04/94

10/03/31

2

25

1

6

310055

0

07/12/94

12/11/56

2

36

1

7

310056

0

04/01/94

11/16/61

2

36

1

8

310059

0

06/13/94

08/22/34

2

43

1

9

310065

0

06/30/94

07/27/56

2

36

1

10

310069

0

09/23/94

07/14/42

2

36

1

11

310072

0

09/08/94

12/20/46

2

43

1

12

310073

0

09/26/94

02/27/33

2

36

1

13

310074

0

11/14/94

12/11/68

2

5

1

14

310080

0

12/16/94

03/14/57

2

36

1

15

310082

0

01/17/95

09/15/45

2

4

1

16

310083

0

01/20/95

05/13/54

1

.

17

17

310084

0

01/20/95

09/29/60

2

36

1

18

310085

0

09/01/95

08/08/66

2

16

1

19

310087

0

09/27/95

02/27/29

2

36

1

20

310088

0

09/14/95

07/05/53

2

27

1

21

310089

0

09/14/95

04/07/53

2

36

1

22

310090

0

01/31/96

03/28/52

2

35

1

23

310091

0

01/16/96

10/07/61

2

36

1

24

310092

0

01/05/96

07/12/39

1

36

1

25

310094

0

12/15/95

07/25/60

2

36

1

26

310096

0

12/06/95

05/23/27

2

36

1

27

310097

0

12/18/95

10/13/23

1

36

1

28

310100

0

02/23/96

06/03/27

2

36

1

29

310102

0

02/12/96

05/06/18

2

1

1

30

310103

0

02/12/96

09/16/34

2

4

1

31

310104

0

02/13/96

02/11/44

2

35

1

32

310106

0

02/15/96

11/24/56

2

36

1

33

310107

0

03/05/96

11/10/39

2

13

1

34

310108

0

02/21/96

12/29/45

2

.

4

35

310109

0

05/08/96

04/15/61

2

36

1

36

310110

0

05/14/96

12/23/46

2

5

1

37

310111

0

03/21/96

01/10/62

2

36

1

38

310112

0

03/25/96

07/08/44

2

36

1

39

310113

0

05/22/96

01/12/47

1

36

1

40

310114

0

05/23/96

02/04/38

1

36

1

41

310115

0

05/28/96

05/29/69

2

36

1

42

310117

0

06/06/96

06/15/47

2

5

1

43

310120

0

09/18/96

10/20/69

2

5

1

44

310121

0

07/19/96

10/23/39

2

43

1

45

310122

0

07/12/96

07/15/47

1

43

1

46

310123

0

07/23/96

06/13/45

2

14

1

47

310124

0

07/31/96

04/20/51

2

36

1

48

310125

0

08/13/96

04/13/31

2

4

1

49

310126

0

09/18/96

02/15/68

2

36

1

50

310128

0

10/30/96

10/26/20

2

36

1

51

310130

0

10/16/96

06/16/59

2

31

1

52

310132

0

11/04/96

06/15/70

2

43

1

Well, it's not really that simple. This program also illustrates the use of the WHERE= option to divide a large data set up into smaller data sets, based on the values of a certain variable. As you can see, there are actually two data set names — temple and okla — appearing in the DATA statement. That tells SAS that we want to create two data sets within this one DATA step. One data set, temple, should contain only those subjects enrolled at Temple University, while the other data set, okla, should contain only those subjects enrolled at the University of Oklahoma. Accomplishing that requires a bit of understanding about the subject number used in the ICDB Study, as well as the functionality of the INT function:

  • The variable subj contains a six-digit subject number. The first two digits of the subject number indicate the location where the subject was enrolled. If the first two digits of the subject id number are 23, then the subject was enrolled at Temple University. If the first two digits of the subject id number are 31, the subject was enrolled at the University of Oklahoma.
  • You might recall that the INT function — that is, the integer function— returns the integer part of the expression contained within parentheses. So, if the subject number is 230007, then int(subj/10000) = int(23.0007) = 23, the location id for Temple University.

Pay particular attention to the syntax of the WHERE= option ... it can trip you up if you aren't careful. The entire WHERE= option must be contained in parentheses immediately following the data set to which you want the condition to apply. The condition itself is also placed in parentheses. So, in general, the syntax, when applied to a DATA statement, should look like this:

DATA dsname (WHERE = (condition));

where dsname is the data set name and condition is the condition that you want SAS to evaluate when selecting the observations.

Now, before running the program, change the directory in the LIBNAME statement so that it reflects the location in which you have saved the background data set. After you've edited the LIBNAME statement, run  the SAS program. Review the output to convince yourself that the temporary data set temple contains the observations in the ICDB background data set that correspond to subjects enrolled at Temple University, while the temporary data set okla contains the observations that correspond to subjects enrolled at the University of Oklahoma. Also note that the DROP statement applies to both of the output data sets. The excluded variables are in neither temple nor okla.

A few more comments. When you use the WHERE= option, the condition applies only to the data set which immediately precedes it. Alternatively, you can use a WHERE statement, in which the condition applies to all of the input data sets. (In the next two lessons, we'll learn more about having more than one input data set.) Also, beware that the WHERE= option cannot be used at the same time as the FIRSTOBS= or OBS= options.

Example 14.11

The following program illustrates the efficient use of the WHERE= option in the SET statement. Because the WHERE= option appears in the SET statement, the selection process takes place as SAS reads in the observations from the icdb.back data set:

LIBNAME icdb 'C:\yourdrivename\Stat481WC\02datastep\sasndata';
DATA temple2;
	set icdb.back (where = (int(subj/10000)=23));
	drop r_id race ethnic relig mar_st ed_level emp_st job_chng income;
RUN;

PROC PRINT data = temple2;
	title 'Output Dataset: TEMPLE2';
RUN;

Output Dataset: TEMPLE2

Obs

subj

v_type

v_date

b_date

sex

state

country

1

230003

0

07/09/93

10/25/47

2

22

1

2

230004

0

01/04/94

08/15/23

2

38

1

3

230005

0

01/06/94

05/25/49

2

10

1

4

230006

0

01/06/94

04/24/49

2

21

1

5

230008

0

10/03/96

08/09/60

2

38

1

6

230009

0

10/31/96

11/13/50

1

38

1

Before running the program, change the directory in the LIBNAME statement so that it reflects the location in which you have saved the background data set. After you've edited the LIBNAME statement, run  the SAS program. Review the output from the PRINT procedure. Convince yourself that the temple2 data set contains the observations in the ICDB background data set that correspond to subjects enrolled at Temple University.


14.4 - The RENAME= option

14.4 - The RENAME= option

There may be occasions in which you want to change some of the variable names in your SAS data set. To do so, you'll want to use the RENAME= option. As its name suggests, the RENAME= option allows you to change the variable names within a SAS data set.

The format of the RENAME= option is:

RENAME = (old1=new1 old2=new2 .... oldk=newk);

where old1, old2, ... oldk are the variable names as they appear in the data set that precedes the RENAME= option, and new1, new2, ..., newk are the corresponding new variable names.

The effect of the RENAME= option depends on where it appears:

  • If the RENAME= option appears in the SET statement, then the new variable name takes effect when the program data vector is created. Therefore, all programming statements within the DATA step must refer to the new variable name.
  • If the RENAME= option appears in the DATA statement, then the new variable name takes effect only when the data are written to the SAS data set. Therefore, all programming statements within the DATA step must refer to the old variable name.

Example 14.12

The following program illustrates the use of the RENAME= option in the SET statement. Specifically, the variable sex is changed to gender, and b_date is changed to birth when the program data vector is created:

DATA back7 (keep = subj gender v_date birth age);
	set back3 (rename=(sex=gender b_date=birth));
	age = (v_date - birth)/365;   *MUST use NEW name for date of birth;
RUN;
 
PROC PRINT data=back7;
	title 'Output Dataset: BACK7';
RUN;

 

Output Dataset: BACK7

Obs

subj

v_date

birth

gender

age

1

110051

01/25/94

12/02/42

2

51.1836

2

110052

01/27/94

01/04/25

2

69.1096

3

110053

02/22/94

03/15/22

2

71.9918

4

110055

03/15/94

03/31/41

2

52.9918

5

110057

03/15/94

07/10/44

2

49.7123

6

110058

03/18/94

09/09/50

2

43.5507

7

110059

03/18/94

07/25/34

2

59.6877

8

110060

06/14/94

05/29/36

2

58.0822

9

110062

03/31/94

04/21/36

2

57.9808

10

110065

04/04/94

10/12/52

2

41.5041

11

110066

04/12/94

08/28/62

2

31.6438

12

110067

04/26/94

02/22/72

2

22.1890

13

110068

06/13/94

09/10/55

2

38.7836

14

110069

05/31/94

08/17/38

2

55.8247

Because the RENAME= option appears in the SET statement, SAS no longer recognizes the variable name sex as the gender, nor b_date as the birth date, of the subject. Instead, SAS recognizes the variable names gender and birth. Hence, when we subsequently calculate the subjects' ages (age) in the DATA step, we must refer to the new variable name birth.

Again, pay particular attention to the syntax of the RENAME= option ... it too can be tricky. The entire RENAME= option must be contained in parentheses immediately following the data set to which you want the name changes to apply. The variable names must also be placed in parentheses. So, in general, the syntax, when applied to a DATA statement, should look like this:

DATA dsname (RENAME = (o1=n1 o2=n2 ...));

where dsname is the data set name and o1 and o2 are the old variable names, and n1 and n2 are the new variable names.

Launch and run  the SAS program. Review the output from the PRINT procedure. Convince yourself that the variable names sex and b_date have been changed as advertised to gender and birth, respectively. Also, verify that the ages of the subjects have been calculated appropriately. Then, in the SAS program, change the variable name birth back to the variable name b_date, and re-run  the program. Does SAS indeed hiccup?

Example 14.13

The following program illustrates the use of the RENAME= option, when it appears in the DATA statement. Specifically, the variable sex is changed to gender, and b_date is changed to birth when SAS writes the data to the output data set

DATA back8 (rename=(sex=gender b_date=birth)
		keep = subj sex v_date b_date age);
	set back3;
	age = (v_date - b_date)/365;      *MUST use OLD name for date of birth;
RUN;
 
PROC PRINT data=back8;
	title 'Output Dataset: BACK8';
RUN;

Output Dataset: BACK8

Obs

subj

v_date

birth

gender

age

1

110051

01/25/94

12/02/42

2

51.1836

2

110052

01/27/94

01/04/25

2

69.1096

3

110053

02/22/94

03/15/22

2

71.9918

4

110055

03/15/94

03/31/41

2

52.9918

5

110057

03/15/94

07/10/44

2

49.7123

6

110058

03/18/94

09/09/50

2

43.5507

7

110059

03/18/94

07/25/34

2

59.6877

8

110060

06/14/94

05/29/36

2

58.0822

9

110062

03/31/94

04/21/36

2

57.9808

10

110065

04/04/94

10/12/52

2

41.5041

11

110066

04/12/94

08/28/62

2

31.6438

12

110067

04/26/94

02/22/72

2

22.1890

13

110068

06/13/94

09/10/55

2

38.7836

14

110069

05/31/94

08/17/38

2

55.8247

Because the RENAME= option appears in the DATA statement, SAS only recognizes the variable names as they appear in the input data set back3. That is, for example, SAS recognizes the variable name b_date as the birth date of the subjects. Hence, when we subsequently calculate the subjects' ages in the DATA step, we must refer to the old variable name b_date. Also, note that the KEEP= option in the DATA statement must refer to the original variable names as they appear in the back3 data set.

This program also illustrates how to use more than one DATA step option at a time. Specifically, the RENAME= and KEEP= options are used to modify the back8 data set. As such, both options are placed within one set of parentheses immediately following the data set to which you want the changes to apply. Then, within those parentheses, the basic syntax for each option is followed.

Launch and run  the SAS program, and review the output from the PRINT procedure. Convince yourself that the variable names sex and b_date have been changed as advertised to gender and birth, respectively. Also, verify that the ages of the subjects have been calculated appropriately.


14.5 - The IN= option

14.5 - The IN= option

The IN= option tells SAS to create an "indicator variable" that takes on either the value 0 or 1 depending on whether or not the current observation comes from the input data set. If the observation does not come from the input data set, then the indicator variable takes on the value 0. If the observation does come from the input data set, then the indicator takes on the value 1. The IN= option is especially useful when merging and concatenating data sets which we'll study in the next two lessons. The basic format of the IN option is:

IN = varname

where varname is the name of a variable in the input data set.

Example 14.14

The following program illustrates using the IN= option when concatenating — that is, appending one data set to another data set. Although we'll take a closer look at concatenating two or more data sets in the next lesson, this example will give you a taste of what's to come:

DATA back9;
	set temple okla (in=okie);
	if okie = 1 then hospital = 31;
		else if okie = 0 then hospital = 23;
RUN;
 
PROC PRINT data=back9;
	title 'Output Dataset: BACK9';
RUN;

Output Dataset: BACK9

Obs

subj

v_type

v_date

b_date

sex

state

country

hospital

1

230003

0

07/09/93

10/25/47

2

22

1

23

2

230004

0

01/04/94

08/15/23

2

38

1

23

3

230005

0

01/06/94

05/25/49

2

10

1

23

4

230006

0

01/06/94

04/24/49

2

21

1

23

5

230008

0

10/03/96

08/09/60

2

38

1

23

6

230009

0

10/31/96

11/13/50

1

38

1

23

7

310020

0

06/18/93

08/09/43

2

43

1

31

8

310032

0

08/03/93

04/02/34

2

13

1

31

9

310037

0

11/08/93

04/25/39

2

36

1

31

10

310041

0

10/27/93

11/01/26

2

43

1

31

11

310049

0

02/04/94

10/03/31

2

25

1

31

12

310055

0

07/12/94

12/11/56

2

36

1

31

13

310056

0

04/01/94

11/16/61

2

36

1

31

14

310059

0

06/13/94

08/22/34

2

43

1

31

15

310065

0

06/30/94

07/27/56

2

36

1

31

16

310069

0

09/23/94

07/14/42

2

36

1

31

17

310072

0

09/08/94

12/20/46

2

43

1

31

18

310073

0

09/26/94

02/27/33

2

36

1

31

19

310074

0

11/14/94

12/11/68

2

5

1

31

20

310080

0

12/16/94

03/14/57

2

36

1

31

21

310082

0

01/17/95

09/15/45

2

4

1

31

22

310083

0

01/20/95

05/13/54

1

.

17

31

23

310084

0

01/20/95

09/29/60

2

36

1

31

24

310085

0

09/01/95

08/08/66

2

16

1

31

25

310087

0

09/27/95

02/27/29

2

36

1

31

26

310088

0

09/14/95

07/05/53

2

27

1

31

27

310089

0

09/14/95

04/07/53

2

36

1

31

28

310090

0

01/31/96

03/28/52

2

35

1

31

29

310091

0

01/16/96

10/07/61

2

36

1

31

30

310092

0

01/05/96

07/12/39

1

36

1

31

31

310094

0

12/15/95

07/25/60

2

36

1

31

32

310096

0

12/06/95

05/23/27

2

36

1

31

33

310097

0

12/18/95

10/13/23

1

36

1

31

34

310100

0

02/23/96

06/03/27

2

36

1

31

35

310102

0

02/12/96

05/06/18

2

1

1

31

36

310103

0

02/12/96

09/16/34

2

4

1

31

37

310104

0

02/13/96

02/11/44

2

35

1

31

38

310106

0

02/15/96

11/24/56

2

36

1

31

39

310107

0

03/05/96

11/10/39

2

13

1

31

40

310108

0

02/21/96

12/29/45

2

.

4

31

41

310109

0

05/08/96

04/15/61

2

36

1

31

42

310110

0

05/14/96

12/23/46

2

5

1

31

43

310111

0

03/21/96

01/10/62

2

36

1

31

44

310112

0

03/25/96

07/08/44

2

36

1

31

45

310113

0

05/22/96

01/12/47

1

36

1

31

46

310114

0

05/23/96

02/04/38

1

36

1

31

47

310115

0

05/28/96

05/29/69

2

36

1

31

48

310117

0

06/06/96

06/15/47

2

5

1

31

49

310120

0

09/18/96

10/20/69

2

5

1

31

50

310121

0

07/19/96

10/23/39

2

43

1

31

51

310122

0

07/12/96

07/15/47

1

43

1

31

52

310123

0

07/23/96

06/13/45

2

14

1

31

53

310124

0

07/31/96

04/20/51

2

36

1

31

54

310125

0

08/13/96

04/13/31

2

4

1

31

55

310126

0

09/18/96

02/15/68

2

36

1

31

56

310128

0

10/30/96

10/26/20

2

36

1

31

57

310130

0

10/16/96

06/16/59

2

31

1

31

58

310132

0

11/04/96

06/15/70

2

43

1

31

The SET statement, in which both data set names temple and okla appear, tells SAS to concatenate the two data sets named temple and okla. That is, SAS will append the data set okla to the data set temple, so that the temporary data set back9 will contain 58 observations — 6 observations from temple and 52 observations from okla for a total of 58 observations.

The IN= option here tells SAS to create a temporary variable called okie that takes on the value 1 if the observation came from the okla data set and 0 if it did not. Therefore, the variable okie will equal 1 for the 52 observations from the data set okla and will equal 0 for the 6 observations from the data set temple. Because the indicator variable created by the IN= option is temporary, it goes away as soon as you leave the DATA step. For example, you can not print the indicator variable. To get around this, you can use the temporary variable to create a permanent variable. In this program, the temporary variable okie is used to create the permanent variable hospital.

Now, launch and run  the SAS program. Review the output from the PRINT procedure. Convince yourself that the temporary data set back9 does indeed contain 58 observations — 6 observations from temple and 52 observations from okla. Also, verify that the variable hospital was created as expected from the temporary variable okie.

Example 14.15

The following program illustrates a cute programming trick when using the IN= option. Specifically, it illustrates how SAS assumes that you mean "if varname = 1" in an IF statement if you just say "if varname" where varname is the variable name specified in an IN= option. Therefore, you can use this fact to create helpful temporary variable names, such as indatasetname. Let's take a look:

DATA back10;
    set temple okla (in=inokie);
    if inokie then hospital = 31;
        else hospital = 23;
RUN;
 
PROC PRINT data=back10;
    title 'Output Dataset: BACK10';
RUN;

Output Dataset: BACK10

Obs

subj

v_type

v_date

b_date

sex

state

country

hospital

1

230003

0

07/09/93

10/25/47

2

22

1

23

2

230004

0

01/04/94

08/15/23

2

38

1

23

3

230005

0

01/06/94

05/25/49

2

10

1

23

4

230006

0

01/06/94

04/24/49

2

21

1

23

5

230008

0

10/03/96

08/09/60

2

38

1

23

6

230009

0

10/31/96

11/13/50

1

38

1

23

7

310020

0

06/18/93

08/09/43

2

43

1

31

8

310032

0

08/03/93

04/02/34

2

13

1

31

9

310037

0

11/08/93

04/25/39

2

36

1

31

10

310041

0

10/27/93

11/01/26

2

43

1

31

11

310049

0

02/04/94

10/03/31

2

25

1

31

12

310055

0

07/12/94

12/11/56

2

36

1

31

13

310056

0

04/01/94

11/16/61

2

36

1

31

14

310059

0

06/13/94

08/22/34

2

43

1

31

15

310065

0

06/30/94

07/27/56

2

36

1

31

16

310069

0

09/23/94

07/14/42

2

36

1

31

17

310072

0

09/08/94

12/20/46

2

43

1

31

18

310073

0

09/26/94

02/27/33

2

36

1

31

19

310074

0

11/14/94

12/11/68

2

5

1

31

20

310080

0

12/16/94

03/14/57

2

36

1

31

21

310082

0

01/17/95

09/15/45

2

4

1

31

22

310083

0

01/20/95

05/13/54

1

.

17

31

23

310084

0

01/20/95

09/29/60

2

36

1

31

24

310085

0

09/01/95

08/08/66

2

16

1

31

25

310087

0

09/27/95

02/27/29

2

36

1

31

26

310088

0

09/14/95

07/05/53

2

27

1

31

27

310089

0

09/14/95

04/07/53

2

36

1

31

28

310090

0

01/31/96

03/28/52

2

35

1

31

29

310091

0

01/16/96

10/07/61

2

36

1

31

30

310092

0

01/05/96

07/12/39

1

36

1

31

31

310094

0

12/15/95

07/25/60

2

36

1

31

32

310096

0

12/06/95

05/23/27

2

36

1

31

33

310097

0

12/18/95

10/13/23

1

36

1

31

34

310100

0

02/23/96

06/03/27

2

36

1

31

35

310102

0

02/12/96

05/06/18

2

1

1

31

36

310103

0

02/12/96

09/16/34

2

4

1

31

37

310104

0

02/13/96

02/11/44

2

35

1

31

38

310106

0

02/15/96

11/24/56

2

36

1

31

39

310107

0

03/05/96

11/10/39

2

13

1

31

40

310108

0

02/21/96

12/29/45

2

.

4

31

41

310109

0

05/08/96

04/15/61

2

36

1

31

42

310110

0

05/14/96

12/23/46

2

5

1

31

43

310111

0

03/21/96

01/10/62

2

36

1

31

44

310112

0

03/25/96

07/08/44

2

36

1

31

45

310113

0

05/22/96

01/12/47

1

36

1

31

46

310114

0

05/23/96

02/04/38

1

36

1

31

47

310115

0

05/28/96

05/29/69

2

36

1

31

48

310117

0

06/06/96

06/15/47

2

5

1

31

49

310120

0

09/18/96

10/20/69

2

5

1

31

50

310121

0

07/19/96

10/23/39

2

43

1

31

51

310122

0

07/12/96

07/15/47

1

43

1

31

52

310123

0

07/23/96

06/13/45

2

14

1

31

53

310124

0

07/31/96

04/20/51

2

36

1

31

54

310125

0

08/13/96

04/13/31

2

4

1

31

55

310126

0

09/18/96

02/15/68

2

36

1

31

56

310128

0

10/30/96

10/26/20

2

36

1

31

57

310130

0

10/16/96

06/16/59

2

31

1

31

58

310132

0

11/04/96

06/15/70

2

43

1

31

Do you get it? The temporary variable inokie equals 1 for records coming from the okla data set and 0 for records coming from the temple data set. The IF statement does not (or need not) say "if inokie = 1 then hospital = 31." Instead, the IF statement says the much more English-sounding "if inokie then hospital = 31."

Launch and run  the SAS program. Review the output from the PRINT procedure, and convince yourself that the back10 data set has the same structure and contents as the back9 data set from the previous example.


14.6 - Summary

14.6 - Summary

In this lesson, we explored the various DATA step options that are available in SAS to control the structure and contents of a SAS data set when the input is from a SAS data set.

The homework for this lesson will give you more practice with these techniques so that you become even more familiar with how they work and can use them in your own SAS programming.


Legend
[1]Link
Has Tooltip/Popover
 Toggleable Visibility