Discussion:
Writing To Tape 'files' In Hercules 3.01
Michael Coffin
2004-02-13 18:20:41 UTC
Permalink
Hi Folks,

In the latest (3.01) Herc, what's the simplest way to use ASCII files as
virtual tapes?

In my config file I specify:

0580 3480 /local/hercules/tapes/tape580.tape

Then I "touch tape580.tape" to create the file. However, from a 390
system when I try to do any I/O to the tape the device is not ready
(Intervention is required, what one would expect from a tape drive with
no tape mounted). Is there anything else I need to do?

-TIA

-Mike



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Send the freshest Valentine's flowers with a FREE vase from only $29.99!
Shipped direct from the grower with a 7 day freshness guarantee and prices so low you save 30-55% off retail!
http://us.click.yahoo.com/_iAw9B/xdlHAA/3jkFAA/W4wwlB/TM
---------------------------------------------------------------------~->
Ivan Warren
2004-02-13 18:29:58 UTC
Permalink
Post by Michael Coffin
Hi Folks,
In the latest (3.01) Herc, what's the simplest way to use
ASCII files as virtual tapes?
0580 3480 /local/hercules/tapes/tape580.tape
Then I "touch tape580.tape" to create the file. However,
from a 390 system when I try to do any I/O to the tape the
device is not ready (Intervention is required, what one would
expect from a tape drive with no tape mounted). Is there
anything else I need to do?
-TIA
-Mike
Mike,

First these are not going to be 'ASCII' files per-se - But rather flat
files (the encoding will the one used by your program)

Now - The internal structure (based on the filename you are showing) will
be that of an AWS tape (the format used on P/390 and others).

Unfortunatelly, due to how hercules operates with AWS files, and because
your operating system will have probably already tried to determine if the
device was ready, hercules probably already turned the tape as 'unloaded'
(you can see that by typing the hercules panel command 'devlist' and
seeing '*' as the tape file name).

