Materialize Program Name (MATPGMNM)

Bound program access

Built-in number for MATPGMNM is 473. MATPGMNM ( receiver_template : address )

Description

This instruction will return the program and context names in operand 1 of the bound program, bound service program, or Java™ program associated with the currently executing procedure. Operand 1 must be aligned on a 16-byte boundary; otherwise a boundary alignment  (hex 0602) exception is signaled. The format of the receiver template is:

Offset
Dec Hex
Field Name
Data Type and Length
0 0
Materialization size specification
Char(8)
0 0
Number of bytes provided by the user
Bin(4)
4 4
Number of bytes available for materialization
Bin(4)
8 8
Format
Bin(4)



0 = Program in context format




12 C
Reserved
Char(4)
16 10
Formatted data
Char(*)
* *
--- End ---

The formatted data field is structured based on the value specified in the format field. For format = 0, the formatted data field has the following structure.

Offset
Dec Hex
Field Name
Data Type and Length
16 10
Bound program context object type
Char(1)
17 11
Bound program context object subtype
Char(1)
18 12
Context name
Char(30)
48 30
Bound program object type
Char(1)
49 31
Bound program object subtype
Char(1)
50 32
Program name
Char(30)
80 50
--- End ---

The first 4 bytes that are materialized 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 16 causes a materialization length invalid  (hex 3803) exception to be signaled.

The second 4 bytes that are materialized identify the total number of bytes available to be materialized. The instruction materializes as many bytes as can be contained in the area specified as the receiver. If the byte area identified by the receiver is greater than that required to contain the information requested, then the excess bytes are unchanged. No exceptions (other than the materialization length and boundary alignment exceptions described previously) are signaled in the event that the receiver contains insufficient area for the materialization. For format 0, if any field cannot be completely materialized, blanks will be returned in the partial field.

If the program is logically destroyed before this instruction is executed, the context name will be returned as all blank characters, and the context object type and context object subtype fields will be returned as zeroes.

Authorization Required

Lock Enforcement

Exceptions

06 Addressing

08 Argument/Parameter

10 Damage Encountered

1C Machine-Dependent

20 Machine Support

22 Object Access

24 Pointer Specification

2E Resource Control Limit

32 Scalar Specification

36 Space Management

38 Template Specification

44 Protection Violation