Discussion:
Getting data in and out of VM/370 using tapes
Robert O'Hara
2010-02-13 18:25:28 UTC
Permalink
Here's a quick tutorial, because I found it confusing at first.

To move data from CMS to the outside world (e.g. Windows) I find the easiest way is to create a tape. Remember, in Hercules a tape is simulated by a file.

First, create the "tape" by using the hetinit utility (do this in Windows or whatever your host OS is):
hetinit -n -d mytape.aws

I did this once, and called it "EmptyTape.aws". Now when I make a new tape I just copy that file...

Now you have an empty reel of tape. You need to mount it on a tape drive. In the Hercules console type:
devinit 480 mytape.aws

Now you have your empty reel of tape mounted on the tape drive at address 480. Next you need to give access to that tape drive to a virtual machine. In the Hercules console you can issue VM/370 operator commands (or you can issue them from the Operator console if you have logged it in separately). From the Hercules console these commands are prefixed with a "/" to distinguish them from Hercules commands:
/attach 480 to maint as 181

The above assumes you are logged in as MAINT. You can of course use whatever userid you want. On MAINT's console you will get the message:
TAPE 181 ATTACHED

Now you can use the CMS TAPE or VMFPLC2 commands to write multiple files to the tape. Type HELP TAPE for more information on the TAPE command. When you are done, detach the tape drive from your virtual machine:
DETACH 181

Back in your host OS the files you wrote are all in the "myfile.aws" file. You can send that to other folks, who can mount the file as a tape drive and read the files using the TAPE LOAD command.

Regards, Bob
kerravon86
2010-02-14 00:15:39 UTC
Permalink
Post by Robert O'Hara
Here's a quick tutorial, because I found it confusing at first.
To move data from CMS to the outside world (e.g.
Windows) I find the easiest way is to create a tape.
Remember, in Hercules a tape is simulated by a file.
Ideally someone would write a utility to encapsulate
that action, which looked something like this:

C:\vm380>dumpmini
Usage example: dumpmini 291 tape.vmarc
C:\vm380>

and ideally someone else would make that even more
efficient by streamlining the automatic log on
process in the .rc files that make that happen, as
they said they would. :-)

BFN. Paul.
Mike Stramba
2010-02-14 05:16:19 UTC
Permalink
Bob,

Thanks, I was actually familiar with everything you wrote above,
except for the "-n" in the hetinit command :)

Actually, after doing some testing, it seems that *any* file can be
used for a tape file, as the TAPE DUMP command apparently formats the
"tape" during the DUMP command.

Is there a way to "append" files to the tape, using the CMS TAPE command ?

Mike
Dave Wade
2010-02-14 10:51:30 UTC
Permalink
-----Original Message-----
Sent: 14 February 2010 05:16
Subject: Re: [H390-VM] Getting data in and out of VM/370 using tapes
Bob,
above, except for the "-n" in the hetinit command :)
That says "no label"
Actually, after doing some testing, it seems that *any* file
can be used for a tape file, as the TAPE DUMP command
apparently formats the "tape" during the DUMP command.
Pretty much true. Only problem is that some versions of Hercules (not sure
about current release) didn't truncate the file when you re-wound the tape
after a write. This meant if you used a big file as a tape it stayed big and
had lots of garbage in the end. CMS was happy with this , but some of the
AWS browsers used to fall over.
Is there a way to "append" files to the tape, using the CMS
TAPE command ?
If memory serves me correctly when you do a "tape dump" the command dumps
the files as requested, writes a tape mark (so an EOF) and then backspaces
over tape mark so the next write would over write it. Any way regardless of
"how" it happens, you can do multiple "Tape DUMP" commands and each will
append to the tape.

However once you have rewound the tape I don't know a reliable way to
position things so the above happens. I think a "TAPE SCAN", followed by a
"TAPE BSF 1" should work.... (scan to the first tape mark, backspace over
one tape mark)
Mike
Dave
------------------------------------
Yahoo! Groups Links
Mike Stramba
2010-02-14 16:45:31 UTC
Permalink
Post by Dave Wade
Post by Mike Stramba
Actually, after doing some testing, it seems that *any* file
can be used for a tape file, as the TAPE DUMP command
apparently formats the "tape" during the DUMP command.
Pretty much true. Only problem is that some versions of Hercules (not sure
about current release) didn't truncate the file when you re-wound the tape
after a write. This meant if you used a big file as a tape it stayed big and
had lots of garbage in the end. CMS was happy with this , but some of the
AWS browsers used to fall over.
- 'Copy con tapefile'
- Ctr Z

