[Xastir] FCC lookup

Tom Russo russo at bogodyn.org
Thu Jul 12 15:14:48 EDT 2007


On Thu, Jul 12, 2007 at 11:48:31AM -0700, we recorded a bogon-computron collision of the <archer at eskimo.com> flavor, containing:
> On Thu, 12 Jul 2007, Earl Needham via Kubuntu wrote:
> 
> > 	Can it be something simple that I'm doing wrong?
> 
> At this point it seems more likely that there's something wrong with
> Xastir's parsing of some of the lines as it creates the index.  It's
> possible that the original file may have some corrupt lines or they
> changed the format on us.
> 
> Like I said, my searches here on that callsign work fine, but it's
> not the latest database.

That has happened before.  The FCC sometimes put extra carriage returns or 
other stuff into the database lines in random places, and it broke the sorting
technique that our script does.

I am too busy at work now to download the file and experiment, and at home
I'm on dialup so downloading the 60MB file is not an option (at least not
right away).  So you'll have to dig through your database to see what's
wrong.

One could go through the EN.dat file before and after sort to see
what got messed up (if anything did).  An easy quick check would be to extract
the full EN.dat file from the FCC database (manually, not through our
fcc-get script) and compare its size to the EN.dat that results from our sort.
If something busted the sizes would be different.

Another quick check that's even quicker is to see if every line begins with
"EN|" --- as I recall, once upon a time when the sort got busted, the post-sort
file was completely off and lines were broken where they shouldn't have been.
So try this:

   grep -v '^EN' /usr/local/share/xastir/fcc/EN.dat

If the file has broken lines, this will print something.  If all the lines 
begin with "EN" as they're supposed to then it will print nothing at all.

Another quick thing to check is to see if the entry you're looking for is 
corrupted.  To do that, just use "awk" to pull out the line:

  awk -F'|' '$5=="W5ROY"{print}' /usr/local/share/xastir/fcc/EN.dat 

This checks to see if it can find a line with W5ROY in the appropriate call sign
field of a properly formatted line (whereas grep will just do a case-insensitive
search for the pattern *anywhere* in the file).  If you get a line:
 EN|1060361|||W5ROY|L|L00138867|Creiglow, Roy A|Roy|A|Creiglow|||||208 Merrill Dr|Clovis|NM|88101|||000|0003121316|I|||
then something else is wrong, but if you see anything else (or nothing at all)
then the file is corrupted.

-- 
Tom Russo    KM5VY   SAR502   DM64ux          http://www.swcp.com/~russo/
Tijeras, NM  QRPL#1592 K2#398  SOC#236 AHTB#1 http://kevan.org/brain.cgi?DDTNM
"And, isn't sanity really just a one-trick pony anyway? I mean all you get is
 one trick, rational thinking, but when you're good and crazy, oooh, oooh,
 oooh, the sky is the limit!"  --- The Tick



More information about the Xastir mailing list