Materialize Context (MATCTX)


Op Code (Hex) Operand 1 Operand 2 Operand 3
0133 Receiver Context Materialization options

Operand 1: Space pointer.

Operand 2: System pointer or null.

Operand 3: Character scalar.

Bound program access

Built-in number for MATCTX is 57. MATCTX ( receiver : address context : address of system pointer OR null operand materialization_options : address )

Description

Based on the contents of the materialization options specified by operand 3, the symbolic identification and/or system pointers to all, or a selected set, of the objects addressed by the context specified by operand 2 are materialized into the receiver specified by operand 1.

If operand 2 is a null operand and the machine context selection field is zero, then the machine context for the system ASP is materialized. If operand 2 is a null operand and the machine context selection field is one, then the independent ASP machine context for the independent ASP number specified is materialized.

Usage note:

To get a list of every context on a system, first use the MATRMD instruction to retrieve a list of every independent ASP (and the system ASP) on the system, using selection option hex 1F. For every independent ASP in the list, the field independent ASP will be set to binary 1. For each independent ASP (and the system ASP), the ASP number will be materialized. Each of the machine contexts can then be materialized using the MATCTX instruction. For each call to this instruction, the independent ASP number should be set to one of the ASP number values materialized from MATRMD. The machine context selection field should be set to binary 1, the object ID selection field should be set to hex 1, and the type code should be set to hex 04.

The materialization options operand has the following format:

Offset
Dec Hex
Field Name
Data Type and Length
0 0
Materialization control
Char(2)
0 0
Information requirements (1 = materialize)
Char(1)
start of change0 0 Reserved (binary 0) Bits 0-2
0 0 Concurrency mode Bit 3end of change
0 0
Extended context attributes
Bit 4
0 0
Validation
Bit 5



0 = Validate system pointers
1 = No validation


0 0
System pointers
Bit 6
0 0
Symbolic identification
Bit 7
1 1
Selection criteria
Char(1)
1 1
Reserved (binary 0)
Bit 0
1 1
Materialize hidden contexts
Bit 1



0 = Do not materialize hidden contexts within the operand 2 context
1 = Materialize all contexts including hidden contexts within the operand 2 context


1 1
Machine context selection
Bit 2



0 = Materialize the system machine context.
1 = Materialize the independent ASP machine context specified by the independent ASP number field.


1 1
Modification date/time selection
Bit 3



0 = Do not select by modification date/time
1 = Select by modification date/time


1 1
Object ID selection
Bits 4-7



Hex 0 = All entries
Hex 1 = Type code selection
Hex 2 = Type code/subtype code selection
Hex 4 = Name selection
Hex 5 = Type code/name selection
Hex 6 = Type code/subtype code/name selection
Hex E = Context entries collating at and above the specified type code/subtype code/name selection


2 2
Length of name to be used for search argument
Bin(2)
4 4
Type code
Char(1)
5 5
Subtype code
Char(1)
6 6
Name
Char(30)
36 24
Timestamp
Char(8)
44 2C
Independent ASP number
Char(2)
46 2E
--- End ---

The materialization control information requirements field in the materialization options operand specifies the information to be materialized for each selected entry. Symbolic identification and system pointers identifying objects addressed by the context can be materialized based on the bit setting of this field.

If the information requirements field is binary 0, the context attributes are materialized with no context entries. In this case, the modification date/time selection and object ID selection fields are ignored.

If the information requirements field is set to just return the extended context attributes, the context attributes and extended attributes are materialized with no context entries. In this case, the modification date/time selection and object ID selection fields are ignored.

start of changeIf concurrency mode is set to binary 1, the instruction will periodically check for pending updates to the context. If a pending update is waiting, that update will be allowed to occur, and the materialize will continue after the update has finished. end of change

If the system pointers field is set to binary 1, then the system pointers to objects in the context are returned in the object pointer field. If the symbolic identification field is set to binary 1, then the information in the object identification field is materialized for objects in the context.

If the validation attribute indicates no validation is to be performed, no object validation occurs and a significant performance improvement results.

When validation start of change and/or concurrency mode is set to binary 1, end of change some of the following pointers may be erroneous:

