DoCall.rexx v2.0 (c) 1994 by Frank J. Perricone THE PURPOSE OF THIS ARCHIVE The original DoCall.rexx was my very first ARexx program, and it was not done very well. It was unnecessarily restrictive, and quite inefficient. A version of it that also included a (gads!) busy-wait loop even got downloaded by someone, and apparently propagated very far, by way of being part of some CLink standard "everything you need" archive. Meanwhile, though I continued to use DoCall.rexx on my own system, I did not think it was really worth distributing, and so pulled it off my system's file areas. Ironically, it seems to be amongst the most well- distributed of all the programs I've written. Because of all the interest in fixing the howling flaws in the version that many people have, I've decided to write these docs and release them with the version I use on my system now. It's still nothing spectactular and hardly worth releasing; but at least it's better than what lots of people are using, and it will spare me all the questions about problems with what people are using. THE *REAL* PURPOSE OF THIS ARCHIVE DoCall is a simple program to call another Fido system. It can poll the other system as many times as you need to try, until it gets through. Systems with multiple numbers can be polled one number at a time until one gets through. You can call by node number, phone number, or the word BOSS. This program is usually called from your nightly polling script, which is in turn called by your cron program. HOW TO USE THIS PROGRAM The syntax is simple and flexible. All options have defaults, and all can occur in any order. The syntax is: rx DoCall {||BOSS} [RETRIES=] [DELAY=] [MODEMINIT=] [WEEKDAY=] The first item in the list is a phone number or node address (be sure to include the zone) to call. If you use the word BOSS, your boss system, according to your TrapDoor.cfg file, will be polled. Mix and match these three ways to specify systems. If you list none, BOSS will be called. If you list more than one, each will be called in turn until one of them gets through. Be warned: if you lose carrier calling one node of a single system, automatic resume of file transfers may fail if you then connect to another node. The other options must include the equal sign and no spaces; the word, however, can be abbreviated, as only the first letter is used. The meanings are: Option Name Default Meaning ----------- ------- ------- RETRIES 100 Number of times to try the call. If you have multiple systems to poll, this is total number of times to try ALL the systems, not total number of calls. DELAY 20 Number of seconds to wait between finishing one call (or cycle of calls) and starting another MODEMINIT none An optional initialization string to send to the modem. Do not include the AT. For instance, you might say MODEMINIT=M1 to turn on the speaker. WEEKDAY today Day of the week to run this poll on. If you leave this out, it will run on every day. I use this to only poll certain nodes on certain days of the week, rather than having a separate cron event for them. The whole day name (in English) should be used. DoCall returns an errorlevel of 10 if it ran out of retries without ever getting through. You can use this to perform the following clever trick: rx mail:rexx/DoCall 1:325/602.0 if warn if not exists Mail:Outbound/1.325.602.0.CUT echo >Mail:Outbound/1.325.602.0.CUT "" noline endif endif This slightly klugy but pretty clever trick works as follows. First, try to call 1:325/602 (my netmail uplink). If we fail, create an empty packet file in the outbound directory, flavored Crash, for them. Another cron event on my system tries to send out any crashmail at 15 and 45 minutes after every hour, so though the script that the above code is in can go on (and poll someone else, for instance), my system still keeps trying to get through to 1:325/602 during the day. I only do this, of course, for systems local to me (like 325/602) or ones that it's very important I get through to. Consider the following: rx mail:rexx/DoCall 1:323/110.0 Weekday=Monday rx mail:rexx/DoCall 1:323/110.0 Weekday=Thursday This polls 323/110 (my SecureMail host) twice a week. Seems a lot easier than setting up a separate cron event, and ensuring that this second event gets into sequence with the other events I run. Also note: TrapDoor automatically handles ARexx messages piling up; while it is doing something, it doesn't ignore messages, it just lets them pile up. As a result, you can be running a DoCall when someone calls in, and your next dial-out from DoCall will just sit on the back burner until that call is done. However, multiple copies of DoCall running at once can, if the timing is JUST RIGHT, interfere with one another. This is quite rare. PAYING FOR THIS PROGRAM This program is public domain. My only limitation is that you not release any modified version of this program without my prior consent. Otherwise, use it as you see fit, distribute it wherever it will do, and above all, try to find yourself a REAL polling program. This one just isn't very good. I only use it because it happens to be all I need; but I do not intend to ensure it is also all you need. For support send me netmail at 1:325/611 or perricone@wsyd.com. If you really want to express appreciation, make a donation to the Nature Conservancy in my name/honor/memory/effigy.