BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
lchristensen
Obsidian | Level 7

I am reading SMF/RMF data, specifically type 70 records and using MXG's generated Type70.

I have a print that reflects the fields I am interested in. Two are fields I've added called 'M9_Dump_Process' and 'M9_Dump'. M9_Dump is the first 6 characters of M9_Dump_Process which is a name I made up reflecting the number of disk volumes being processed and the type of compression being used.

 

There are a varying number of SMF/RMF intervals (30 minutes per interval). I output the STARTIME (start of interval), M9_Dump_Process, IO*ACTIVITY*RATE (IORATE), MVS Busy(%) (pctmvsby), Zip Busy(%) (pctzipby). and IBM*4-HR*AVERAGE*HOURLY*MSU (smf70lac).

 

The number of SMF/RMF intervals can vary by M9_Dump_Process. For example, M9_Dump_Process 'Dump08Vols_DFDSS' took nearly three hours so there are six SMF/RMF intervals. Dump08Vols_None on the other hand completed within an hour and has two SMF/RMF intervals.

 

What I would like to do is create a vertical bar chart. The vertical axis would represent pctmvsby and pctzipby (0-100%). The horizontal axis would be the SMF intervals (STARTIME). For each interval, I want to have a bar representing the pctmvsby value next o pctzipby. I would like the value of the M9_Dump_Process to be in the vertical bar, or placed where you can immediately see which M9_Dump_Process the data reflects. 

 

There are four values for P9_Dump_Process. Well, there's actually 20, four each for 'M9_Dump'. I'd like to have all M9_Dump_Process charts for a value of M9_Dump on a page, a new page for each M9_Process.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
lchristensen
Obsidian | Level 7

I don't think I've ever provided data before, and did in the PDF attachment.

Anyway, I have what I decided I'll go with:

 

 

proc sort data=Work.T70;
by M9_Dump_Process startime;
run;
proc sgplot data=Work.T70;
where (M9_Dump =: 'D');
/* by M9_Dump_Process startime; */
by M9_Dump;
title 'Dump 8 Volumes: CP and ZIIP Usage';
yaxis label='CP and ZIP % Used';
vbar M9_Dump_Process / response=pctmvsby stat=MEAN;
vbar M9_Dump_Process / response=pctzipby stat=MEAN barwidth=0.5;
run;
proc sgplot data=Work.T70;
where (M9_Dump =: 'D');
title 'Dump 8 Volumes: CP and ZIIP Usage';
yaxis label='CP and ZIP % Used';
vbar M9_Dump_Process / response=pctmvsby stat=MEAN;
vbar M9_Dump_Process / response=pctzipby stat=MEAN barwidth=0.5;
run;

 

lchristensen_0-1655954340268.png

 

lchristensen_2-1655954394715.png

 

Thank you,

View solution in original post

3 REPLIES 3
lchristensen
Obsidian | Level 7

Hit the post button too soon. Sorry.

Attaching my SAS code and a PDF of the printed data I want and some not useful SGPLOTs.

 

 

ballardw
Super User

Data is good.

Then we can see what you're talking about. Not everyone knows every TLA data description (TLA= Three letter Acronym) so you need to show us what you are attempting to plot.

 

Instructions here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the </> icon or attached as text to show exactly what you have and that we can test code against.

 

To cluster multiple values together it usually means that the data should have a variable that contains an indicator as to which "bar" the values represent then that variable is used as a GROUP variable and the Groupdisplay=cluster option places bars side-by-side.

Example with a data set you should be able to test code with:

proc sgplot data=sashelp.class;
   vbar age/group=sex stat=freq groupdisplay=cluster;
run;

The variable Age would be the "interval" indicator variable, if I understand your usage, Sex as the group variable would be a variable that takes on values of "pctmvsby" and "pctzipby", which would require reshaping your data a little. The above example calculates a statistic Freq for the height of the bars. You probably would be providing a variable with the values you have currently for a Response= variable.

 

I strongly recommend that you calculate the percentages that you want before getting to the Sgplot (or other graphing procedure) code. That way you control exactly the numerator and denominator. The percentages the Sgplot might calculate often are not what you expect/want unless you have very simple data.

lchristensen
Obsidian | Level 7

I don't think I've ever provided data before, and did in the PDF attachment.

Anyway, I have what I decided I'll go with:

 

 

proc sort data=Work.T70;
by M9_Dump_Process startime;
run;
proc sgplot data=Work.T70;
where (M9_Dump =: 'D');
/* by M9_Dump_Process startime; */
by M9_Dump;
title 'Dump 8 Volumes: CP and ZIIP Usage';
yaxis label='CP and ZIP % Used';
vbar M9_Dump_Process / response=pctmvsby stat=MEAN;
vbar M9_Dump_Process / response=pctzipby stat=MEAN barwidth=0.5;
run;
proc sgplot data=Work.T70;
where (M9_Dump =: 'D');
title 'Dump 8 Volumes: CP and ZIIP Usage';
yaxis label='CP and ZIP % Used';
vbar M9_Dump_Process / response=pctmvsby stat=MEAN;
vbar M9_Dump_Process / response=pctzipby stat=MEAN barwidth=0.5;
run;

 

lchristensen_0-1655954340268.png

 

lchristensen_2-1655954394715.png

 

Thank you,

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 3 replies
  • 630 views
  • 0 likes
  • 2 in conversation