The caller can obtain a copy of the UCB by using the UCBSCAN macro. See z/OS MVS Programming: Assembler Services Guide for information about accessing UCBs.
If you are coding an authorized program that must pin the UCB, see z/OS MVS Programming: Authorized Assembler Services Guide for information about accessing UCBs.
The requirements for the caller are:
Environmental factor | Requirement |
---|---|
Minimum authorization: | Problem state and any PSW key |
Dispatchable unit mode: | Task or SRB |
Cross memory mode: | Any PASN, any HASN, any SASN. |
AMODE: | 24- or 31-bit |
ASC mode: | Primary |
Interrupt status: | Enabled or disabled for I/O and external interrupts |
Locks: | No locks held |
Control parameters: | No requirement |
If you do not specify the UCBPTR parameter, you must include the IEFUCBOB mapping macro and establish addressability to the UCB common segment through a USING statement.
The caller of UCBDEVN cannot pass a copy of a UCB for a nonbase exposure of a multiple-exposure device.
When issuing UCBDEVN, the caller cannot pass a copy of an alias UCB of a parallel access volume.
UCBDEVN accepts above 16 megabyte UCBs, below 16 megabyte UCBs, and captured UCBs as input. To specify an above 16 megabyte UCB, the caller must run in AMODE 31. If the caller runs in AMODE 31 and passes a 24-bit UCB pointer, the pointer must have a clean high order byte.
Before issuing the UCBDEVN macro, the caller must ensure that GPR 13 contains the address of an 18-word save area.
Some callers depend on register contents remaining the same before and after issuing a service. If the system changes the contents of registers on which the caller depends, the caller must save them before issuing the service, and restore them after the system returns control.
None.
The UCBDEVN macro is written as follows:
Syntax | Description |
---|---|
name | name: Symbol. Begin name in column 1. |
␣ | One or more blanks must precede UCBDEVN. |
UCBDEVN | |
␣ | One or more blanks must follow UCBDEVN. |
DEVN=devnumber | devnumber: RS-type address. |
XDEVN=xdevn | xdevn: Mutually exclusive with the DEVN keyword. |
,UCBPTR=ucbptr | ucbptr: RX-type address. Note: If
you omit this parameter, the system assumes that you have established
addressability to the UCB common segment.
|
,NONBASE=NO | Default: NO |
,NONBASE=YES | |
The parameters are explained as follows:
XDEVN is mutually exclusive with the DEVN keyword.
If the UCB common segment is for a multiple exposure device, the system returns printable EBCDIC for the base exposure device number.
UCBDEVN does not return any return codes.
UCBDEVN DEVN=WORD1,UCBPTR=UCBVAL