From: jay@deepthot.cary.nc.us (Jay Denebeim)
Newsgroups: alt.sys.amiga.uucp
Subject: Re: BMS info required
Date: 16 Aug 92 17:53:17 GMT
Organization: The Software Distillery
X-Newsreader: Arn V1.00 beta rel2

In article <shane.085b@peeker.uucp>, Shane R. McCarthy writes:

SR>                                         What I would like to do is have
SR> multiple CD's available and then switch between them depending on what
SR> file has been requested.  When a request comes in and asks for ex.
SR> 
SR> AB20:AMIGA/roadmap.
SR> 
SR> and I have a FredFish volume mounted (no AB20: mounted/inserted) the get
SR> will fail and send back to the asking machine that the file not found 100%
SR> complete.  Will the asking machine re-request at a later date?

No, it will not.  I have a similar problem here.  I have most of my files
backed up on floppy, and not online.  What I did was hack a REXX script
that updates my database of offline files, then cancels the file request.

It then eats the replies back to the originating BMS site, so I've removed
all knowledge in the system that the message arrived.  The far site retries
in a few days, presumably I've already got the file on-line, in which case
the request completes, or I've been not done it, in which case the process
repeats.

SR>    Also there is no mention of the author in the docs or BMS HELP so could
SR> someone please forward the name/address of the author of BMS. 

Its Mat, of course.

 |_o_o|\\
 |. o.| || The           Jay Denebeim
 | .  | ||  Software
 | o  | ||   Distillery
 |    |//        Address: UUCP:     duke!wolves!deepthot!jay
 ======                   Internet: jay@deepthot.cary.nc.us
                 BBS:(919)-460-7430      VOICE:(919)-460-6934

/*
 * Handles Offline files for BMS
 *  It does so by suppressing the message that the file is not here, and forcing
 *  a timeout on the far end.
 */

/*trace ?r*/
"BMS Batch"
"BMS Active | ExecIO stem BMS."

Do i = 0 to BMS.0
	Parse Var BMS.i File Rest
	If File = "FILE" Then Do
		Parse Var Rest . . "loc="FPath . "flags=" Flags
		If (Index(Flags,"NOTFND") ~= 0)&(Index(Flags,"NOACCESS")=0)&(Index(Rest,"rem=")=0) Then Do
			FName = Translate(FPath," ","/")
			FName = Translate(FName," ",":")
			FName = Word(FName,Words(FName))
			
			'Search s:Catalog.db quick ":'FName'" | ExecIO Stem Files.'
			If Files.0 > 1 Then Do
				Do j=2 to Files.0
					Parse Var Files.j . Disk':'File
					t1=Upper(File)
					t2=Upper(FName)
					If (t1=t2)|(t1=t2".ARC") Then Do
						FPath = Reverse(FPath)
						Parse Var FPath .'/'FPath
						FPath = Reverse(FPath)
						'Echo >>BBX:FilesOffline "'Strip(Disk)':'File FName FPath'"'
						Call RemoveFromBMS(i-1)
						Call FindAndKill
					End
				End
			End
		End
	End
End

"BMS Batch"
"BMS All | ExecIO stem BMS."
Do i = 0 to BMS.0
	Parse Var BMS.i "CONTROL:" "STAT="id":"command "to=".
	If command = "Manual Dequeue" Then Do
		"BMS Retry "id
		Call FindAndKill
	End
End
Exit

FindAndKill:

dest = ""
Do j=i to 0 by -1 until dest ~= ""
	Parse Var BMS.j "REGISTRATION" Dest .
	If Dest ~= "" Then Do
		Dest = Translate(Dest," ","@")
		Dest = Translate(Dest," ","!")
		Dest = Word(Dest,Words(Dest))
		'List LFormat "%n" UUSpool:#?.#?X#? | ExecIO Stem Del.'
		Do k=1 to Del.0
			say del.k
			If Open(f,"UUSPool:"Del.k,"R") Then Do
				fc = 0
				Do While ~EOF(f)
					line = ReadLn(f)
					Parse Var Line "C rmail" XDest .
					If XDest ~= "" Then Do
						XDest = Translate(XDest," ","@")
						XDest = Translate(XDest," ","!")
						XDest = Word(XDest,Words(XDest)-1)
						say dest xdest
						If XDest = Dest Then Do
							Del = Translate(Del.k,"?","D")
							Del = Translate(Del,"?","X")
							b = Close(f)
							fc = 1
							"Era UUSpool:"del
						End
					End
					If fc Then Break
				End
			if ~fc Then b = Close(f)
			End
		End
	End
End
Return

RemoveFromBMS:
Arg T

Parse Var BMS.t "STAT="id":".
"BMS Dequeue "id

Return