Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

systematically making a mounted tape R/O

29 views
Skip to first unread message

Tony Thigpen

unread,
Aug 13, 2021, 10:50:23 AM8/13/21
to
All,

I am working on a really different project that involves mounting tapes.
My current code tells the VTL to load the tape and my code verifies some
stuff in the headers.

Under some unique conditions, I need to make VSE think that the tape is
write-protected, even if the tape drive has not reported such.

Anybody got any magic code for such a thing?

Tony Thigpen

_______________________________________________
VSE-L mailing list
VS...@lists.lehigh.edu
https://lists.lehigh.edu/mailman/listinfo/vse-l

Chuck Arney

unread,
Aug 13, 2021, 11:15:31 AM8/13/21
to
I don't think it's VSE that you need to fool, it's the device that does the
R/W check and command rejects the operation if protected.

Chuck Arney
Arney Computer Systems
Web: http://zosdebug.com
Facebook: http://www.facebook.com/arneycomputer

-----Original Message-----
From: VSE-L <vse-l-bounces+chuck=arneycom...@lists.lehigh.edu> On
Behalf Of Tony Thigpen
Sent: Friday, August 13, 2021 9:50 AM
To: VSE Discussion List <vs...@lists.lehigh.edu>
Subject: systematically making a mounted tape R/O

All,

I am working on a really different project that involves mounting tapes.
My current code tells the VTL to load the tape and my code verifies some
stuff in the headers.

Under some unique conditions, I need to make VSE think that the tape is
write-protected, even if the tape drive has not reported such.

Anybody got any magic code for such a thing?


Martin Truebner

unread,
Aug 13, 2021, 11:35:19 AM8/13/21
to
Chuck et al,

>> it's the device that does the R/W check and
>> command rejects the operation if protected.

Correct- and if there is no way to do that ...

>> I don't think it's VSE that you need to fool,

... I am sure that you CAN fool VSE.


I am pretty sure that the pub-extension does have such a setting.

Who wants to bet?

--
Martin

Chuck Arney

unread,
Aug 13, 2021, 12:06:16 PM8/13/21
to
But my point is what good will it do to fool VSE into thinking the drive is
R/O? The device does the check not VSE. And any tape management system I
know does a sense during AVR to see if the drive is ready and also if it is
write protected. I don't think it asks VSE if it can write to the tape.

Chuck Arney
Arney Computer Systems
Web: http://zosdebug.com
Facebook: http://www.facebook.com/arneycomputer

-----Original Message-----
From: VSE-L <vse-l-bounces+chuck=arneycom...@lists.lehigh.edu> On

Martin Truebner

unread,
Aug 13, 2021, 12:59:49 PM8/13/21
to
Chuck,

>> And any tape management system I know
>> does a sense during AVR to see if the drive is ready and also if
>> it is write protected.

Right you are- and it also is ignored by JCL.

I did some quick checking- setting the bit for "tape read only"
does not effect the (JCL) MTC WTM at all.

K and M

unread,
Aug 13, 2021, 1:33:39 PM8/13/21
to
What you can do is catch any write request to the device and force
it to reject it. Under VM it could be a bit easier. It would be
a fun project. :)

Ken


snip..

Tony Thigpen

unread,
Aug 13, 2021, 2:03:17 PM8/13/21
to
VM already has a 'R/O' option for ATTACH.

Tony Thigpen

K and M wrote on 8/13/21 1:33 PM:

K and M

unread,
Aug 13, 2021, 2:47:21 PM8/13/21
to
That option can be a problem when a protected tape still needs to
check if the "tape" can be written on before it allows it to be used.
I remember that option could be a real pita at times.

Ken


> Sent: Friday, August 13, 2021 at 2:03 PM
> From: "Tony Thigpen" <to...@vse2pdf.com>
> To: vs...@lists.lehigh.edu
> Subject: Re: systematically making a mounted tape R/O
>
> VM already has a 'R/O' option for ATTACH.
>
> Tony Thigpen

Martin Truebner

unread,
Aug 13, 2021, 4:19:14 PM8/13/21
to
Ken,

>> ... catch any write request to the device

where / "which exit" would that be?

--
Martin

Chuck Arney

unread,
Aug 13, 2021, 4:33:57 PM8/13/21
to
Depending on how much work you are willing to do to gain this ability, I
believe there is an exit point in the Vendor Interface facility where you
can get a look at the channel program before the I/O is started. I don't
recall the name of the exit point or exactly what you can do to prevent the
I/O from being started, but I suspect you could do it with some work.

You would have to know in the exit code what device(s) you wanted to write
protect and your code would have to be able to follow a channel program
checking for write commands. That should not be too difficult since most
tape channel programs are not that complex.

Or, perhaps you could use the Vendor Interface exit that gets control after
an I/O is complete. If an I/O completes you could check the channel program
for sense commands and alter the data to indicate the tape is write
protected. That may stop some things from attempting to write to the tape
but you might still need to do the first option above to ensure nothing gets
through.

Chuck Arney
Arney Computer Systems
Web: http://zosdebug.com
Facebook: http://www.facebook.com/arneycomputer

-----Original Message-----
From: VSE-L <vse-l-bounces+chuck=arneycom...@lists.lehigh.edu> On
Behalf Of Martin Truebner
Sent: Friday, August 13, 2021 12:00 PM
To: vs...@lists.lehigh.edu
Subject: Re: systematically making a mounted tape R/O

K and M

unread,
Aug 13, 2021, 4:35:19 PM8/13/21
to
I don't know if any exit would be applicable. You may be able to use an SVC exit, but
I was thinking more about scanning the CCW chain to the appropriate device and flagging
if it would result in a write attempt. You may also be able to intercept the result from
a test of the device, forcing it to think it is read only. Just some blue sky speculation
on my part.

Ken


snip..

Martin Truebner

unread,
Aug 14, 2021, 3:56:57 AM8/14/21
to
>> believe there is an exit point in the Vendor Interface facility
>> where ....

Its name is PRODEXIT.. but has only exitpoints after SIO - but does
have an SVC point (before it starts) -

sounds like an interesting task to catch write attempts.

>> use an SVC exit

Ken- that is what it boils down to since there is no pre-IO point.

<dream> maybe 21CSW at some point in time implements that.</dream>

Jens Remus

unread,
Sep 9, 2021, 7:15:33 AM9/9/21
to
On Friday, August 13, 2021 at 4:50:23 PM UTC+2, Tony Thigpen wrote:

> I am working on a really different project that involves mounting tapes.
> My current code tells the VTL to load the tape and my code verifies some
> stuff in the headers.

If you are using AR/JC LIBSERV you can tell it to mount the tape read-only by specifying the suffix "/R" (which is the default):

[//] LIBSERV MOUNT,UNIT=cuu,LIB=library,VOL=volser/R

Regards,
Jens (IBM)
0 new messages