How to make .dtb files for Win-Test .dtb files are used in Win-Test to populate the exchange field automatically once the call-sign in typed in. Suitable contests for this feature would be the IARU contest (HQ exchanges), IOTA, FOC marathon etc. Note that CQ and ITU zones are normally picked up from the country file. Making .dtb files isn’t very well documented in the Win-Test on-line help but I have found the easiest way to do it with a Windows operating system as follows:

Install GAWK. GAWK is a UNIX text manipulation program, however it is now available for use on Windows. It needs downloading from here: http://gnuwin32.sourceforge.net/packages/gawk.htm – note that there is other stuff there too, which can be ignored. Its just the gawk.exe Windows binary file that we need – put it into a new directory somewhere e.g. c:/gawk

Download the Format File.  Copy the text file called ‘txt2dtb.awk’ into the same directory as above. This file defines the format of the .dtb file.

Download txt2dtb.awk from here.

Create the input text file (‘FileIn.txt’)

Here are two ways of creating the input file.

METHOD A) If you are starting from scratch (i.e. not using someone else’s list), simply create a text file (‘FileIn.txt’) with tab separated values (call-sign, exchange)  and a new record on each line. Be careful not to enter any spaces after the call-sign or the exchange. Then skip to Create the output .dtb file.

METHOD B) If you have sourced your data from elsewhere, it is best to clean the data first:

1. Using the exchange data you want to use for the contest, create an Excel spreadsheet file.  See Figure 1 below for an example.

2. It is important that there are NO hidden characters, unwanted spaces, tabs etc. in the data. These can sometimes come about if you have imported the data into Excel from a text file. To cleanse the data, use the Excel CLEAN() function on the data. See Figure 2. Set cell C1 to ‘=Clean(A1)’ and Cell D1 to ‘=Clean(B1)’. Cells C1 and D1 will display the contents of A1 and B1 but stripped of any invisible, unwanted characters.

3. Highlight cell C1 and click on the bottom right hand corner. This will copy the CLEAN function in cell C1 right down to the bottom of the list of values in B1. Do the same for cell D1.

4. Columns A to D will now be populated, however only columns C and D contain a display of the ‘clean’ data. We now need to extract that clean data: a) highlight all the data in columns C and D… b) ‘Copy’ (Ctrl-C)…. c) Now perform ‘Paste Special (Values Only) to copy the data back to columns A and B, overwriting the previous contents.

5. Columns A and B now contain the ‘clean’ values that are displayed in columns C and D. Now delete columns C and D.

6. Finally, save the Excel file as a tab-delimited text file, naming it FileIn.txt (that’s the name used in this example but you can use anything .txt). It must go into the same directory as the files created in the previous steps. 7. Your text input file for the .dtb file creation is now ready.

Create the output .dtb file In the following example I am using the FileIn.txt file created above to make an itu.dtb file.

1. Open a DOS command window (type CMD in the start menu or on the Windows 8 user interface) and CD (change directory) to the directory containing gawk.exe, FileIn.txt and txt2dtb.awk. For example, the CD command I use is as follows: ‘cd C:\Users\John\Dropbox\GAWK’ (you can see now why it’s best to use a high level directory for this!). 2. Run the following command: “gawk -f txt2dtb.awk FileIn.txt > itu.dtb” – where txt2dtb.awk is the name of the Format File created earlier, FileIn.txt is the name of the input data, itu.dtb is the name of the output file. Refer to Win-Test documentation to determine what the correct file-name is for the contest you are entering.

Check the .dtb file

1. Install the .dtb file  into the /databases directory.

2. Reload Win-Test.

3. Make sure that you are in the correct contest type for the .dtb file-name being used.

4. It will automatically populate the exchange field when the call-sign is typed into the log.

—- Please feel free to contact me if you have any questions. John Warburton, July 2013 (Updated July 2014)