.. results in a '0 byte size' file :)
Post by Dave Wade
Post by Mike Stramba
Is there a way to "append" files to the tape, using the CMS
TAPE command ?
If memory serves me correctly when you do a "tape dump" the command dumps
the files as requested, writes a tape mark (so an EOF) and then backspaces
over tape mark so the next write would over write it.
Any way regardless of
"how" it happens, you can do multiple "Tape DUMP" commands and each will
append to the tape.
Ya, multiple tape dumps work as long as you don't REW / SCAN in
between TAPE DUMP commands ;) ... Just like a real tape ... duh !
Post by Dave Wade
However once you have rewound the tape I don't know a reliable way to
position things so the above happens. I think a "TAPE SCAN", followed by a
"TAPE BSF 1" should work.... (scan to the first tape mark, backspace over
one tape mark)
That works great. .... and 'TAPE BSF' seems to default to '1' ;)
Mike Stramba
2010-02-14 17:22:22 UTC
Permalink
Is this information obsolete / wrong ?

help tape (more

Usage notes:

1. .............
The first byte in the tape header is a binary 2 (X'02'). The next three
bytes contain CMS, followed by a blank byte, followed by 800 bytes of file

FileDef.aws
00000000 25 03 00 00 A0 00 02 C3 D4 E2 40 C8 D9 C3 F3 F2 %.. .ÃÔâ@ÈÙÃóò
00000010 F4 C4 E2 40 E5 F0 F3 40 C6 89 A7 40 93 96 96 97 ôÄâ@åðó@Æ


What format is this tape ?

editor.aws
00000000 4D 00 00 00 A0 00 02 D7 D3 C3 C8 C5 C4 D4 C1 C9 M... .×ÓÃÈÅÄÔÁÉ

tape scan
SCANNING....
INVALID RECORD FORMAT.
Post by Mike Stramba
Post by Dave Wade
Post by Mike Stramba
Actually, after doing some testing, it seems that *any* file
can be used for a tape file, as the TAPE DUMP command
apparently formats the "tape" during the DUMP command.
Pretty much true. Only problem is that some versions of Hercules (not sure
about current release) didn't truncate the file when you re-wound the tape
after a write. This meant if you used a big file as a tape it stayed big and
had lots of garbage in the end. CMS was happy with this , but some of the
AWS browsers used to fall over.
- 'Copy con tapefile'
- Ctr Z
.. results in a '0 byte size' file :)
Post by Dave Wade
Post by Mike Stramba
Is there a way to "append" files to the tape, using the CMS
TAPE command ?
If memory serves me correctly when you do a "tape dump" the command dumps
the files as requested, writes a tape mark (so an EOF) and then backspaces
over tape mark so the next write would over write it.
Any way regardless of
"how" it happens, you can do multiple "Tape DUMP" commands and each will
append to the tape.
Ya, multiple tape dumps work as long as you don't REW / SCAN in
between TAPE DUMP commands ;) ... Just like a real tape ... duh !
Post by Dave Wade
However once you have rewound the tape I don't know a reliable way to
position things so the above happens. I think a "TAPE SCAN", followed by a
"TAPE BSF 1" should work.... (scan to the first tape mark, backspace over
one tape mark)
That works great. .... and 'TAPE BSF' seems to default to '1' ;)
Dave Wade
2010-02-14 17:48:44 UTC
Permalink
Post by Mike Stramba
Is this information obsolete / wrong ?
help tape (more
1. .............
The first byte in the tape header is a binary 2 (X'02'). The next three
bytes contain CMS, followed by a blank byte, followed by 800 bytes of file
FileDef.aws
What format is this tape ?
editor.aws
00000000 4D 00 00 00 A0 00 02 D7 D3 C3 C8 C5 C4 D4 C1 C9 M... .×ÓÃÈÅÄÔÁÉ
tape scan
SCANNING....
INVALID RECORD FORMAT.
Probably VMFPLC2 .....
Post by Mike Stramba
Post by Mike Stramba
Post by Dave Wade
Post by Mike Stramba
Actually, after doing some testing, it seems that *any* file
can be used for a tape file, as the TAPE DUMP command
apparently formats the "tape" during the DUMP command.
Pretty much true. Only problem is that some versions of Hercules (not sure
about current release) didn't truncate the file when you re-wound the tape
after a write. This meant if you used a big file as a tape it stayed big and
had lots of garbage in the end. CMS was happy with this , but some of the
AWS browsers used to fall over.
- 'Copy con tapefile'
- Ctr Z
.. results in a '0 byte size' file :)
Post by Dave Wade
Post by Mike Stramba
Is there a way to "append" files to the tape, using the CMS
TAPE command ?
If memory serves me correctly when you do a "tape dump" the command dumps
the files as requested, writes a tape mark (so an EOF) and then backspaces
over tape mark so the next write would over write it.
Any way regardless of
"how" it happens, you can do multiple "Tape DUMP" commands and each will
append to the tape.
Ya, multiple tape dumps work as long as you don't REW / SCAN in
between TAPE DUMP commands ;) ... Just like a real tape ... duh !
Post by Dave Wade
However once you have rewound the tape I don't know a reliable way to
position things so the above happens. I think a "TAPE SCAN", followed by a
"TAPE BSF 1" should work.... (scan to the first tape mark, backspace over
one tape mark)
That works great. .... and 'TAPE BSF' seems to default to '1' ;)
------------------------------------
Yahoo! Groups Links
Mike Stramba
2010-02-14 18:20:47 UTC
Permalink
Post by Dave Wade
Post by Mike Stramba
What format is this tape ?
editor.aws
00000000 4D 00 00 00 A0 00 02 D7 D3 C3 C8 C5 C4 D4 C1 C9 M... .
ЧУГИЕДФБЙ
tape scan
SCANNING....
INVALID RECORD FORMAT.
Probably VMFPLC2 .....
Ah ! .. that helps ! .... yet another "new" command , I hadn't used before :)

