gtpd1m2qDatabase Reference

Determining Where Collections Are Stored on DASD

Using commands, you can display information about collections and determine where different components of a collection reside on DASD.

Locating the Collection Control Record

The control record (like all of the other records TPFCS uses to represent a given collection) is a pool record. As mentioned previously, the PID contains the file address of the prime control record and, if the collection is shadowed, it contains the file address of the shadow control record too. See the definitions for the OIDnumber class hierarchy in the TPF source code to determine the location of the file addresses in the PID.

Listing Collection Parts

Enter the ZBROW COLLECTION command with the PARTS parameter specified to display a summary of the part objects that comprise a specified collection and which are located in its logical control record. For example, you can analyze an array collection as follows:

ZBROW COLLECTION PARTS ARRAYCOL
BROW0602I 14.21.50 BROWSER QUALIFIED FOR DSNAME TO2SVTDS
BROW0403I 14.21.50 COLLECTION PARTS DISPLAY
 PART    NAME
    0    OIDentry
    1    ARRAY
    2    DASDFLATPool
    3    DDEF_OBJ_DASD
END OF DISPLAY
BROW0410I 14.21.50 BROWSE OF COLLECTION COMPLETED

Similarly, a collection that consists of multiple structures such as represented in Figure 31 might be represented as follows:

ZBROW COLLECTION PARTS KEYEDLOGCOL
BROW0602I 14.41.26 BROWSER QUALIFIED FOR DSNAME TO2SVTDS
BROW0403I 14.41.26 COLLECTION PARTS DISPLAY
 PART    NAME
    0    OIDentry
    1    KeyedLog
    2    DASDFLATPool
    3    DDEF_OBJ_DASD
    4    KeySet
    5    MemKey
    6    DDEF_OBJ_DASD
END OF DISPLAY
BROW0410I 14.41.26 BROWSE OF COLLECTION COMPLETED

Displaying Collection Part Contents

You can display the contents of these object parts, otherwise known as their attribute values, by using the ZBROW COLLECTION command with the ATTRIBUTES parameter specified for a given collection. This display lists the object parts that are used to represent the specified collection and many of the attributes of the parts, including attributes that those objects inherit from higher classes. 6 The data and control information for the collection are stored differently for each class of object and can require several screens to be fully displayed.

The collection attributes display, which results from the ZBROW COLLECTION command with the ATTRIBUTES parameter specified, has the following format. The header of this display includes the collection type (collection class name) for the specified collection. Each collection part follows, with the name of the part displayed. This is the same list of parts that would result from the ZBROW COLLECTION command with the PARTS parameter specified. Remember that each collection part is an object. In each part display, the class hierarchy for the object's class is shown, with the name of each class displayed, starting with the root class (OBJECT). These are the same classes that would be displayed using the ZBROW CLASS command with the TREE parameter specified. In each class display, there is a list of the attributes for that class and a list of the attribute values for that object.

Figure 55 shows the format for the collection attributes display. The figure shows the layout for one part. An actual display could contain any number of collection part objects, each of which inheriting from any number of higher object classes.

Figure 55. Collection Attributes Display Format

ZBROW COLLECTION ATTRIBUTE collection_name (1)
BROW0406I 15.03.08 COLLECTION ATTRIBUTES DISPLAY
ATTRIBUTE                           VALUE
COLLECTION CLASS NAME - collection_type (2)
  PART  NAME  **********            PartA (3)
CLASS NAME  **                      OBJECT (4)
OBJECT_ID                           PartA ID
OBJECT_LGH                          PartA length
OBJECT_SEQ_CTR                      PartA sequence counter
CLASS NAME  **                      ObjectPart

·
·
·
(collection_name attributes inherited from class ObjectPart)
·
·
·
CLASS NAME ** ObjectA1
·
·
·
(collection_name attributes inherited from class ObjectA1)
·
·
·
CLASS NAME ** ObjectA2
·
·
·
(collection_name attributes inherited from class ObjectA2)
·
·
·

·
·
·
CLASS NAME ** PartA (5)
·
·
·
(collection_name attributes inherited from parent class) PART NAME ********** PartB (6)
·
·
·
END OF DISPLAY BROW0410I 15.04.12 BROWSE OF COLLECTION COMPLETED

In our example, collection_name (1) is the name assigned to the collection. collection_type (2) is one of the collection types supported by TPFCS, such as ARRAY. Object part PartA (3) is the first part that is shown. The class hierarchy for this object begins with OBJECT (4) , which is the root class, and continues an inheritance hierarchy of ObjectA1, ObjectA2, and so on until the leaf class, PartA (5) itself, is reached. Notice that as discussed previously, every collection part object eventually inherits from the OBJECT class. The attributes of the OBJECT class consist solely of the TPFCS object header.

