PRINT SPACE

The PRINT SPACE utility reports on space utilization in one or more areas, subareas, or segments.
idmscu19
The PRINT SPACE utility reports on space utilization in one or more areas, subareas, or segments.
You can specify whether the report is to be based on information in the space management pages (SMPs) or on information in the database page headers.
This article describes the following information:
2
2
Authorization
You need DBAREAD privilege to access the following report functions:
  • Report on space utilization in an area
  • Report on space utilization in a segment
  • Report on space utilization in a file
Syntax
  ►►─── PRINT SPACE ────────────────────────────────────────────────────────────►                     ┌─────────── , ─────────────────────────────────────┐  ►─── FOR ─┬─ AREA ─▼─ segment-name.area-name ─┬──────────────────────┬─┴───┬─►            │           ┌────── , ───────┐      └ SUBAREA subarea-name ┘     │            ├─ SEGMENT ─▼─ segment-name ─┴───────────────────────────────────┤            │           ┌─────────── , ────────────┐                         │            └─ FILE ────▼─ segment-name.file-name ─┴─────────────────────────┘  ►─┬───────────┬──────────────────────────────────────────────────────────────►◄    └─ FULL ────┘  
Parameters
  • FOR
    Identifies the areas on which the PRINT SPACE utility is to report.
  • AREA
    Directs the PRINT SPACE utility to report on space utilization in one or more areas or subareas. If no SUBAREA clause is specified, this option produces a report for the entire area plus a report for each file in the area. If a SUBAREA clause is specified, reporting is restricted to the specified subarea.
    Native VSAM files are ignored if used in this utility.
  • segment-name
    Specifies the name of the segment associated with the area.
  • area-name
    Specifies the name of the area.
  • subarea-name
    Specifies the name of the subarea associated with the area.
  • SEGMENT
    Directs the PRINT SPACE utility to report on space utilization in all areas of one or more segments.
    Native VSAM files are ignored if used in this utility.
  • segment-name
    Specifies the name of the segment.
  • FILE
    Directs the PRINT SPACE utility to report on space utilization for each area or portion of an area contained in the file. This option always produces a full report, whether you specify the FULL parameter.
  • segment-name
    Specifies the name of the segment associated with the file.
  • file-name
    Specifies the name of the file.
  • FULL
    Directs the PRINT SPACE utility to base the space utilization report on information in the header of each page.
    By default, if you do not specify FULL, the space utilization report is based on information in the SMPs of the specified areas.
    If the FULL option is not selected, thespace utilization report is based solely on information on the space management pages (SMPs). The space utilization reported may vary widely from the actual space utilization as SMP statistics are not altered until the page referenced is at least 70% full.