thx !

Mike


------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/H390-VM/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/H390-VM/join
(Yahoo! ID required)

<*> To change settings via email:
H390-VM-digest-***@public.gmane.org
H390-VM-fullfeatured-***@public.gmane.org

<*> To unsubscribe from this group, send an email to:
H390-VM-unsubscribe-***@public.gmane.org

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
Dave Wade
2010-02-14 17:47:01 UTC
Permalink
Post by Mike Stramba
Post by Dave Wade
Post by Mike Stramba
Actually, after doing some testing, it seems that *any* file
can be used for a tape file, as the TAPE DUMP command
apparently formats the "tape" during the DUMP command.
Pretty much true. Only problem is that some versions of Hercules (not sure
about current release) didn't truncate the file when you re-wound the tape
after a write. This meant if you used a big file as a tape it stayed big and
had lots of garbage in the end. CMS was happy with this , but some of the
AWS browsers used to fall over.
- 'Copy con tapefile'
- Ctr Z
.. results in a '0 byte size' file :)
Post by Dave Wade
Post by Mike Stramba
Is there a way to "append" files to the tape, using the CMS
TAPE command ?
If memory serves me correctly when you do a "tape dump" the command dumps
the files as requested, writes a tape mark (so an EOF) and then backspaces
over tape mark so the next write would over write it.
Any way regardless of
"how" it happens, you can do multiple "Tape DUMP" commands and each will
append to the tape.
Ya, multiple tape dumps work as long as you don't REW / SCAN in
between TAPE DUMP commands ;) ... Just like a real tape ... duh !
Well CMS and VM "think", if a computer can think, that its a real tape.
However I still find myself doing "tape wtm 5" to put 5 tape marks on so
the tape doesn't run off the end. Sad eh?
Post by Mike Stramba
Post by Dave Wade
However once you have rewound the tape I don't know a reliable way to
position things so the above happens. I think a "TAPE SCAN", followed by a
"TAPE BSF 1" should work.... (scan to the first tape mark, backspace over
one tape mark)
That works great. .... and 'TAPE BSF' seems to default to '1' ;)
Probably does until some one changes it...
Post by Mike Stramba
------------------------------------
Yahoo! Groups Links
paoloG
2010-02-14 17:49:41 UTC
Permalink
Post by Mike Stramba
Post by Dave Wade
Post by Mike Stramba
Actually, after doing some testing, it seems that *any* file
can be used for a tape file, as the TAPE DUMP command
apparently formats the "tape" during the DUMP command.
Pretty much true. Only problem is that some versions of Hercules (not sure
about current release) didn't truncate the file when you re-wound the tape
after a write. This meant if you used a big file as a tape it stayed big and
had lots of garbage in the end. CMS was happy with this , but some of the
AWS browsers used to fall over.
In my precedent post:
http://games.groups.yahoo.com/group/H390-VM/message/6749

I said to use *LITTLE* files.. ;-)
or even 0 length files.

