Help using Base SAS procedures

Transforming a dataset - HELP?

Reply
N/A
Posts: 1

Transforming a dataset - HELP?

Hi,

I have a large dataset of 150,000 rows and 5 columns and I want to manipulate the data set so that it goes from long to wide.

The dataset is currently in the following format:

OfficeDateLAW_CATEGORY_CODEsub_cat1NUMBER
101-Dec-101a9
101-Jan-111a5
101-Feb-111a9
101-Mar-111a17
101-Apr-111a13
201-Dec-102b1
201-Dec-103b5
201-Dec-104b26
201-Dec-105b37
201-Dec-101b25
201-Dec-106b4
201-Dec-107b16
301-Dec-101a1
301-Feb-111a15
301-Mar-111a7

And I want to alter this so that the dates become variables (i.e. from Dec 2010 to October 2014), and then for each office and law category I want the number that corresponds to that date to go into the correct date column. For example I want something that looks like this:

OfficeLAW_CATEGORY_CODEsub_cat1Dec-10Jan-11Feb-11
11a959
21b25
22b1
23b5
24b26
25b37
26b4
27b16
31a1015

Does that make sense? What do I need to do?

Ask a Question
Discussion stats
  • 0 replies
  • 148 views
  • 0 likes
  • 1 in conversation