| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | nodelist lookup from command line |
Hi! Richard,
Have you had any luck with any other utils, mate?
On 09 Oct 07 14:01, you wrote to me:
RW> IF you've an idea how it could be done with something from the
RW> collection of bfds utils indeed post it, I'd love to give it a try.
We've had a few dramas this past week and I'm short of time, all the time.
So, I'll offer these comments on my contemplations on the matter thus far.
These are only 5 Fidonet zones effectively these days, numbered 1->5, so
the zone 6 ZC entry could be used as an 'end of data' marker, since there
are no nodes listed for the zone. I've done some research with the current
nodelist (#278) and have found that there are 309 nets, numbered from
102->904. However there are 6 duplicates +/- 1 (none within the same
zone, luckily). Hence the use of a temp "zonefile" herewith,
thus ensuring no dupes would be encountered...
-----88-----
Pseudocode:
-----------
INPUT BATCH.FILENAME TARGET.ADDRESS NODELIST.FILE
BEGIN
IF NODELIST.FILE DOESN'T EXIST
WE HAVE AN ERROR CONDITION
ELSE
SEPARATE THE [ZONE]:[NET]/[NODE] ELEMENTS FROM THE TARGET.ADDRESS
IF ([ZONE] LESS THAN 1 -OR- GREATER THAN 5)
-OR- ([NET] LESS THAN 100 -OR- GREATER THAN 999)
WE HAVE AN ERROR CONDITION
ELSE
CREATE "ZONEFILE" FROM NODELIST.FILE
USE THE "ZONEFILE"
IF TARGET [NET] DOESN'T EXIST
WE HAVE AN ERROR CONDITION
ELSE
PROCESS EACH LINE IN THE "ZONEFILE"
IF THIS IS THE TARGET [NODE]
READ THE NODELIST ENTRY'S DETAILS
SET A TARGET.ADDRESS FOUND FLAG TO TRUE
ELSE
BUMP A LINE COUNTER
ENDIF
LOOP UNTIL WE FIND THE NEXT NET -OR- TARGET.ADDRESS FOUND
-OR- WE RUN OUT OF LINES
ENDIF
END (USE)
DELETE THE "ZONEFILE"
ENDIF
ENDIF
IF TARGET.ADDRESS FOUND
OUTPUT THE NODE'S DETAILS
ENDIF
IF WE HAVE AN ERROR CONDITION
OUTPUT ERROR MESSAGE
ENDIF
END
-----88-----
(N.B I've chopped some of the P-code to get it to fit in the editor, so if
there's some inconsistancy then... it's may fault anyway. :)
Is there a faster way to achieve the goal? Maybe. But we're talking about
batch stuff so we're stuck with linear searches, etc. I've laid out the
P-code to take advantage of DOS's 'find' command, twice. Still, the
slowest processes will be the creation of a zonefile, and, then the final
search through it looking at net/node entries. I still envisage a run-time
of maybe 30-40 seconds on my 500Mhz machine (watch for the run-time to
double and add a half again, in real life :).
If you have any thoughts on a final version, please let me know. I'll get
started on the batch next week.
Cheers,
Paul.
... Move your vowels every day or you'll get consonated.
--- GoldED+/LNX 1.1.5-31012
* Origin: Quinn's Post - Maryborough, Queensland, OZ (3:640/384)SEEN-BY: 10/1 3 14/300 400 34/999 90/1 106/1 120/228 123/500 134/10 140/1 SEEN-BY: 222/2 226/0 229/4000 236/150 249/303 261/20 38 100 1381 1404 1406 SEEN-BY: 261/1410 1417 1418 266/1413 280/1027 320/119 393/68 633/104 260 262 SEEN-BY: 633/267 285 690/682 734 712/848 800/432 801/161 189 2222/700 2320/105 SEEN-BY: 2320/200 2800/18 2905/0 @PATH: 640/384 954 774/605 123/500 261/38 633/260 267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.