Usage
Not using the FULL option
If the FULL option is not specified, the space utilization report is based on information on the Space Management Pages. The information reported may vary widely from the actual space utilization. For example, if all pages in a particular segment were 50% full, the SMP pages will indicate that each page is 100% available. When using the default on the PRINT SPACE utility, the report will indicate that the database is being used at a 0% level. When running the PRINT SPACE utility with the FULL option, the report will indicate that your database is 50% utilized.
Running Under Central Version
Only PRINT SPACE FOR AREA and PRINT SPACE FOR SEGMENT are supported under central version.
Logically-deleted records and reports
PRINT SPACE BY FILE sequentially reads the files, letting you include only the files in the JCL stream that you want to process.
When you use this option, PRINT SPACE will not report relocated logically deleted records as logically deleted. These records will be reported as normal records. Therefore, record space utilization reports for an area can produce different results when compared to the file report for the same page range.
JCL Considerations
When you submit a PRINT SPACE statement through the batch command facility in local mode, the JCL to execute the facility must include statements to define the file(s) containing the area(s) to be processed. When running under central version a SYSCTL statement is needed.
For more information about the generic JCL used to execute the batch command facility, see JCL and Commands for z/OS and z/VSE .
Examples
PRINT SPACE by area with FULL option
print space for area empdemo.emp-demo-area full;
PRINT SPACE by file
print space for file empdemo.empdemo;
Sample Output
The following report is produced by the PRINT SPACE utility after processing the PRINT SPACE statement by area with the FULL option.
IDMSBCF                                              IDMS Batch Command Facility                            mm/dd/yy   PAGE 1  SET BATCH WIDTH PAGE 80;  Status = 0    PRINT SPACE FOR AREA EMPDEMO.EMP-DEMO-AREA FULL;                                        AVAILABLE Space Distribution Report                                                   AVAIL         NUMBER                                                   SPACE        OF PAGES  AREA       EMPDEMO.EMP-DEMO-AREA   PAGE SIZE            512      PAGES       1,310,001 THRU      1,310,010                                                  91-100%              7                                                  81-90 %              2                                                  71-80 %              0                                                  61-70 %              0                                                  51-60 %              0                                                  41-50 %              0                                                  31-40 %              0                                                  21-30 %              0                                                  11-20 %              0                                                  00-10 %              0                                                  SMPS                 1                                                  TOTAL               10      FILE   EMPDEMO.EMPDEMO      PAGES       1,310,001 THRU      1,310,010      BLOCKS              1 THRU             10  Total Space Allocated                                    5,120  Total Space Available  (Percent)                         4,128     (80%)  Total Space Used                                           992  AREA       EMPDEMO.EMP-DEMO-AREA             Distribution of USED Space Report               Maximum                                          Percent of  Record Type  Length       Occurrences   Total Space Used      Total Used    SR1002         40              3                 120            12.09  **LD1002         24              3                  72             7.25  Space Inv.      480              1                 480            48.38  Overhead         32             10                 320            32.25          *** logically deleted records FOUND ***  Status = 0
The following report is produced by the PRINT SPACE utility after processing the PRINT SPACE statement by file.
IDMSBCF  nn.n          CA IDMS Batch Command Facility     mm/dd/yy    PAGE    1   PRINT SPACE FOR FILE EMPDEMO.EMPDEMO;                                        AVAILABLE Space Distribution Report                                                  AVAIL         NUMBER                                                  SPACE        OF PAGES AREA       EMPDEMO.EMP-DEMO-REGION  PAGE SIZE          4,276     PAGES          75,001 THRU         75,100                                                 91-100%             78                                                 81-90 %             13                                                 71-80 %              7                                                 61-70 %              0                                                 51-60 %              0                                                 41-50 %              0                                                 31-40 %              1                                                 21-30 %              0                                                 11-20 %              0                                                 00-10 %              0                                                 SMPS                 1                                                 TOTAL              100     FILE   EMPDEMO.EMPDEMO     BLOCKS              1 THRU            100 Total Space Allocated                                  427,600 Total Space Available  (Percent)                       394,120     (92.17%) Total Space Used                                        33,480 Logically Full Pages                                         0 Total Space Unusable   (Percent)                             0    (  0.00%) AREA       EMPDEMO.EMP-DEMO-REGION     Distribution of USED Space Report              Maximum                                          Percent of Record Type  Length       Occurrences   Total Space Used      Total Used   SR7            40              1                  40             0.11   SR8         1,396              3               2,820             8.42   SR415         196             56              10,976            32.78   SR420          60             68               4,080            12.18   SR425          36            150               5,400            16.12   SR460          40             68               2,720             8.12 Space Inv.    4,244              1               4,244            12.67 Overhead         32            100               3,200             9.55         *** NO logically deleted records found *** Status = 0        SQLSTATE = 00000
For more information about space utilization and database pages, see the
Database Administration Section
.
PRINT SPACE FOR AREA SYSSQL.DDLCATX FULL;                                        AVAILABLE Space Distribution Report                                                  AVAIL         NUMBER                                                  SPACE        OF PAGES AREA       SYSSQL.DDLCATX  PAGE SIZE          4,276  PAGE RESERVE         212     PAGES          10,001 THRU         13,000                                                 91-100%             56                                                 81-90 %            117                                                 71-80 %            125                                                 61-70 %            197                                                 51-60 %            197                                                 41-50 %            229                                                 31-40 %            230                                                 21-30 %            225                                                 11-20 %            203                                                 00-10 %          1,419                                                 SMPS                 2                                                 TOTAL            3,000     FILE   SYSSQL.DDLCATX     BLOCKS              1 THRU          3,000 Total Space Allocated                               12,828,000 Total Space Available            (Percent)           3,240,368     (25.26%) Total Reserved Space Available   (Percent)             511,128     ( 3.98%) Total Unreserved Space Available (Percent)           2,729,240     (21.28%) Total Space Used                                     9,587,632 Logically Full Pages                                         0              Total Space Unusable     (Percent)                           0    (  0.00%) AREA       SYSSQL.DDLCATX              Distribution of USED Space Report                 Maximum                                          Percent of    Record Type  Length       Occurrences   Total Space Used      Total Used    Null Line         8             54                 432             0.00       SR5            48              1                  48             0.00       SR7            40             12                 480             0.00       SR8         1,404         28,567           9,482,184            99.93     Space Inv.    4,244              2               8,488             0.08     Overhead         32          3,000              96,000             0.98             *** NO logically deleted records found ***