DISKID

Purpose

Use the DISKID function to obtain information on the physical organization of a reserved minidisk. The DISKID function obtains the virtual device number, the block size, and the offset of the minidisk.

A disk does not have to be accessed when you use the DISKID function.

You need this information to use the CP DASD Block I/O System Service with a CMS formatted minidisk that was reserved.

You can use CMSCALL with the following parameter list to execute DISKID from an assembler language program:
PLIST    DS  0D
         DC  CL8'DISKID'
         DC  CL8'ddname'    ddname for the minidisk
         DS  XL2            Virtual device number
         DS  H              Blocksize
         DS  F              Offset
         DS  D              Reserved

Usage Notes

  1. The parameter list must begin on a doubleword boundary.
  2. The program calling the DISKID function fills the first two doublewords of the parameter list.
  3. The second doubleword contains the ddname specified in the FILEDEF command issued for the Block I/O disk.
  4. The third doubleword is filled upon completion of the DISKID function. It contains:
    • The virtual device number of the minidisk for which a ddname exists
    • The block size of the minidisk
    • The offset of the minidisk. This offset associates a physical block number to the first data block of the unique file on disk that was previously reserved. The block number represents the number of sequential blocks used on the disk by the CMS file system to implement its structure. Data block number one for the file is then physical block number one plus offset.

Return Codes

On return from DISKID, register 15 contains one of the following codes:
Code
Meaning
  0
Return information supplied in parameter list.
  4
The function was called from a terminal or EXEC.
 12
DASD not reserved with the RESERVE command.
 28
ddname not defined or ddname not given a file definition to DISK vdev.
100
Disk not attached.
1xx
An I/O error occurred reading the volume label; xx = the return code from CP DIAGNOSE code X'A8'.
2xx
An I/O error occurred reading the volume label; xx = the return code from CP DIAGNOSE code X'20'.