FILEDEF ddname DISK vaddr
This command associates the name of the virtual minidisk referred to in your pro­
gram, "ddname", to the virtual address of the minidisk, "vaddr". The "ddname" is
input to the DISKID function.
The DISKID function obtains the necessary information on the physical organiza­
tion of the RESERVEd mini disk that will be used by the DASD Block I/O Service.
The DISKID function obtains the virtual address, the block size, and the offset of
this minidisk. (In the above example, the block size is 1024 bytes and the offset is
8.)
Before using the DASD Block I/O System Service, you must initialize your virtual
machine for IUCV communications. IUCV enables a program running in your vir­
tual machine to communicate with DASD Block I/O. Use the IUCV DECLARE
BUFFER function or the CMS HNDIUCV SET macro to initialize your virtual
machine for IUCV communications. You should use the CMS IUCV support since
this support allows other programs running in the virtual machine to use IUCV.
To establish a path between your virtual machine and the DASD Block I/O System Service, your program must issue either the IUCV CONNECT function or the CMSIUCV CONNECT macro. The USERID parameter on the IUCV CON­
NECT macro must be "*BLOCKIO" and the PRMDATA parameter must be "YES". PRMDATA=YES indicates, in this case, that the your program will
receive messages in its parameter list. Information about the minidisk returned by
the DISKID function -the virtual address, blocksize, and offset -must be moved
into the IPUSER field of the IUCV CONNECT parameter list.
If all the parameters required by DASD Block I/O are valid, DASD Block I/O
issues the IUCV ACCEPT function with the PRI\1DAT A= YES parameter speci­
fied. In this case, PRMDAT A= YES indicates that the DASD Block I/O System Service will receive messages in its parameter list. If invalid parameters are passed
from the CONNECT to DASD Block I/O, DASD Block I/O issues an IUCV SEVER on the path.
If DASD Block I/O issued an IUCV ACCEPT, your virtual machine receives an IUCV Connection Complete external interrupt. The IPUSER field of the Con­
nection Complete external interrupt buffer contains the starting and ending block
numbers allowable on the DASD Block I/O requests, and contains flags describing
the status of the virtual device. The starting block number (START BLOCK) is 1
minus the offset. The ending block number (END BLOCK) is the total number of
available blocks minus the offset. Since DASD Block I/O bypasses the CMS file system, START BLOCK can con­
tain a negative value (1 - OFFSET) and these blocks can be used by DASD Block
I/O. In the example above, START BLOCK would be -7 (1 -8) and END
BLOCK would be 201 (209 - 8). The range -7 to 201 equals 209 - the number of
available blocks on the device. Data block 1 is actually physical block 9, data block
2 is actually physical block 10, ... , and the last block (data block 201) is actually
physical block 209. Programs using DASD Block I/O should only write data
blocks; therefore, a block number less than 1 should never be written. This would
destroy a block that was used to implement the CMS file structure. Using the DASD Block I/O System Service from eMS 353
You can now start sending I/O requests to DASD Block I/O by issuing the IUCV SEND function. You must specify the block number, virtual buffer address, and
type of request desired in the IUCV SEND parameter list. Blocks are read or writ­
ten randomly as requested.
If no error occurred in the IUCV SEND, DASD Block I/O issues an IUCV REPLY to return the results of the I/O requests. If an error occurred in the IUCV SEND, DASD Block I/O issues an IUCV SEVER.
When you want to terminate communications with the DASD Block I/O System
Service, issue the IUCV SEVER function, CMS CMSIUCV SEVER macro, IUCV RETRIEVE BUFFER function, or CMS HNDIUCV CLR macro.
(For a further description of the DASD Block I/O System Service, see "DASD Block I/O System Service".) 354 VM/SP System Programmer's Guide
Previous Page Next Page