If the materialize hidden contexts field is binary 1, then hidden contexts are materialized into the receiver (in addition to non-hidden contexts and other object types). A hidden context is denoted by the hidden attribute of a context. Since contexts can only be contained in a machine context, the materialize hidden contexts option is only useful when a machine context is being materialized. This option can only be specified when the thread is in system state. Otherwise a template value invalid  (hex 3801) exception will be signalled.

The materialization control modification date/time selection and object ID selection fields specify the context entries from which information is to be presented. The type code, subtype code, and name fields contain the selection criteria when a selective materialization is specified.

When type code or type/subtype codes are part of the selection criteria, only entries that have the specified codes are considered. When a name is specified as part of the selection criteria, the N characters in the search criteria are compared against the N characters of the context entry, where N is defined by the length of name to be used for search argument field in the materialization options. The remaining characters (if any) in the context entry are not used in the comparison.

If modification date/time selection is 0 and object ID selection is 0 and the number of bytes provided in the receiver does not allow for materialization of at least one context entry, requests that as much of the context attributes as will fit be materialized into the receiver and that an estimate of the byte size correlating to the full list of context entries currently in the context be set into the number of bytes available for materialization field of the receiver. This capability of requesting an estimate of the size of a full materialization of the context provides a low overhead way of getting a close approximation of the amount of space that will be needed for an actual materialize of all context entries. This approximation may be either high or low by a few entries due to abnormal system terminations.

If the number of bytes provided in the receiver allows for materialization of at least one context entry, the number of bytes available for materialization field is set with the byte size correlating to the full list of context entries that matched the selection criteria whether or not the receiver provided enough room for the full list to be materialized. If object ID selection has a value from hex 1 through hex 6, as many context entries as will fit which match the associated type code/subtype code/name criteria are materialized into the receiver. Object ID selection value hex E requests that as many context entries as will fit which collate at or higher (are equal to or greater) than the specified type code/subtype code/name criteria be materialized into the receiver.

When operand 2 is a null operand, the machine context selection field is used to select which machine context to materialize. If 0 is specified for the machine context selection field, the system machine context is materialized. If 1 is specified for the machine context selection field, the independent ASP machine context specified by the independent ASP number field is materialized. If the value specified for the independent ASP number is not valid then a template value invalid  (hex 3801) exception is signaled. If the associated independent ASP for the independent ASP number is not varied on, then a object not available  (hex 220B) exception is signaled. If operand 2 is not a null operand, then both the machine context selection field and the independent ASP number field must be zero else a template value invalid  (hex 3801) exception is signaled.

If modification date/time selection is specified, then entries are selected according to the time of last modification in addition to any object identification selection specified. The timestamp in the materialization control is used to determine which entries will be selected. Entries with modification timestamps greater than or equal to the timestamp specified in the control will be selected. Besides the additional selection done as above, the materialize will work the same as specified in the other controls.

Programming note

If the specified timestamp is for a date/time earlier than the date/time currently associated with the changed object list, all objects in the context will be inspected for their modification date. This may degrade system performance.

The format of the materialization (operand 1) is as follows:

Offset
Dec Hex
Field Name
Data Type and Length
0 0
Materialization size specification
Char(8)
0 0
Number of bytes provided for materialization
Bin(4)
4 4
Number of bytes available for materialization
Bin(4)
8 8
Context identification
Char(32)
8 8
Object type
Char(1)
9 9
Object subtype
Char(1)
10 A
Object name
Char(30)
40 28
Context options
Char(4)
40 28
Existence attributes
Bit 0



0 = Temporary
1 = Permanent


40 28
Space attribute
Bit 1



0 = Fixed-length
1 = Variable-length


40 28
Reserved (binary 0)
Bit 2
40 28
Access group
Bit 3



0 = Not a member of access group
1 = Member of access group


40 28
Reserved (binary 0)
Bits 4-31
44 2C
Recovery options
Char(4)
44 2C
Automatic damaged context rebuild option
Bit 0



0 = Do not rebuild at IMPL
1 = Rebuild at IMPL


