[CQ-Contest] Fun with ADIF

Bill Turner w7ti at ispwest.com
Wed May 7 20:59:25 EDT 2003


In the last couple of days I've learned more about the ADIF format
than I ever wanted to know, but I did learn that it is a powerful tool
for cleaning up your log if needed.  

Over the years I have imported a lot of contest QSOs where the QTH was
part of the exchange.  To import the contest log into the regular
station log I use the ADIF format.  One problem is that some contests
categorize a state as a QTH and not a state, which will cause you to
not get credit for that state in your regular log.

That can be fixed using ADIF, either before importing the contest log,
or (miracle of miracles) even after you have already imported it!
Here's a brief summary of how.  

ADIF classifies each log entry using the format explained at
http://www.hosenose.com/adif/adif.html  For a state, the correct
format is <STATE:2> followed by the state abbreviation.  For example:
<STATE:2>CA.  Where things go wrong is when the contest logging
programs exports it as <QTH:2>CA.  This is NOT a bug in the contest
program; it's just that the contest does not discriminate between QTHs
that are states, provinces, countries or whatever.  

With me so far?  If the QSOs are already in your regular log, export
them to an ADIF file and do the following procedure.  If you haven't
imported them yet, just to the procedure on the to-be-imported file.

The way to fix errors is to use the find and replace function in your
text editor.  Just find <QTH:2>CA and replace it with <STATE:2>CA.
You have to do this 50 times unfortunately, once for each state, but
it doesn't take all that long.  Perhaps someone could write a script
that would do this in one fell swoop?  Or maybe that's already been
done?  Keep track of the states while you're doing this so you don't
miss any.  http://www.50states.com/tools/thelist.htm has a list of
states you can print and check them off as you do them.

Then just import (or re-import) the ADIF file back into your log and
now all your states will show correctly.  This is also useful for
errors other than states, of course.

If you use NotePad for editing, be aware that some older versions of
NotePad are limited as to the size of file they can load.  If you get
an error message stating the file is too large, use WordPad instead.
WordPad has no such limitation.  DON'T use a word processor such as
Word or WordPerfect - unless you save correctly, they will insert
control characters which are not needed and may foul up the ADIF file.

Even if you don't find any errors in the states, it's worth exporting
and re-importing anyway, because other errors may show up.  I use both
LogWindows and DXKeeper, and when either one detects a problem, an
error file is generated.  I had about a dozen errors which had crept
in over the years and was able to fix them all.  It's nice to know
your log is in perfect shape.

Hope this helps somebody.  I picked up dozens of band-states and now
just need 4 more on 80 for 5BWAS.  You may already have 5BWAS and not
know it!

-- 
Bill, W7TI



More information about the CQ-Contest mailing list