{
{   This request provides a scheduling and operator negotiation service to a
{ program which requires direct access to a storage device and its data
{ storage medium without the use of NOS/VE file system interfaces.
{
{   The function of this request is twofold:
{
{        1.  The "attachment" (or assignment) of a storage device to the job
{            by the operator.
{
{        2.  The mounting of a storage medium, e.g.  tape reel or mass storage
{            pack, on the indicated storage device.
{
{   The system performs no validation of the medium mounted by the operator.
{ The assumption of the system is that the medium is not identifiable to the
{ system; therefore, the onus falls upon the caller of this interface to
{ ensure that the correct medium has been mounted.
{
{   While this request is awaiting the operator to mount the medium, an
{ interactive user will be able to see in his/her job status that such an
{ operator action is outstanding and will be able to do a "user break" to
{ terminate or pause from this request.
{
{   If the system should be interrupted after the medium has been mounted, the
{ caller must repeat this request to ensure the medium is still mounted on the
{ correct storage device after the interrupt.
{
{   The request will be accepted if the element has been:
{
{        1.  Reserved to the job making this request (see
{            cmp$reserve_element).
{
{        or..
{
{        2.  The object of an msp$request_maintenance_access request by the
{            job making this request.
{
{            a.  If the storage device is scheduled for CONCURRENT maintenance
{                access and this request was issued with "no wait", then this
{                request will terminate with abnormal status if another job
{                has the storage device assigned.
{
{            b.  If the storage device is a mass storage device which is
{                requested for CONCURRENT maintenance access, then this
{                request will be rejected.
{
{            c.  If the storage device is a magnetic tape device which is
{                requested for CONCURRENT maintenance access, the storage
{                device must be in the DOWN state.
{
{            d.  If the storage device is scheduled for either CONCURRENT or
{                DEDICATED maintenance access and the requesting job already
{                has the storage device assigned, this request will be
{                rejected.
{
{
{   and ..
{
{        3.  The operator agrees to mount the indicated media.
{
{   Either a CMP$RELEASE_ELEMENT or MSP$RELEASE_MAINTENANCE_ACCESS request
{ will terminate the assignment of the storage device to the job.  However,
{ physically unloading the medium from the storage device is the province of
{ the program or the operator.
{
{       CMP$MOUNT_STORAGE_MEDIUM (STORAGE_DEVICE, MEDIUM, WRITE_ACCESS,
{         WAIT_FOR_ATTACHMENT, STATUS)
{
{ STORAGE_DEVICE: (input)  This parameter specifies the identity of the
{       storage device on which the media is to be mounted.
{
{ MEDIUM: (input)  This parameter specifies the identity of the medium which
{       is to be mounted.
{
{ WRITE_ACCESS: (input)  This parameter specifies whether the access to the
{       medium will include write access or not.  If not, the operator will be
{       asked to mount tape media without a write ring and to set the the
{       'write disable' switch, if present, on mass storage media.
{
{ WAIT_FOR_ATTACHMENT: (input)  This parameter specifies whether or not the
{       task should wait for availability of the storage device on which the
{       medium will be mounted.  If the storage device is undergoing
{       CONCURRENT maintenance access, some other job may have the storage
{       device assigned to it.  This parameter has effect only in the
{       "attachment" of the storage device to the job; once the attachment
{       process completes, the wait for the operator to mount the medium is
{       indefinite.
{
{ STATUS: (output) This parameter specifies the request status.
{
{         CONDITIONS:
{                     cme$element_not_reserved,
{                     cme$lcm_device_attached_to_job,
{                     cme$lcm_device_busy,
{                     cme$lcm_element_not_found,
{                     cme$lcm_empty_pa_set,
{                     cme$lcm_missing_pa_set_member,
{                     cme$lcm_not_available,
{                     cme$lcm_ring_validation_error,
{                     cme$mount_media_denied,
{                     cme$privileged_job_required.
{
{         IDENTIFIER : 'CM'
{
{
