tldm-universe/Ardent/UV/BP/T.SPACE

118 lines
2.5 KiB
Plaintext
Raw Permalink Normal View History

2024-09-09 21:51:08 +00:00
*******************************************************************************
*
* Space the tape forword n files
*
* Module %M% Version %I% Date %H%
*
* (c) Copyright 1998 Ardent Software Inc. - All Rights Reserved
* This is unpublished proprietary source code of Ardent Software Inc.
* The copyright notice above does not evidence any actual or intended
* publication of such source code.
*
*******************************************************************************
*
* Maintenence log - insert most recent change descriptions at top
*
* Date.... GTAR# WHO Description.........................................
* 10/14/98 23801 SAP Change copyrights.
* 03/20/95 16165 SHK Check only first character when verifying KEYWORD
* 07/25/88 - - Maintenence log purged at 5.2.1, see release 5.1.10.
*
*******************************************************************************
$OPTIONS DEFAULT
open "VOC" to f.VOC else
print 'Unable to open your VOC'
stop
end
dim line(5)
matparse line from trim(@sentence) , " "
unit = -1;count = ''
i = 2
loop
until line(i) = '' or i = 5 do
read item from f.VOC,upcase(line(i)) then
if item[1,1]='K' and item<2>=40 then line(i)='K_MTU'
end
begin case
case line(i)='K_MTU'
if unit # -1 then
print 'Keyword "MTU" previously specified'
stop
end
i+=1
if line(i) = '' then
print 'Missing MTU specifcation'
stop
end
if not(num(line(i))) then
print 'Illegal MTU specification "':line(i):'"'
stop
end
unit = mod(line(i),10)
case 1
if count # '' then
print 'No. of files previously specified'
stop
end
if not(num(line(i))) then
print 'Illegal token "':line(i):'" on command line'
stop
end
count = line(i)
end case
i += 1
repeat
if count = '' then
10 print 'No. of files?':
input ans
if ans = '' then
goto 10
end
if upcase(ans) = 'Q' then stop
count = ans
end
if not(num(count)) then
print 'No. of files specification must be numeric'
stop
end
if unit = -1 then
cmd1 = 'T.FWD 1'
cmd2 = 'T.FWD'
end else
cmd1 = 'T.FWD MTU ':unit:' 1'
cmd2 = 'T.FWD MTU ':unit
end
ctr = 0
if count > 0 then
perform cmd2
if @system.return.code # 0 then
count = 0
end else
ctr += 1
count -= 1
end
end
loop until count <= 0 do
perform cmd1
if @system.return.code # 0 then
count = 0
end else
perform cmd2
ctr += 1
count -= 1
end
repeat
print 'End of recorded data - (':ctr:' Files)'