KARNEY%PPC.MFENET@LLL-MFE.ARPA (07/02/86)
A couple of changes to Meadow's file MODIFY utility are useful. The changed
files are given at the end of this message. The change to MODIFY.CLD allows
for example MODIFY FOO.BAR/CREA=TODAY/REV="+-1" (sets creation to today
midnight and revision to 1 hour from now). The change to MODTIME.FOR allows
MODIFY FOO.BAR/NOBACK/NOEXP to set "No backup date" and "No expiration date"
Charles Karney
Karney%PPC@MFE.ARPA
Here is MODIFY.CLD:
!************************************MODIFY*************************************
define verb MODIFY
image EXE$DIR:MODTIME
parameter P1 , label=FILE , prompt="File"
value (required,type=$file)
qualifier CREATION
nonnegatable, value (type=$datetime)
qualifier BACKUP
negatable, value (type=$datetime)
qualifier REVISION
nonnegatable, value (type=$datetime)
qualifier NUMBER
nonnegatable, value (type=$number)
qualifier EXPIRATION
negatable, value (type=$datetime)
qualifier LOG
Here is MODTIME.FOR:
program modtime
! MODTIME Version 1.0 June 1st, 1985
! Written by Joe Meadows Jr., with thanks to the
! Fred Hutchinson Cancer Research Center for kindly
! allowing me to use their computing resources.
!
! If you have any questions, comments, ideas, or
! whatever, feel free to contact me via US Mail :
! Joe Meadows Jr.
! 4841 268th Ave. N.E.
! Redmond Wa. 98052
! or via phone : (206) 827-7296
implicit integer (a-z)
integer time(2)
character buffer*80,file*252
external lib$put_output,cli$_negated
call error(cli$get_value('File',file))
if (cli$present('log')) routine=%loc(lib$put_output)
if (cli$present('creation')) then
call error(cli$get_value('creation',buffer))
call error(sys$bintim(buffer,time))
I=change_creation(file,time,routine)
end if
if (cli$present('revision')) then
call error(cli$get_value('revision',buffer))
call error(sys$bintim(buffer,time))
I=change_revision(file,time,routine)
end if
if (cli$present('number')) then
call error(cli$get_value('number',buffer))
call str$trim(buffer,buffer,len)
call error(ots$cvt_ti_l(buffer(:len),time))
I=change_revnum(file,time,routine)
end if
I=cli$present('backup')
if (I) then
call error(cli$get_value('backup',buffer))
call error(sys$bintim(buffer,time))
I=change_backup(file,time,routine)
else if (I.eq.%loc(cli$_negated)) then
time(1)=0
time(2)=0
I=change_backup(file,time,routine)
end if
I=cli$present('expiration')
if (I) then
call error(cli$get_value('expiration',buffer))
call error(sys$bintim(buffer,time))
I=change_expiration(file,time,routine)
else if (I.eq.%loc(cli$_negated)) then
time(1)=0
time(2)=0
I=change_expiration(file,time,routine)
end if
end
End of message
CC:
INFO-VAX@SRI-KL.ARPA
KARNEY