Question: Question 3 (10 Marks) Read in the raw data below into two separate data sets. DO NOT pre-order the data in the data step. Read

Question 3 (10 Marks)

Read in the raw data below into two separate data sets. DO NOT pre-order the data in the data step. Read in the data in the order that it is in, in the tables below.

Item Number

Name

Price

Store Location

333

PrintCrd

399

CPT

277

KeyPad

25

CPT

802

PnclHldr

12

DUR

417

PaprShrd

122

JHB

515

Basket

17

PE

Item Number

Name

RePrice

333

PrintCrd

386

277

KeyPad

25

802

PnclHldr

11

417

PaprShrd

135

Carry out the following steps in your program:

  • First run the code to create the two data sets (call these datasets data1 and data2).
  • Sort both data sets according to the item number variable in ascending order. (Do not create new data sets, overwrite the current data sets with the sorted data sets)
  • Merge the two data sets into a data set called "Merged_Data". Merge the data sets by the item number variable.
  • Delete observations from the merged data set if there is no "RePrice" indicated.
  • Print the data set "Merged_Data" to the screen.

DATA Provided

The data below is for the dataset called (data1)

data data1;

input ItemNumber Name $ Price StoreLoc $;

datalines;

333 PrintCrd399 CPT

277 KeyPad 25 CPT

802 PnclHldr 12 DUR

417 PaprShr 122 JHB

515 Basket 17 PE

;

run;

The data below is for the dataset called (data1)

data data2;

input ItemNumber Name $ RePrice;

datalines;

333 PrintCrd 386

277 KeyPad 25

802 PnclHldr 11

417 PaprShrd 135

;

run;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!