Tape Marks on TAPE DUMP tapes

A tape should always have two or more tape marks at the end of the data, which is the conventional signal (to whatever tries to read the data) that this is the end. If a tape does not have these, a program may assume there is more data on the tape and keep reading past the end of the data. This causes unpredictable results and, with open reel tapes, may cause the device to run off the end of the tape and pull the tape from the supply reel. (This is not disastrous, but is rather inconvenient, since the tape must be manually retreaded.)

Additionally, you may want a single tape mark in the middle of your data to separate groups of files.

Tape marks take up space on the tape, though, and on a buffered tape device (like most newer tape devices, including the IBM® 3480), writing tape marks severely slows down tape operations.

You can place tape marks on the tape explicitly with commands like TAPE WTM, but the TAPE DUMP command itself helps you with them. By default, TAPE DUMP will dump all the files you tell it to without any intervening tape marks, but with two tape marks after the last (or only) file. It leaves the tape positioned before the two tape marks. This means the next time you write to the tape, you write over those two tape marks. This is useful if you are going to do multiple successive TAPE DUMP commands, because it means no matter when you stop doing TAPE DUMPs, your tape ends up with two tape marks at the end and none in the middle.

But you may wish to have tape marks between all CMS files on the tape. For this, there is the WTM option. WTM causes TAPE DUMP to place tape marks between all files it dumps. The command still places two tape marks at the end of the data, but it leaves the tape positioned between the two. This means that if you do successive TAPE DUMP (WTM commands, you end up with a tape that has one tape mark between every two CMS files, and two tape marks to mark the end of the data.

The only problem with the above process is that it may waste dumping time and tape space, because it writes tape marks only to write over them later. Writing tape marks causes a severe performance degradation on a buffered tape device (because it causes a buffer synchronization) and physically writing a tape mark and then backing over it takes time on any device. Furthermore, the process that CMS and the device use to accomplish the writing over of tape marks leaves, with some devices, a large section of unused space on the tape. This obviously cuts into your tape capacity.

To solve that problem, there is the NOEODTM option. This tells CMS not to worry about placing two tape marks at the end of the data. With this, you can do multiple successive TAPE DUMP (NOEODTM commands without any costly buffer synchronizations or empty spaces on the tape. But remember that you still want two tape marks at the very end of the data, so after your last TAPE DUMP (NOEODTM, always do a TAPE WTM 2.

One other thing to be aware of, while taking advantage of the high speed of TAPE DUMP (NOEODTM, is that the device's buffer does not get synchronized before the TAPE command completes. This means that the TAPE command may complete with no error indication, but a later error may prevent the data from actually getting onto the tape. This is not generally a problem, because you eventually have to get those end of data tape marks written anyway, and if the tape marks get written successfully, you know all previously dumped data also got written successfully.

If you use both NOEODTM and WTM, the command puts a single tape mark after your last (or only) CMS file, and leaves the tape positioned after it. In this case, NOEODTM only gets you a slight performance improvement, but you still have a capacity improvement. You still have to add one tape mark at the very end, too, to make the two end of data tape marks.

Attention: The NOEODTM option defeats CMS's usual guarantee of end of data tape marks and buffer synchronization. You are responsible for ensuring the tape marks and synchronization are taken care of.