The ASURXSE external function returns the reorganized space for the partitioned table space, nonpartitioned table space, table, or index that you specify.
The product returns the results for each type of Db2 object in the variable SERESULT as blank-separated values. The following table describes ASURXSE functionality:
ASURXSE external function
| | |
---|
TP Definition: Partitioned table space Description: Estimates the reorganized space for a partitioned table space | rc = ASURXSE('TP' db2ver card pqty sqty partitions pctfree freepage pgsize dssize rowavg maxrows compress devtype alocunit type segsize); where: - TP = the literal ‘TP’
- db2ver = Db2 version
- card = number of rows in partition
- pqty = primary quantity in allocation units
- sqty = secondary quantity in allocation units
- partitions = number of partitions
- pctfree = percentage of free spacefree
- page = free pages
- pgsize = size of page (4, 8, 16, or 32)
- dssize = maximum size of a data set in kilobytes
- srowavg = average row length
- maxrows = maximum rows per page for table space
- compress = data compression (Y or N)
- devtype = device type (for example, 3390)
- alocunit = allocation unit (C or T)
- type = type of table space (L, I, K, R, or 1 where 1 indicates blank or not specified) 1
- segsize = number of pages in the segment 1, 2
| SERESULT = TP rpp pages space trks cyls extents dsns, where: - TP = the literal 'TP'
- rpp = rows per page
- pages = number of pages in partition
- space = space in KB
- trks = space in tracks
- cyls = space in cylinders
- extents = number of extents
- dsns = number of data sets
Important If you omit the type and segsize parameters, the product assumes the type is a simple table and the segment size is 0. Specifying 1 for the type parameter is the equivalent of specifying a blank in the online interface. You must specify a non-zero value for the segsize parameter if you set the type parameter to R. If the type parameter is R and you specify a 0 value for segsize or omit the segsize parameter, DASD MANAGER PLUS sets the default segment size to 4. |
TB Definition: Non-partitioned table Description: Estimates the reorganized space for a nonpartitioned table | rc = ASURXSE('TB' db2ver card pctfree freepage pgsize rowavg compress segsize maxrows); where - TB = the literal ’TB’
- db2ver = Db2 version
- card = number of rows in table
- pctfree = percentage of free space
- freepage = free pages
- pgsize = size of page (4, 8, 16, or 32)
- rowavg = average row length
- compress = data compression (Y or N)
- segsize = segment size
- maxrows = maximum rows per page for table space
| SERESULT = TB rpp pages; where: - TB = the literal ‘TB’
- rpp = number of rows per page
- pages = number of pages in the table
|
TS Definition: Non-partitioned table space Description: Estimate the reorganized space for a nonpartitioned table space | rc = ASURXSE('TS' db2ver pages pqty sqty freepage pgsize compress segsize devtype alocunit type); where - TS = the literal ‘TS’
- db2ver = Db2 version
- pages = total pages for all tables
- pqty = primary quantity in allocation units
- qty = secondary quantity in allocation units
- sfreepage = free pages
- pgsize = size of page (4, 8, 16, or 32)
- compress = data compression (Y or N)
- segsize = segment size
- devtype = device type (for example, 3390)
- alocunit = allocation unit (C or T)
- type = type of table space (L, I, K, or blank)
| SERESULT = TS pages space trks cyls extents dsns; where: - TS = the literal 'TS'
- pages = total pages for all tables
- space = space in KB
- trks = space in tracks
- cyls = space in cylinders
- extents = number of extents
- dsns = number of data sets
|
TS Definition: Partition-by-growth table space Description: Estimates the reorganized space for a partition-by-growth table space | rc = ASURXSE('TS' db2ver pages pqty sqty freepage pgsize compress segsize devtype alocunit G rpp dssize card); where - TS = the literal ‘TS’
- db2ver = Db2 version
- pages = total pages for all tables
- pqty = primary quantity in allocation units
- sqty = secondary quantity in allocation units
- freepage = free pages
- pgsize = size of page (4, 8, 16, or 32)
- compress = data compression (Y or N)
- segsize = segment size
- devtype = device type (for example, 3390)
- alocunit = allocation unit (C or T)
- type = type of table space (G)
- rpp = rows per page
- dssize = maximum size of a data set in kilobytes
- card = number of rows in table
| SERESULT = TS parts pages space trks cyls extents dsns pages2 space2 trks2 cyls2 extents2 dsns2 card card2; where: - TS = the literal ‘TS’
- parts = total number of partitions
- pages = total pages per partition 3
- space = KBs per partition 3
- trks = tracks per partition 3
- cyls = cylinders per partition 3
- extents = extents per partition 3
- dsns = data sets per partition 3
- pages2 = pages in the last partition
- space2 = KBs in the last partition
- trks2 = tracks in the last partition
- cyls2 = cylinders in the last partition
- extents2 = extents in the last partition
- dsns2 = data sets in the last partition
- card = rows per partition 3
- card2 = rows in the last partition
|
IP index Definition: Estimates the reorganized space for an index | rc = ASURXSE('IP' db2ver card rpk pqty sqty parts avgkeylength nlavgkeylen pctfree freepage piecesize uniquerule indextype compress devtype allocunit typets pgsize); where - IP = the literal ‘IP’
- db2ver = Db2 version
- card = number of rows in table
- rpk = rows per key
- pqty = primary quantity in allocation units
- sqty = secondary quantity in allocation units
- parts = number of partitions
- avgkeylength = average length of key
- nlavgkeylen = average length for nonleaf page key
- subpages = number of subpages
- pctfree = percentage of free space
- freepage = free pages
- piecesize = file size for ix
- uniquerule = unique rule
- indextype = index type (2)
- compress = data compression (Y or N)
- devtype = device type (for example, 3390)
- allocunit = allocation unit (C or T)
- typets = type of table space (G, R, L, 1 (1 indicates blank or not specified))
- pgsize = size of eaf pages in the index (4, 8, 16, or 32)
Important If you omit the typets and pgsize parameters, the product assumes that the type is a nonlarge table space and the page size is 4. Specifying 1 for the typets parameter is the equivalent of specifying a blank in the online interface. | SERESULT = IP pages space trks cyls nlevels extents dsns; where: - IP = the literal ‘IP’
- pages = number of pages in the index
- space = space in KB
- trks = space in tracks
- cyls = space in cylinders
- nlevels = number of levels for the index
- extents = number of extents
- dsns = number of data sets
|
1 If you omit the type and segsize parameters, the product assumes the type is a simple table and the segment size is 0. Specifying 1 for the type parameter is the equivalent of specifying a blank in the online interface.
2 You must specify a non-zero value for the segsize parameter if you set the type parameter to R. If the type parameter is R and you specify a 0 value for segsize or omit the segsize parameter, DASD MANAGER PLUS sets the default segment size to 4.
3 Excluding the last partition.
ASURXSE produces the return codes that the following table displays:
ASURXSE return codes
| |
---|
| |
| Error obtaining a REXX variable |
| Argument error (too many, too few, invalid value) |
| Error loading module IRXEXCOM |