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 ...
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?
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.
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.
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.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.