Table of Contents

DMKVDD Abstract

Statistics

Type ASSEMBLE
Source Lines : 1,280
Fixes Applied : 11
Most Recent Version : Thursday, December 7, 1978
Last Fix ID : [HRC039DK]

Synopsis

Module

       DMKVDD

Function

       DMKVDDDE - 'DETACH' A VIRTUAL OR REAL DEVICE.

Attributes

       REENTRANT, PAGEABLE, CALLED VIA SVC

Operation

       1.  DMKVDCSC IS CALLED TO PERFORM SYNTAX CHECKING
       ON THE COMMAND LINE; DMKVDCSC WILL CALL DMKCFCSC TO
       DETERMINE IF THE FIRST OPERAND ON THE COMMAND IS A RANGE
       OF DEVICE ADDRESSES.  REGARDLESS OF WHETHER A RANGE OR A
       SINGLE ADDRESS OR MULTIPLE ADDRESSES ARE SPECIFIED ON THE
       COMMAND LINE, DMKSCNFD AND DMKCVTHB ARE USED TO OBTAIN AND
       CONVERT FROM HEX TO BINARY THE DEVICE ADDRESSES.
       IF THE DEVICE ADDRESS IS MISSING OR INVALID, OR THE COMMAND
       FAILS TO PASS THE COMMAND SYNTAX CHECKING, AN ERROR CODE
       IS RETURNED TO THE CALLER (DMKVDD) AND DMKVDD ISSUES
       AN APPROPRIATE ERROR MESSAGE.

       2.  A CHECK IS MADE FOR THE ERROR CONDITIONS
       OF THE DEVICE BEING OFFLINE, SHARED, CP OWNED, OR NOT
       DEDICATED TO THE SPECIFIED USER (ERROR CODE AND MESSAGE
       RETURNED IF NOT). IF THESE CHECKS ARE OK, THEN THE
       APPROPRIATE VMBLOK AND VIRTUAL DEVICE ADDRESS ARE
       REFERENCED IN THE NEXT STEP.

       3.  THE VIRTUAL DEVICE ADDRESS IS CHECKED FOR VALIDITY, AND
       DMKSCNVU IS CALLED TO OBTAIN THE VCHBLOK, VCUBLOK, AND
       VDEVBLOK (ERROR CODE AND MESSAGE IF NOT FOUND).  IF OK, THEN
       THE DMKVDREL SUBROUTINE IS CALLED TO PERFORM THE NECESSARY
       INTERNAL FUNCTIONS TO RELEASE THE VIRTUAL DEVICE.

       4.  THEN THE VDEVADD ADDRESS IN VDEVBLOK IS SET TO X'FFFF' TO
       INDICATE THE DEVICE NO LONGER EXISTS, AND THE CORRESPONDING
       VCUDVTBL ENTRY IN THE VCUBLOK IS ALSO SET TO X'FFFF'.  IF ALL
       THE VIRTUAL DEVICES ON THIS CONTROL UNIT HAVE BEEN RELEASED,
       THEN THE VCUADD IN THE VCUBLOK, AND THE CORRESPONDING VCHCUTBL
       ENTRY IN THE VCHBLOK ARE ALSO SET TO X'FFFF'.  SIMILARLY
       (IF THIS WAS DONE), THEN IF ALL THE VIRTUAL CONTROL UNITS
       ON THE CHANNEL HAVE BEEN RELEASED, THEN THE VCHADD IN THE
       VCHBLOK AND THE CORRESPONDING VMCHTBL ENTRY IN THE VMBLOK
       ARE ALSO SET TO X'FFFF'.

       5.  WHEN DETACHING A DEDICATED DASD DEVICE, DMKVDD WILL
       CREATE AND STACK (DMKSTKIO) A DEVICE END INTERRUPT IOBLOK
       FOR DMKDSBRD TO READ THE VOLUME LABEL.  THIS WILL ENSURE
       THAT THE VOLUME SERIAL OF THE PACK THAT WAS ACTUALLY ON
       THE DRIVE WILL BE MOVED TO THE RDEVBLOK AND QUERY REQUESTS
       WILL REFLECT THE TRUE VOLUME SERIAL ON THE DRIVE.

       6.  IF A REAL DEVICE WAS DETACHED, MESSAGES ARE SENT TO THE
       CALLER, AND TO THE USER TO WHOM THE DEVICE BELONGED,
       INDICATING THAT THE DEVICE HAS BEEN DETACHED, AND RETURN IS
       MADE TO THE CALLER.

       7.  FOR A VIRTUAL DEVICE, THE CALLER (USER) IS SENT A MESSAGE
       THAT THE DEVICE HAS BEEN DETACHED, AND RETURN IS MADE TO HIM.

       8.  FOR THE "DETACH CHANNEL" COMMAND, THE COMMAND LINE IS
       SCANNED FOR PROPER FORMAT AND THAT THE USER HAS A HIGH
       ENOUGH COMMAND LEVAL CLASS TO ISSUE THE COMMAND. IF THE
       COMMAND LINE IS CORRECT A CALL IS MADE TO DMKVCHDC TO
       DO THE ACTUAL DETACHING.

       9.  ERROR MESSAGES WILL BE ISSUED FOR THOSE DEVICE ADDRESSES
       IN THE RANGE OR THOSE MULTIPLE ADDRESSES ON THE COMMAND LINE
       WHICH CANNOT BE DETACHED.  COMMAND PROCESSING WILL NOT
       TERMINATE WHEN ONE OF THE DEVICES CANNOT BE DETACHED.
       INSTEAD, SUCCESSFUL DETACH MESSAGES AND ERROR MESSAGES
       WILL BE ISSUED UNTIL ALL DEVICE ADDRESSES ON THE COMMAND
       LINE HAVE BEEN PROCESSED.

Calls to Other Routines

       DMKSCNFD
       DMKCVTHB
       DMKSCNRU
       DMKSCNVU
       DMKSCNRN
       DMKSCNVN
       DMKSCNAU
       DMKERMSG
       DMKVDREL
       DMKCVTBH
       DMKQCNWT
       DMKVCHDC
       DMKVDCSC
       DMKLOCKD
       DMKLOCKQ
       DMKCVTBD