The .aws file type (in Windows) isn't in any way mandatory, just useful to remember the file content.
Post by Mike Stramba
Post by Dave Wade
Post by Mike Stramba
Is there a way to "append" files to the tape, using the CMS
TAPE command ?
If memory serves me correctly when you do a "tape dump" the command dumps
the files as requested, writes a tape mark (so an EOF) and then backspaces
over tape mark so the next write would over write it.
Any way regardless of
"how" it happens, you can do multiple "Tape DUMP" commands and each will
append to the tape.
Ya, multiple tape dumps work as long as you don't REW / SCAN in
between TAPE DUMP commands ;) ... Just like a real tape ... duh !
Post by Dave Wade
However once you have rewound the tape I don't know a reliable way to
position things so the above happens. I think a "TAPE SCAN", followed by a
"TAPE BSF 1" should work.... (scan to the first tape mark, backspace over
one tape mark)
That works great. .... and 'TAPE BSF' seems to default to '1' ;)
If you want to write different files to the tape keeping them apart,
you can use this sequence:

TAPE DUMP * ASSEMBLE
TAPE WTM
TAPE DUMP * COBOL
TAPE WTM
...
and so on (writing tape marks between different sets of files).

Regards.

Paul
kerravon86
2010-02-14 23:23:41 UTC
Permalink
Post by Mike Stramba
- 'Copy con tapefile'
- Ctr Z
.. results in a '0 byte size' file :)
C:\mvs380\build>dir fred.txt
Volume in drive C is S3A6258D001
Volume Serial Number is A094-71BF

Directory of C:\mvs380\build

File Not Found

C:\mvs380\build>copy nul: fred.txt
1 file(s) copied.

C:\mvs380\build>dir fred.txt
Volume in drive C is S3A6258D001
Volume Serial Number is A094-71BF

Directory of C:\mvs380\build

15/02/2010 10:21 AM 0 fred.txt
1 File(s) 0 bytes
0 Dir(s) 2,905,354,240 bytes free

C:\mvs380\build>


And yes, I know the ":" can be left out, but that's
got to be the epitome of un-aestheticness.

BFN. Paul.
Mike Stramba
2010-02-15 00:00:08 UTC
Permalink
Cool, did not know that one.

For less typing :) : (after the initial bat/cmd create)

copy con nt.bat
copy nul: %1
dir %1
CTR Z
.. Then later ...

c:\hercules\vm nt tap2

or : (assuming DIAG8CMD ENABLE in hercules.cnf)

----- DUMPF EXEC -------
*
* create new tape, attach to hercules and
* dump file(s) to new tape
*
* DUMPF <tapefileName> <FN> <FT> <FM>
*
CP HCP SH COPY NUL: &1
*
* CP HCP SH DIR &1
*
CP HCP DEVINIT 480 &1
*
* CP HCP DEVLIST 480
*
CP ATT 480 * 181
TAPE DUMP &2 &3 &4
TAPE REW
TAPE SCAN
CP DET 181
CP HCP DEVINIT 480 *

* CP HPC DEVLIST 480
Post by kerravon86
Post by Mike Stramba
- 'Copy con tapefile'
- Ctr Z
.. results in a '0 byte size' file :)
C:\mvs380\build>dir fred.txt
Volume in drive C is S3A6258D001
Volume Serial Number is A094-71BF
Directory of C:\mvs380\build
File Not Found
C:\mvs380\build>copy nul: fred.txt
1 file(s) copied.
C:\mvs380\build>dir fred.txt
Volume in drive C is S3A6258D001
Volume Serial Number is A094-71BF
Directory of C:\mvs380\build
15/02/2010 10:21 AM 0 fred.txt
1 File(s) 0 bytes
0 Dir(s) 2,905,354,240 bytes free
C:\mvs380\build>
And yes, I know the ":" can be left out, but that's
got to be the epitome of un-aestheticness.
BFN. Paul.
------------------------------------
Yahoo! Groups Links
kerravon86
2010-02-15 00:35:41 UTC
Permalink
Post by Mike Stramba
Cool, did not know that one.
For less typing :) : (after the initial bat/cmd create)
copy con nt.bat
copy nul: %1
dir %1
CTR Z
I wouldn't put the "dir" in a batch file like that.
That was just to illustrate the point that it worked.
You can normally assume that.
Post by Mike Stramba
----- DUMPF EXEC -------
*
* create new tape, attach to hercules and
* dump file(s) to new tape
*
* DUMPF <tapefileName> <FN> <FT> <FM>
Yes, I think something like this (or exactly this)
should be part of the sixpack.

BFN. Paul.

Loading...