I tried the DSPTAP command but it only shows the size of the objects saved, there is no indication on how much space is still available.
-
4Wow. Whoever answers this deserves to be revered as a community elder. – Ryan Ries Jan 06 '13 at 04:00
-
Why would you look on a *tape* to try to see how much space is available on *disk* ?? – WarrenT Jan 06 '13 at 05:20
-
os400 tag is missing – Jan 06 '13 at 12:04
-
1I wouldn't say I miss OS/400 at all. And I think the current name is something like 'IBM i'. I think its included in the midrange tag, to be fair. – Rob Moir Jan 06 '13 at 19:12
2 Answers
There's no way to know how much space is left on a tape mostly because this is abstracted away from the system (hardware compression, etc make it difficult to predict how much capacity is available on a tape in the first place). This isn't so much an AS/400 limitation as it is a limit in how tape devices are visible on any platform.
All you can do is issue DSPTAP DEV(TAPXX) DATA(*SAVRST) OUTPUT(*PRINT)
to review what is on the tape, and compare that to the stated capacity figures for the type of tape you're using, but this won't give you a hard figure as to how much space is left.
- 31,664
- 6
- 58
- 86
-
1Many people try to save money by putting multiple backups on a single tape. For instance, Monday the 7th, Monday the 21st, Monday the 4th... It can be helpful to know whether 2 or 3 'Monday backups' will fit on a tape. In the old days we used to look at how full the reel was to get a rough idea. As @RobM says, there was never a way to get a hard number of bytes remaining, but sometimes an approximation is all that is needed. – Buck Calabro Jan 09 '13 at 18:24
The ibm answer: http://www-01.ibm.com/support/docview.wss?uid=nas8N1015190 says that you could use print dsptap output to calculate (by hand) the amount of data written to the tape.
The problem here is that there is no columns for blocks and block lenght if you try to send the
I have found (Version 7.2) that the output file's RDTRL1 and RDTRL2 columns contains information about block count and size. Then , this sql command shows the total bytes written to tape:
select sum( cast (left(right(rdtrl1, 27),7) as decimal(7,0)) * cast (right(rdtrl2, 10) as decimal(10 , 0)) - 4096 ) from yourfilehere
But remember that this is not accurate if the tape driver compacts data.
- 11
- 1