The attributes for each of these object classes are included in the display although they are not shown in this figure. After the PartA display, the beginning of the PartB (6) display is shown. Remember that PartB and PartA are not related in terms of inheritance, but are aggregate parts of collection_name. This display would continue in a similar way until all parts that comprise collection_name are included in the display.

Note:
Data, key, and directory records are not part objects and are therefore not displayed by using the ZBROW COLLECTION command.

The following is an example of an actual display and is labeled with the same numbers as described in the previous example.

Figure 56. Actual Collection Attributes Display

ZBROW COLLECTION ATTRIBUTES ARRAYCOL (1)
BROW0602I 09.43.28 BROWSER QUALIFIED FOR DSNAME TO2SVTDS
BROW0406I 09.43.29 COLLECTION ATTRIBUTES DISPLAY
ATTRIBUTE                           VALUE
COLLECTION CLASS NAME - ARRAY (2)
  PART  NAME  **********            OIDentry (3)
CLASS NAME  **                      OBJECT (4)
OBJECT_ID                           00000034
OBJECT_LGH                          0000028A
OBJECT_SEQ_CTR                      000000C8
CLASS NAME  **                      ObjectPart
OBJ_Part_CHANGE                     00
OBJ_Part_RESERVE2                   000000
OBJ_Part_PartID                     00000000
OBJ_Part_OIE                        00611748
CLASS NAME  **                      OIDentry (5)
OIDentry_OID                        0200FC16 B06BF4DD E3D6F2E2 E5E3C4E2
****                                1800C28B 00000000 00000000 00000000

·
·
·
PART NAME ********** ARRAY (6) CLASS NAME ** OBJECT OBJECT_ID 0000000C OBJECT_LGH 00000068 OBJECT_SEQ_CTR 00000000 CLASS NAME ** ObjectPart OBJ_Part_CHANGE 00 OBJ_Part_RESERVE2 000000 OBJ_Part_PartID 00FE0001 OBJ_Part_OIE 006071F8 CLASS NAME ** Collect Collect_I_Struct_PartID 00FE0002 Collect_I_Struct_PTR 0060DBA8 Collect_I_Cursor 00000000 Collect_I_DDEF_PartID 00FE0003 Collect_I_DDEF_PTR 00603BE0 CLASS NAME ** ARRAY ARRAY_I_NEXTINDEX 201 ARRAY_I_MAXINDEX -1
·
·
·
PART NAME ********** DASDFLATPool
·
·
·
PART NAME ********** ObjectAccess
·
·
·
PART NAME ********** DDEF_OBJ_DASD
·
·
·
DDEF_FORCE 00 END OF DISPLAY BROW0410I 09.48.54 BROWSE OF COLLECTION COMPLETED

Not every attribute for these objects has been listed. You can determine what exact attributes each of these objects has, as well as the displacement and length of each attribute, by scanning the TPFCS source code for the CLASSC macro definition of each object.

See TPF Operations for more information and additional examples.

Determining Collection Residency

You can determine whether a collection is compact resident or extended resident by entering the ZBROW DISPLAY command with the COLLECTION parameter specified and examining the RESIDENCY TYPE field.

You can also determine the collection residency by displaying the parts of the collection. By examining the structure collection part for a collection, you can determine whether a collection is compact or extended as described in Locating the Structure Object.

Locating the Structure Object

One of the collection parts in a collection attributes display is the structure object used to represent the collection. (For extended-resident collections, there are also other objects that are located in pool file records chained to the structure object.) You can locate the file address of the structure object by using the ZBROW COLLECTION command with the ATTRIBUTES parameter specified to display the structure object attributes. You can find the file address of the pool record containing the structure object, otherwise known as the structure record, as follows:

As part of the response you receive from the ZBROW COLLECTION command with the ATTRIBUTES parameter specified, you will find either a CLASS NAME of StructureMem if the collection has a compact structure or a CLASS NAME of StructureDasd if the collection has an extended structure. As mentioned previously, all compact structures currently inherit from the StructureMem object class, whereas all extended structures currently inherit from the StructureDasd object class.

Locating the Data

The way that TPFCS stores the data for a collection on DASD depends on the structure object. As mentioned previously, for compact-resident collections, the data elements of the collection are stored in the structure object itself. 7 For extended-resident collections, the structure object is more complex and contains pointers to tree structures in the TPF database. The records that comprise these tree structures contain the data elements as well as control information for extended-resident collections.


Footnotes:

6
Not every attribute of an object is displayed by this command. Which attributes are displayed, as well as the order in which they are displayed, does not correspond to the order in which they will be seen when displaying the record where that object has been filed. The attributes displayed and their order is determined by the presence and order of the PRINTATTRIBUTE macros for the definition of the class of the object in the TPFCS source code. Look at the order in which the instance attributes are defined in the TPFCS source code to determine their order in a file record.

7
The structure object itself might not fit in a TPF 4-K record and, therefore, overflow into one or more additional records as we have discussed previously. If the structure object contains data, the data can be located in each of these records.