Op Code (Hex) | Operand 1 | Operand 2 | Operand 3 | |
---|---|---|---|---|
0543 | Relative invocation number | Search range | Search criterion template |
Operand 2: Character(48) scalar or null.
Operand 3: Space pointer.
Bound program access |
---|
|
Note |
---|
It is recommended that you use search options 8, 9 and 10 for 8-byte invocation, activation and activation group marks, respectively, rather than search options 4, 5 and 6. 4-byte marks can wrap and produce unexpected results. |
The invocations identified by operand 2 are searched in the order specified by operand 2 until an invocation is found which satisfies the search criterion specified in the operand 3 template. The identity of the first invocation (in search order) to satisfy the search criterion is returned in operand 1. If no invocation in the specified range satisfies the search criterion, then either an exception is signaled, or a value of zero is returned in operand 1, depending on the modifiers specified in the operand 3 template.
Operand 1 is returned as a signed binary(4) value identifying the first invocation found that satisfies the specified search criterion. It is specified relative to the starting invocation identified by operand 2. A positive number indicates a displacement in the direction of newer invocations, while a negative number indicates a displacement in the direction of older invocations. A zero value can either indicate that no invocation in the specified range matched the specified criterion, or the starting invocation satisfied the specified criterion, depending on the modifiers specified in the operand 3 template. Operand 1 is not modified in the event that the instruction terminates with an exception.
Note that a modifier in the operand 3 template determines if the starting invocation identified by operand 2 is to be skipped. If the starting invocation is specified to be skipped during the search then a result of zero in operand 1 indicates failure to find an invocation that satisfies the criterion. If the starting invocation is specified not to be skipped, then a result of zero indicates the starting invocation has satisfied the specified criterion. If the starting invocation is specified not to be skipped and no invocation is found that satisfies the search criterion, an exception will be signaled.
Operand 2 identifies the starting invocation and the range of the search. If operand 2 is specified as a null operand, then operand 2 is assumed to identify a range starting with the current invocation and proceeding through all existing older invocations.
Operand 3 is a space pointer to a template that identifies the search criterion and search modifiers for the find operation.
The value specified by operand 2 identifies the range of invocations to be searched. This operand can be null (which indicates the range which starts with the current invocation and proceeds through all existing older invocations), or it can contain either an invocation pointer to an invocation or a null pointer (which indicates a range starting with the current invocation).
Operand 2 has the following format:
Offset | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Dec | Hex |
| Field Name |
| Data Type and Length | ||||||||
0 | 0 |
| Starting invocation offset |
| Bin(4) | ||||||||
4 | 4 |
| Originating invocation offset (ignored) |
| Bin(4) | ||||||||
8 | 8 |
| Invocation range |
| Bin(4) | ||||||||
12 | C |
| Reserved (binary 0) |
| Char(4) | ||||||||
16 | 10 |
| Starting invocation pointer |
| Invocation pointer | ||||||||
32 | 20 |
| Reserved (binary 0) |
| Char(16) | ||||||||
48 | 30 |
| --- End --- |
|
|
If a non-null pointer is specified for starting invocation pointer, then operand 2 must be 16-byte aligned in the space.
Requesting invocation | The invocation executing the FNDRINVN instruction. Note that, in many cases, this invocation belongs to a system or language run-time procedure/program, and the instruction is actually being executed on behalf of another procedure or program. |
Starting invocation | The invocation which serves as the starting point for the search. |
If the starting invocation pointer is valid or null, but the invocation identified by this offset does not exist in the stack, an invocation offset outside range of current stack (hex 2C1A) exception will be signaled.
Note that the bypass starting invocation modifier in operand 3 affects how the starting invocation is treated. If this modifier is binary 0, then the starting invocation is the first invocation examined. If invocation range is zero in this case then only the starting invocation is examined. If, on the other hand, bypass starting invocation is binary 1, then the starting invocation does not participate in the search, and, if invocation range is zero, no invocations are searched and a value of zero is returned for operand 1.
If the pointer identifies an invocation in another thread, a process object access invalid (hex 2C11) exception will be signaled. If the invocation identified by this pointer does not exist in the stack, an object destroyed (hex 2202) exception will be signaled.
Usage note: | In cases where starting invocation pointer is null, operand 2 may be a constant. |
The search criterion template identified by operand 3
must be aligned on a 16-byte boundary. The template is a 32-byte value
with the following format:
Offset | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Dec | Hex |
| Field Name |
| Data Type and Length | ||||||||||||
0 | 0 |
| Reserved (binary 0) |
| Char(8) | ||||||||||||
8 | 8 |
| Search option |
| Bin(4) | ||||||||||||
12 | C |
| Search modifiers |
| Char(4) | ||||||||||||
12 | C |
| Bypass starting invocation |
| Bit 0 | ||||||||||||
|
|
|
| ||||||||||||||
12 | C |
| Compare for mismatch |
| Bit 1 | ||||||||||||
|
|
|
| ||||||||||||||
12 | C |
| Reserved (binary 0) |
| Bits 2-31 | ||||||||||||
16 | 10 |
| Search argument |
| Char(16) | ||||||||||||
32 | 20 |
| --- End --- |
|
|
1 | Routine type. Search argument is a one-byte routine type, left aligned. Allowed search argument values are:
| ||||||||||||||||||||||||||||
2 | Invocation type. Search argument is a one-byte invocation type, left aligned. Allowed search argument values are:
| ||||||||||||||||||||||||||||
3 | Invocation status. Search argument consists of two four-byte fields, left aligned. The invocation status of each examined invocation is ANDed with the first field and then compared to the second field. | ||||||||||||||||||||||||||||
4 | Invocation mark. Search argument is a four-byte invocation mark, left aligned. If the search is in the direction of older invocations, the result identifies the first invocation found with an invocation mark less than or equal to the search argument. If the search is in the direction of newer invocations, the result identifies the first invocation found with an invocation mark greater than or equal to the search argument. If invocation range is zero, then the search is satisfied only if the invocation mark of the starting invocation exactly matches the search argument, and this can occur only if bypass starting invocation is binary 0. For this option compare for mismatch is ignored. | ||||||||||||||||||||||||||||
5 | Activation mark. Search argument is a four-byte activation mark, left aligned. The activation mark of the program or module activation corresponding to each examined invocation is compared to search argument. Invocations with no activation (ie, the invocations of non-bound reentrant programs, and the invocation stack base entry) are considered to have an activation mark of binary 0. | ||||||||||||||||||||||||||||
6 | Activation group mark. Search argument is a four-byte activation group mark, left aligned. The activation group mark of each examined invocation is compared to search argument. The activation group mark of each examined invocation is determined from the activation associated with the invocation. (Each activation belongs to a single activation group.) However,
| ||||||||||||||||||||||||||||
7 | Program pointer. Search argument is a system pointer to a program. The program corresponding to each examined invocation is compared to the program identified by the pointer. | ||||||||||||||||||||||||||||
8 | Invocation mark. Search argument is an eight-byte invocation mark, left aligned. If the search is in the direction of older invocations, the result identifies the first invocation found with an invocation mark less than or equal to the search argument. If the search is in the direction of newer invocations, the result identifies the first invocation found with an invocation mark greater than or equal to the search argument. If invocation range is zero, then the search is satisfied only if the invocation mark of the starting invocation exactly matches the search argument, and this can occur only if bypass starting invocation is binary 0. For this option compare for mismatch is ignored. | ||||||||||||||||||||||||||||
9 | Activation mark. Search argument is an eight-byte activation mark, left aligned. The activation mark of the program or module activation corresponding to each examined invocation is compared to search argument. Invocations with no activation (ie, the invocations of non-bound reentrant programs, and the invocation stack base entry) are considered to have an activation mark of binary 0. | ||||||||||||||||||||||||||||
10 | Activation group mark. Search argument is an eight-byte activation group mark, left aligned. The activation group mark of each examined invocation is compared to search argument. The activation group mark of each examined invocation is determined from the activation associated with the invocation. (Each activation belongs to a single activation group.) However,
|
If bypass starting invocation is binary 1, then the starting invocation specified by operand 2 is skipped, and a failure to satisfy the search criterion is indicated by returning a binary 0 value in operand 1.
06 Addressing
08 Argument/Parameter
10 Damage Encountered
16 Exception Management
1C Machine-Dependent
1E Machine Observation
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