So you should either issue the 'devinit' command (like devinit 580
/local/hercules/tapes/tape580.tape) - Or change the suffix to .het (this
will trigger use of another "tape media" handler : Hercules Tape (HET)
which also has some compression built in - and which will CREATE the file
for you if it doesn't exists (and if it can create it of course)).

Now - If your intention is to READ ASCII files, you will have to choose
another method : Use the OMA format (which can handle different type of
input files - ASCII text, Fixed blocked binary, or structured files with
variable records and embedded record length)

Voila,

--Ivan


[Non-text portions of this message have been removed]
bb5ch39t
2004-02-14 19:06:06 UTC
Permalink
Post by Michael Coffin
Hi Folks,
In the latest (3.01) Herc, what's the simplest way to use ASCII files as
virtual tapes?
0580 3480 /local/hercules/tapes/tape580.tape
Then I "touch tape580.tape" to create the file. However, from a 390
system when I try to do any I/O to the tape the device is not
ready
Post by Michael Coffin
(Intervention is required, what one would expect from a tape drive with
no tape mounted). Is there anything else I need to do?
-TIA
-Mike
Instead of using "touch" to create the tape. Which, by-the-by would
not initialize the VOL1 an other header records, I'd use the hetinit
command. You have two choices. AWS format or HET format. hetinit
will create either, but defaults to het. Note also that het
formatted files must end in ".het" to be recognized by hercules as
such.

hetinit -d tape580.tape.aws 123456 owner

to create an aws formatted tape. I use the '.aws' just to remind me
of its format.

hetinit tape580.tape.het 123456 owner

to create a het formatted tape. Both of these command create an SL
tape, similar to what is written by IEHINITT on MVS.

You can use the -n to create an NL tape. I've noticed that there is
no difference in the output of an "het" vs. "aws" formatted tape
when it is NL. I guess that's because all that an NL tape has is a
leading tape mark.

HTH
Michael Coffin
2004-02-14 21:38:52 UTC
Permalink
Many Thanks Ivan, that's almost exactly what I was looking for! :)

The HET files "behave" much better than a "flat file" as you pointed
out. Compression reduces the size of the file substantially, and you
can "initialize" the file by writing a tape label, thereby deleting all
of the "old content". Very nice.

Here's a follow up question. I enabled the Diag 8 support in my
Hercules config and would like to have a local "mount exec" on a VM
system do a diag 8 to instruct Hercules which "tape" to "mount". There
was something similar to this on the P390 as I recall. However, Diag 8
in VM will send the command to CP, not Hercules. Is there a means of
redirecting the command to Hercules? I'd like to do something like:

Rexx:
Parse Upper Arg Volser .
Rc=Diag(8,'devinit 580 /tapes/'Volser'.HET')

Resulting in Hercules "mounting/creating" the specified "Volser" HET
file.

Or is there a better way to do this? I was looking at the doc for the
"@" files thinking maybe I could create an "@tapes" file containing all
of the volsers of a "virtual tape library", but that doesn't seem to be
the way it works - the "@" file would just simulate a cartridge stacker
and mount the HET files listed sequentially like a 3480 autoloader.

-TIA

-Mike



Date: Fri, 13 Feb 2004 19:29:58 +0100
From: "Ivan Warren" <ivan-lnHwE90NT89Ooi3Kub+***@public.gmane.org>
Subject: RE: Writing To Tape 'files' In Hercules 3.01
Post by Michael Coffin
Hi Folks,
In the latest (3.01) Herc, what's the simplest way to use ASCII files
as virtual tapes?
0580 3480 /local/hercules/tapes/tape580.tape
Then I "touch tape580.tape" to create the file. However, from a 390
system when I try to do any I/O to the tape the device is not ready
(Intervention is required, what one would expect from a tape drive
with no tape mounted). Is there anything else I need to do?
-TIA
-Mike
Mike,

First these are not going to be 'ASCII' files per-se - But rather flat
files (the encoding will the one used by your program)

Now - The internal structure (based on the filename you are showing)
will be that of an AWS tape (the format used on P/390 and others).

Unfortunatelly, due to how hercules operates with AWS files, and because
your operating system will have probably already tried to determine if
the device was ready, hercules probably already turned the tape as
'unloaded' (you can see that by typing the hercules panel command
'devlist' and seeing '*' as the tape file name).

So you should either issue the 'devinit' command (like devinit 580
/local/hercules/tapes/tape580.tape) - Or change the suffix to .het (this
will trigger use of another "tape media" handler : Hercules Tape (HET)
which also has some compression built in - and which will CREATE the
file for you if it doesn't exists (and if it can create it of course)).

Now - If your intention is to READ ASCII files, you will have to choose
another method : Use the OMA format (which can handle different type of
input files - ASCII text, Fixed blocked binary, or structured files with
variable records and embedded record length)

Voila,

--Ivan




------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/W4wwlB/TM
---------------------------------------------------------------------~->
Ivan Warren
2004-02-14 21:50:31 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Post by Michael Coffin
Here's a follow up question. I enabled the Diag 8 support in
my Hercules config and would like to have a local "mount
exec" on a VM system do a diag 8 to instruct Hercules which
"tape" to "mount". There was something similar to this on
the P390 as I recall. However, Diag 8 in VM will send the
command to CP, not Hercules. Is there a means of redirecting
Parse Upper Arg Volser .
Rc=Diag(8,'devinit 580 /tapes/'Volser'.HET')
Resulting in Hercules "mounting/creating" the specified
"Volser" HET file.
In order for DIAG 8 to work, the instruction has to be issued in supervisor mode (I.e. by CP itself).

This means a mod is needed in CP to do that (basically implementing a new cp command that will issue a DIAG 8 with the additional parameters - This is what has already been done on VM/370 with the 'HCP' command).

The P/390 has a little different method (which involves a special CCW code to issue mounts). This is probably something that needs to be implemented somehow (it has to be a optional feature because of the security issues involved).. Furthermore, for tape mounts, this would probably be a MUCH BETTER solution than diag 8 (as it restricts scope to the tape drive itself - and lets CP deals with the difference between virtual device address & real device address).
Post by Michael Coffin
Or is there a better way to do this? I was looking at the
tape library", but that doesn't seem to be the way it works -
mount the HET files listed sequentially like a 3480 autoloader.
-TIA
-Mike
This is absolutelly correct.. The '@' file is nothing else but a tape stacker.. (and even then, it's less evolved than a 3480 AL as there is no 'system' mode for it - It only operates in standalone mode where a new tape is loaded until the stacker is exhausted).

- --Ivan

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0.2

iQA/AwUBQC6X14dFv4a3KlzEEQKb/wCdHyQsqFkKX0MQErl/vFF1riZdshUAoOzU
32IhK/LZc0fPZds1TtYJ3LUq
=nX9g
-----END PGP SIGNATURE-----



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/W4wwlB/TM
---------------------------------------------------------------------~->
Michael Coffin
2004-02-16 15:54:16 UTC
Permalink
Thanks again Ivan! That makes sense now. Does anyone have a local CP
command source coded up for VM? Where is the HCP mod to VM/370 (I
google searched but HCP is a very popular term, couldn't find it).

Feel free to contact me off-list if you prefer. :)

-Mike





Date: Sat, 14 Feb 2004 22:50:31 +0100
From: "Ivan Warren" <ivan-lnHwE90NT89Ooi3Kub+***@public.gmane.org>
Subject: RE: RE: Writing To Tape 'files' In Hercules 3.01


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Post by Michael Coffin
Here's a follow up question. I enabled the Diag 8 support in
my Hercules config and would like to have a local "mount
exec" on a VM system do a diag 8 to instruct Hercules which
"tape" to "mount". There was something similar to this on
the P390 as I recall. However, Diag 8 in VM will send the
command to CP, not Hercules. Is there a means of redirecting
Parse Upper Arg Volser .
Rc=Diag(8,'devinit 580 /tapes/'Volser'.HET')
Resulting in Hercules "mounting/creating" the specified
"Volser" HET file.
In order for DIAG 8 to work, the instruction has to be issued in
supervisor mode (I.e. by CP itself).

This means a mod is needed in CP to do that (basically implementing a
new cp command that will issue a DIAG 8 with the additional parameters -
This is what has already been done on VM/370 with the 'HCP' command).

The P/390 has a little different method (which involves a special CCW
code to issue mounts). This is probably something that needs to be
implemented somehow (it has to be a optional feature because of the
security issues involved).. Furthermore, for tape mounts, this would
probably be a MUCH BETTER solution than diag 8 (as it restricts scope to
the tape drive itself - and lets CP deals with the difference between
virtual device address & real device address).
Post by Michael Coffin
Or is there a better way to do this? I was looking at the
tape library", but that doesn't seem to be the way it works -
mount the HET files listed sequentially like a 3480 autoloader.
-TIA
-Mike
This is absolutelly correct.. The '@' file is nothing else but a tape
stacker.. (and even then, it's less evolved than a 3480 AL as there is
no 'system' mode for it - It only operates in standalone mode where a
new tape is loaded until the stacker is exhausted).

- --Ivan
Binyamin Dissen
2004-02-16 16:11:54 UTC
Permalink
On Mon, 16 Feb 2004 10:54:16 -0500 "Michael Coffin" <MichaelCoffin-JzNCr50P+***@public.gmane.org>
wrote:

:>Thanks again Ivan! That makes sense now. Does anyone have a local CP
:>command source coded up for VM? Where is the HCP mod to VM/370 (I
:>google searched but HCP is a very popular term, couldn't find it).

Going down memory lane here.

I wrote a $CP command to issue CP commands from a second level session many
eons ago - my guess would be around 1986.

There are several steps required:

1. Update the CP module that has the commands defined. DMKCFC sounds right,
but it has been a while.

2. Write the actual command - you can look at the source for the various other
commands.

3. Generate a new CP nucleus.

Be aware that a program check inside of CP causes a crash of CP and a re-IPL.

:> Date: Sat, 14 Feb 2004 22:50:31 +0100
:> From: "Ivan Warren" <ivan-lnHwE90NT89Ooi3Kub+***@public.gmane.org>
:>Subject: RE: RE: Writing To Tape 'files' In Hercules 3.01
:>
:>
:>-----BEGIN PGP SIGNED MESSAGE-----
:>Hash: SHA1
:>
:>> Here's a follow up question. I enabled the Diag 8 support in
:>> my Hercules config and would like to have a local "mount
:>> exec" on a VM system do a diag 8 to instruct Hercules which
:>> "tape" to "mount". There was something similar to this on
:>> the P390 as I recall. However, Diag 8 in VM will send the
:>> command to CP, not Hercules. Is there a means of redirecting
:>> the command to Hercules? I'd like to do something like:
:>>
:>> Rexx:
:>> Parse Upper Arg Volser .
:>> Rc=Diag(8,'devinit 580 /tapes/'Volser'.HET')
:>>
:>> Resulting in Hercules "mounting/creating" the specified
:>> "Volser" HET file.
:>
:>In order for DIAG 8 to work, the instruction has to be issued in
:>supervisor mode (I.e. by CP itself).
:>
:>This means a mod is needed in CP to do that (basically implementing a
:>new cp command that will issue a DIAG 8 with the additional parameters -
:>This is what has already been done on VM/370 with the 'HCP' command).
:>
:>The P/390 has a little different method (which involves a special CCW
:>code to issue mounts). This is probably something that needs to be
:>implemented somehow (it has to be a optional feature because of the
:>security issues involved).. Furthermore, for tape mounts, this would
:>probably be a MUCH BETTER solution than diag 8 (as it restricts scope to
:>the tape drive itself - and lets CP deals with the difference between
:>virtual device address & real device address).
:>
:>>
:>> Or is there a better way to do this? I was looking at the
:>> doc for the "@" files thinking maybe I could create an
:>> "@tapes" file containing all of the volsers of a "virtual
:>> tape library", but that doesn't seem to be the way it works -
:>> the "@" file would just simulate a cartridge stacker and
:>> mount the HET files listed sequentially like a 3480 autoloader.
:>>
:>> -TIA
:>>
:>> -Mike
:>
:>This is absolutelly correct.. The '@' file is nothing else but a tape
:>stacker.. (and even then, it's less evolved than a 3480 AL as there is
:>no 'system' mode for it - It only operates in standalone mode where a
:>new tape is loaded until the stacker is exhausted).
:>
:>- --Ivan
:>
:>
:>
:>
:>Community email addresses:
:> Post message: hercules-390-***@public.gmane.org
:> Subscribe: hercules-390-subscribe-***@public.gmane.org
:> Unsubscribe: hercules-390-unsubscribe-***@public.gmane.org
:> List owner: hercules-390-owner-***@public.gmane.org
:>
:>Files and archives at:
:> http://groups.yahoo.com/group/hercules-390
:>
:>Get the latest version of Hercules from:
:> http://www.conmicro.cx/hercules
:>Yahoo! Groups Links
:>
:>
:>
:>


--
Binyamin Dissen <bdissen-***@public.gmane.org>
http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/W4wwlB/TM
---------------------------------------------------------------------~->
Loading...