44 2C
Reserved (binary 0)
Bits 1-31
48 30
Size of space
Bin(4)
52 34
Initial value of space
Char(1)
53 35
Performance class
Char(4)
53 35
Space alignment
Bit 0



0 = The space associated with the object is allocated to allow proper alignment of pointers at 16-byte alignments within the space.
1 = The space associated with the object is allocated to allow proper alignment of pointers at 16-byte alignments within the space as well as to allow proper alignment of input/output buffers at 512-byte alignments within the space.
Ignore the value of this field when the machine chooses space alignment field has a value of 1.


53 35
Reserved (binary 0)
Bits 1-2
53 35
Machine chooses space alignment
Bit 3



0 = The space alignment indicated by the space alignment field is in effect.
1 = The machine chose the space alignment most beneficial to performance, which may have reduced maximum space capacity. The alignment chosen is a multiple of 512. Ignore the value of the space alignment field.


53 35
Reserved (binary 0)
Bit 4
53 35
Main storage pool selection
Bit 5



0 = Process default main storage pool is used for object.
1 = Machine default main storage pool is used for object.


53 35
Reserved (binary 0)
Bit 6
53 35
Block transfer on implicit access state modification
Bit 7



0 = Transfer the minimum storage transfer size for this object.
1 = Transfer the machine default storage transfer size for this object.


53 35
Reserved (binary 0)
Bits 8-31
57 39
Reserved (binary 0)
Char(7)
64 40
Reserved (binary 0)
Char(16)
80 50
Access group
System pointer
96 60
Extended context attributes (if requested)
Char(1)
96 60
Changed object list
Bit 0



0 = A changed object list does not exist
1 = A changed object list does exist


96 60
Useable changed object list
Bit 1



0 = Changed object list is in a useable state
1 = Changed object list is not in a useable state


96 60
Protected
Bit 2



0 = The context is not protected from changes
1 = The context is protected from changes


96 60
Hidden
Bit 3



0 = The context is visible
1 = The context is hidden


96 60
Reserved (binary 0)
Bits 4-7
97 61
Reserved (binary 0)
Char(7)
104 68
Current timestamp
Char(8)
112 70
Context entry
[*] Char(16-48)



(repeated for each selected entry)


112 70
Object identification (if requested)
Char(32)
112 70
Type code
Char(1)
113 71
Subtype code
Char(1)
114 72
Name
Char(30)
144 90
Object pointer (if requested)
System pointer
* *
--- End ---

The first 4 bytes of the materialization output identify the total number of bytes provided for use by the instruction. This value is supplied as input to the instruction and is not modified by the instruction. A value of less than 8 causes the materialization length invalid  (hex 3803) exception to be signaled. The instruction materializes as many bytes and pointers as can be contained in the receiver. If the byte area identified by the receiver is greater than that required to contain the information requested for materialization, the excess bytes are unchanged. No exceptions are signaled in the event that the receiver contains insufficient area for the materialization, other than the materialization length invalid  (hex 3803) exception described above.

When the protected attribute is set to binary 1, any attempt to insert an entry into the context or to change an entry in the context signals a cannot change contents of protected context  (hex 4403) exception. Deleting an entry from the context will not cause this exception to be signaled. The hidden attribute determines whether or not this context is addressable. If a context is hidden, it affects the way the RSLVSP and MATCTX instructions behave. RSLVSP will not address hidden contexts. When MATCTX is used to materialize a machine context, hidden contexts in that machine context will only be materialized when the materialize hidden contexts option is set to binary 1.

The context entry object identification information, if requested by the materialization options field, is present for each entry in the context that satisfies the search criteria. If both system pointers and symbolic identification are requested by the materialization options field, the system pointer immediately follows the object identification for each entry.

The order of the materialization of a context is by object type code, object subtype code, and object name, all in ascending sequence.

Authorization Required

Lock Enforcement

Exceptions

06 Addressing

08 Argument/Parameter

0A Authorization

10 Damage Encountered

1A Lock State

1C Machine-Dependent

20 Machine Support

22 Object Access

24 Pointer Specification

2C Program Execution

2E Resource Control Limit

32 Scalar Specification

36 Space Management

38 Template Specification

44 Protection Violation