Previous Topic: Specify Sort Field InformationNext Topic: Select Subtotal Fields


Select Any Sort Fields Where Subtotaling is Desired

Selecting the fields to perform subtotaling on is probably the most complex portion of the report definition process. This phase involves a three-tier hierarchy of panels, as opposed to the two-tier hierarchies found in the report field and sort field selection processes. The first panel shown here displays a list of the sort fields that you selected. You can select one or more of these fields as levels where subtotaling will be performed.

To really understand the process, we need to look at a sample problem. Suppose your installation standard is that the third level node (or index) of every data set name must be the user ID. We want to produce a list of all data sets that belong to each user in volume sequence. We also need to show the total number of tracks allocated on each volume for the user, as well as total overall tracks allocated and tracks used for each user. Each user's data sets should begin on a new page. How should we define this report?

First of all, we would select NODE3 as the first-level sort criteria and define it as a control break with lines to skip equal to "E" (page eject). We would select VOLSER as the second-level sort field and specify it as a control break with skip lines equal to 2. We would probably also specify DSNAME as the third sort criteria, just so the data set names would show up in alphabetical order for each user (although this wouldn't be necessary). When we reach this panel (DMS044O), the three fields would show up in alphabetical order: DSNAME, NODE3, and VOLSER. Since there is no requirement for any totaling at the data set name level, it will be ignored.

The important idea to keep in mind is that the sort fields actually form a hierarchy of control levels in the reporting process. In this example we have the following levels:

This is important, because when the report is being generated, a comparison will be performed on the data to determine if any of the sort fields have changed value, from the highest level down. If a difference is found, all subtotaling from that level down will be performed and printed in reverse order (lowest level up to the level where the change was detected). Each subtotal is indented on the report according to the level of the sort field. This is mentioned here because it can be very confusing defining your subtotal fields if you don't understand how the levels work. In addition, the printed report can also be confusing if you use the standard default for subtotal print lines, as we'll see shortly.

Back to our example, we would first select NODE3. This can be done by either placing the cursor next to NODE3 on the display and keying an S, or by entering S NODE3 on the command line. All we are doing at this point is telling CA Disk that we want to perform some type of subtotaling at the NODE3 (in our case, the user ID) level. This will take us to another panel (DMS044I) where you can specify the fields you want to total at this level. After you select the subtotal fields at this level, you will eventually be returned to this panel to make another selection. Next you would select the VOLSER field, which would take you back to the subtotal field selection screen. Although this panel is identical to the one shown at the NODE3 level, you are now selecting fields that will be totaled based on a change in volume within each user ID.

When you have finished specifying all subtotaling fields you desire, press the key at this panel to continue in the report definition process. If you change your mind about any of the subtotals being kept, you can reselect the sort field on this panel to modify your previous selections. If you decide that you want to terminate the report definition process, enter the command CANCEL in the command input area.