Summarizing data in a view
Use the following procedure to create a summary of data in a view.
MainView creates a summary view by summarizing numerous rows of data from a tabular view into a single row based on the values in a selected column. Statistical information can then be calculated from another column of the view.
The column on which you base the summary view should contain a limited number of possible values, not just random data. In other words, multiple rows should be expected to contain one of the possible values for that column.
Use the following procedure as an example of how to create a summary view from a tabular view of data set information. The view that is used in this example comes from the MainView SRM VTOC Scan Facility. The goal of this summary view is to determine how much DASD data sets use, based on their catalog status.
To summarize the data in a view
- On the view's COMMAND line, type CUST and press Enter.
In the OPTION field, type Z followed by the letter of the column to be summarized and press Enter.For this example, use D for the Cat (catalog status) column:
------------------------ VIEW CUSTOMIZATION - WBVTOCD -------------------------
OPTION ===> z d SCROLL ===> HALF
Options: (that require column selection) Other options:
F - Format M - Move I - Include G - Graph S - Save view
O - Order R - Repeat X - Exclude P - Parameters E - Show excluded
L - Filter T - Threshold H - Hyperlink Z - Summarize K - Show template
-------------------------------------------------------------------------------
Some options ask you to select a target column. To do so, either type the
option with the column id on the OPTION line (as in: f e to format column E),
or type just the option, move the cursor to the target column and press ENTER.
Your changes are implemented every time you press ENTER. You can save the
modified view definition with any name you choose and specify where thresholds
are to be saved with the Threshold Location field. Enter END (PF3) to exit.
-------------------------------------------------------------------------------
A B C D E F G
CMD Data Set Volume Vol Cat UCB Record Bl
--- Name ------ Seq --- ---- Length Si
RDGTMS.IMS61.DBDHD01P SYSB17 1 D 5347 8906 8
RDGTMS.IMS61.DBDHD01P.SHADOW SYSB10 1 N 535E 8906 8
RDGTMS.IMS61.DBDHD02A.DATA SYSB08 1 C 4D1 40 4
RDGTMS.IMS61.DBDHD02A.INDEX SYSB08 1 C 4D1 1529 1The dialog shown in the following example is displayed:
------------------------ VIEW CUSTOMIZATION - WBVTOCD -------------------------
OPTION ===> Z SCROLL ===> PAGE
Options: (that require column selection) Other options:
F - Format M - Move I - Include G - Graph S - Save view
O - Order R - Repeat X - Exclude P - Parameters E - Show excluded
L - Filter T - Threshold H - Hyperlink Z - Summarize K - Show template
------------------< Summarize - Specify columns for summarization >------------
If you want to summarize rows of data, specify at least one column to group by:
Group by 1=> A To further customize a summarized view:
2=> Use option X to exclude a column from the summarized view.
3=> Use option F to modify the type of summarization for a column
4=> ( S sum, A avg, M min, X max, C count, L any, P percent)
-------------------------------------------------------------------------------
A B C D E F G
CMD Cat Data Set Volume Vol UCB Record Bl
--- --- Name ------ Seq ---- Length Si
C RDG***************************************** ****** 1 53B2 0
D RDGTMS.************************************* SYSB** 1 25A6 0
N RDG***************************************** SYSB** 1 615C 0Notice that the Cat column is moved to the first position, column A. The column on which a summary view is based is always moved to the first position for easy identification.
Also notice that the view has been reduced to three lines, with category letters designated as follows:
Letter
Description
C
For data sets that are cataloged
D
For data sets that are incorrectly cataloged (that is, a data set resides on a volume but the catalog points to a data set of the same name on a different volume)
N
For data sets that are not cataloged
U (not shown in the example)
For data sets that have unknown catalog status
In the OPTION field, type F followed by the letter of the column whose data you want to calculate and press Enter.For this example, use L for the Tracks Allocated column. The dialog shown in the example is displayed:
------------------------ VIEW CUSTOMIZATION - WBVTOCD -------------------------
OPTION ===> f SCROLL ===> PAGE
Options: (that require column selection) Other options:
F - Format M - Move I - Include G - Graph S - Save view
O - Order R - Repeat X - Exclude P - Parameters E - Show excluded
L - Filter T - Threshold H - Hyperlink Z - Summarize K - Show template
-------------< Format - column: L element: W21TRKSA >---------------
Data type: Numeric Display Mode => 1 (1 as is 2 as graph 3 as hex)
Width => 9 Graph range (for 2): Low => 0 High => 0
Decimals => 0 (for numeric data) Display zero values => Y (Yes/No)
Heading1 => Tracks Summarization type => A (A/S/M/X/C/L/P)
Heading2 => Allocated Condition (for C) =>
-------------------------------------------------------------------------------
A G H I J K L M N O P
CMD Cat Block Percent Blks Exts Size Tracks Tracks Tracks Percent CA
--- --- Size Eff /Trk ---- (kb) Allocated Used Free Used Split
C 0 81.4 0 1 781 15 4 10 35.8 *
D 0 31.4 0 1 830 15 1 14 4.4 N
N 0 38.3 0 1 1372 26 2 25 14.2 NThe summarized view now shows the formatting and calculation (Summarization type) options that can be performed on the selected column.
In the Summarization type field, specify the type of calculation to be performed by entering one of these characters:
Character
Calculation
Description
A
Average
Average adds every value in a summarized numeric data field and shows the average.
S
Sum
Sum adds every value in a summarized numeric data field and shows the total.
M
Minimum
Minimum shows the smallest value in a summarized numeric or character data field.
X
Maximum
Maximum shows the largest value in a summarized numeric or character data field.
C
Count
Count does a count of all the number occurrences of a grouped value, which is either character or numeric, within a summarized data field.
L
Any
Any displays a duplicate character value or any one of the numeric values encountered in a summarized data field.
P
Percentage
Percent adds just the values in a summarized numeric field and shows the total as a percentage in relation to the total of all the values for all the data fields.
For this example, specify S to calculate the sum, or total amount, of tracks allocated, and then press Enter.
The result of the calculation is displayed:
------------------------ VIEW CUSTOMIZATION - WBVTOCD -------------------------
OPTION ===> f SCROLL ===> PAGE
Options: (that require column selection) Other options:
F - Format M - Move I - Include G - Graph S - Save view
O - Order R - Repeat X - Exclude P - Parameters E - Show excluded
L - Filter T - Threshold H - Hyperlink Z - Summarize K - Show template
-------------< Format - column: L element: W21TRKSA >---------------
Data type: Numeric Display Mode => 1 (1 as is 2 as graph 3 as hex)
Width => 9 Graph range (for 2): Low => 0 High => 0
Decimals => 0 (for numeric data) Display zero values => Y (Yes/No)
Heading1 => Tracks Summarization type => S (A/S/M/X/C/L/P)
Heading2 => Allocated Condition (for C) =>
-------------------------------------------------------------------------------
A G H I J K L M N O P
CMD Cat Block Percent Blks Exts Size Tracks Tracks Tracks Percent CA
--- --- Size Eff /Trk ---- (kb) Allocated Used Free Used Split
C 0 81.4 0 1 781 2106 4 10 35.8 *
D 0 31.4 0 1 830 45 1 14 4.4 N
N 0 38.3 0 1 1372 8976 2 25 14.2 NThe Tracks Allocated column now shows the total amounts for the data sets based on their catalog status (column A).
- When finished, press the END (PF3) key.
- In the Save changes field, type YES.
When prompted for the following information about the new view, complete each field and press Enter:
- View name
- Replace
- Description
- Dynamic fields
- Summary view
- Threshold Location
For descriptions of these fields, see the online Help.
Related topic