BookmarkSubscribeRSS Feed
rkumar23
Calcite | Level 5

 

 

                                                                                                      SUBSYS REPORT

DATE

TIME

SubSys

Blades

Blade Name

Blade Util

Blade Name

Blade Util

Blade Name

Blade Util

Blade Name

Blade Util

Blade Name

Blade Util

Blade Name

Blade Util

Blade Name

Blade Util

Blade Name

Blade Util

28FEB2015

8:30

12345

4

1MA

0

1MB

46

2MC

67

2MD

49

 

.

 

.

 

.

 

.

26FEB2015

8:30

12345

4

1MA

0

1MB

27

2MC

66

2MD

55

 

.

 

.

 

.

 

.

21FEB2015

8:30

12345

4

1MA

0

1MB

41

2MC

60

2MD

44

 

.

 

.

 

.

 

.

20FEB2015

10:30

12345

4

1MA

0

1MB

46

2MC

57

2MD

60

 

.

 

.

 

.

 

.

 

Above is an output of the PROC REPORT after processing the data and after the "Blade Name" the next column represent the "Value for that Blade ..

I was wondering if it's possible via PROC REPORT to print this data something like where we have Blade name as column heading and then Blade value...I guess similar kind of question I asked before However none of the solution work...I have requirement to use PROC REPORT becuase I am using that in the MACRO and then printing output in ODS HTML ...

 

5 REPLIES 5
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Hi,

 

Sorry, am not following what it is you want.  Please provide example of what you have, and an example of what you want.  Is it possible you mean across variables?  

rkumar23
Calcite | Level 5
This is the output I am looking instead of above output

   ​  SUBSYS REPORT
DATE TIME SubSys Blades 1MA 1MB 2MC 2MD
28-Feb-15 8:30 12345 4 0 46 67 49
26-Feb-15 8:30 12345 4 0 27 66 55
21-Feb-15 8:30 12345 4 0 41 60 44
20-Feb-15 10:30 12345 4 0 46 57 60
RW9
Diamond | Level 26 RW9
Diamond | Level 26

This then is nothing to do with proc report.  You are restructuring your data from wide (transposed) to long (normalised).  There are many posts and papers about on this subject, try the learning module on the subject:

http://www.ats.ucla.edu/stat/sas/modules/ltow_transpose.htm

 

The simplest form, but most typing, is just to set each block:

data want;
  set have (keep=date time subsys blades blade_util1 rename=(blade_util1=1ma))
      have (keep=date time subsys blades blade_util2 rename=(blade_util2=1mb))
      have (keep=date time subsys blades blade_util3 rename=(blade_util3=2mc))
      have (keep=date time subsys blades blade_util4 rename=(blade_util4=2md));
run;

Note, I do not know what your variable names are so just made them up based on the bits you have posted.

rkumar23
Calcite | Level 5

Thanks for your advice however You have hardcoded rename statement with blade_util1=1MA however that's not the case everytime since this is for one SUBSYS(which is a by variable) next subsys data can have Blade_util1=2MC (different name) so renaming with hard coding value won't be successful.

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Well, I can only post with what you have provided there.  That code was presented for the data shown, there was also a link there which goes into other wasy to normalise data.  Alternatively, post a datastep (i.e. data + datalines) with some test data and I can modify the code to work with the data.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 1228 views
  • 0 likes
  • 2 in conversation