The IOSLOOK macro locates the unit control block (UCB) associated with a device number. To use IOSLOOK, you must be executing in supervisor state. Register 13 must point to a 16-word save area where the macro stores registers 0 through 15 at offset 0. You must also include a DSECT for both the CVT (using the CVT mapping macro) and the IOCOM (using the IECDIOCM mapping macro).
The IOSLOOK macro is written as follows:
Syntax | Description |
---|---|
name | name: Symbol. Begin name in column 1. |
␢ | One or more blanks must precede IOSLOOK. |
IOSLOOK | |
␢ | One or more blanks must follow IOSLOOK. |
DEV=(reg) | reg: Register (0) - (12), (14), (15). |
Default: DEV=(6). | |
,UCB=(reg) | reg: Register (0) - (12). |
Default: UCB=(7). | |
The parameters are explained as follows:
When IOSLOOK macro returns control to your program, GPR 15 contains a return code.
Hexadecimal Return Code | Meaning |
---|---|
00 | Meaning: UCB address was found. |
04 | Meaning: Device number was invalid or no UCB exists. |
IOSLOOK DEV=(2),UCB=(UCBPTR)