ADIF Import: use STATE field for regional Administrative subdivisions

Need help? - Post here and we will find a solution for you.
Locked
hb9cat
Advanced Class
Posts: 39
Joined: 12 May 2014, 05:57

ADIF Import: use STATE field for regional Administrative subdivisions

Post by hb9cat »

All,

what I'm really trying to do is importing the ADIF log of a Swiss contest where every QSO exchange includes the "Canton", i.e. a Regional Identifier specific to Switzerland. There are Awards bound to that.

According to the ADIF 3.0.8 specs, the "STATE" QSO Field has a Data Type "Enumeration", and the values are the "Primary Administrative Subdivisions", as listed in III.B.11 of the Standard.
These Subdivisions are specific to the country and are fully listed in the Standard, including Switzerland

So I edited the ADIF file to be imported to list the Swiss Canton in the "STATE" field, example:
...<MODE:3>SSB <CALL:5>HB9EI <RST_SENT:2>59 <RST_RCVD:2>59 <SRX:3>001 <OPERATOR: 6>HB9CAT <STATE:2>TI <EOR>

No error was generated during the import, but I don't see any Canton in the "State" field of the log

Am I doing anything wrong or is the software only importing the State for US stations ?

73
Marco HB9CAT
User avatar
DF5WW
Log4OM Alpha Team
Posts: 2031
Joined: 02 May 2013, 09:49
Location: Kraam, Rhineland Palatinate, Germany
Contact:

Re: ADIF Import: use STATE field for regional Administrative subdivisions

Post by DF5WW »

Hello Marco,

Log4OM strictly using the ADIF standard and the "State" field is only for US state and/or canadian provinces.

;) ;)
73´s .. Juergen ... ALT-512 SDR (10W) , 50 m random wire at SG-211 autotuner, 2 x Xiegu G90 (20W HF TRX) one as portable Radio. Also TS-790E (40 W) for VHF/UHF with X-50 vertical and Duoband 4-Element LPDA.
User avatar
G4POP
Log4OM Alpha Team
Posts: 10753
Joined: 21 Jan 2013, 14:55
Location: Burnham on Crouch, Essex UK

Re: ADIF Import: use STATE field for regional Administrative subdivisions

Post by G4POP »

Marco,
Clearly there is something wrong with the file your trying to import, I just made an ADIF export from Swisslog and also from DXLabs suite with state included, I then imported those files into Versions 1 and 2 of Log4OM and in both cases the state (TI) was displayed.

I then exported those QSO's from Log4OM Versions 1 and 2 as an ADIF file, when viewed in ADIF master and note pad both included the correct state information.

See this composite screen shot showing the Log4OM version 1 and 2 recent QSO records and also the ADIFMaster result


Untitled.jpg
Untitled.jpg (146.28 KiB) Viewed 5583 times
Here is the exported ADIF data

#++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Log4OM by IW3HMH version 1.40.0.0
# https://www.log4om.com
# created: 28/12/2019 22:57:49 UTC
#++++++++++++++++++++++++++++++++++++++++++++++++++++++

<ADIF_VERS:5>3.0.4 <PROGRAMID:6>Log4OM <PROGRAMVERSION:8>1.40.0.0 <eoh>

<ADDRESS:48>P.O. BOX 216
CH-6802 RIVERA (TI)
Switzerland <A_INDEX:1>3 <ANT_AZ:3>132 <ANT_PATH:1>S <STATE:2>TI <BAND:3>20m <CALL:5>HB9EI <CONT:2>EU <COUNTRY:11>Switzerland <CQZ:2>14 <DISTANCE:3>850 <DXCC:3>287 <EQSL_QSL_RCVD:1>N <EQSL_QSL_SENT:1>N <GRIDSQUARE:6>JN46KD
73 Terry G4POP
User avatar
G4POP
Log4OM Alpha Team
Posts: 10753
Joined: 21 Jan 2013, 14:55
Location: Burnham on Crouch, Essex UK

Re: ADIF Import: use STATE field for regional Administrative subdivisions

Post by G4POP »

DF5WW wrote: 28 Dec 2019, 23:03 Hello Marco,

Log4OM strictly using the ADIF standard and the "State" field is only for US state and/or canadian provinces.

;) ;)
Not strictly true we handle all states and prefectures and listed in ADIF 3.10
73 Terry G4POP
hb9cat
Advanced Class
Posts: 39
Joined: 12 May 2014, 05:57

Re: ADIF Import: use STATE field for regional Administrative subdivisions

Post by hb9cat »

Indeed Terry,

the standard defines the state as being a function of the DXCC field's value, there are enumerations for the following countries (not just U.S.):

Enumeration for Country Code 1 (Canada)
Enumeration for Country Code 5 (Aland Is.)
Enumeration for Country Code 6 (Alaska)
Enumeration for Country Code 15 (Asiatic Russia)
Enumeration for Country Code 21 (Baleric Is.)
Enumeration for Country Code 27 (Belarus)
Enumeration for Country Code 29 (Canary Is.)
Enumeration for Country Code 32 (Cetua & Melilla)
Enumeration for Country Code 50 (Mexico)
Enumeration for Country Code 54 (European Russia)
Enumeration for Country Code 61 (Franz Josef Land)
Enumeration for Country Code 100 (Argentina)
Enumeration for Country Code 108 (Brazil)
Enumeration for Country Code 110 (Hawaii)
Enumeration for Country Code 112 (Chile)
Enumeration for Country Code 126 (Kaliningrad)
Enumeration for Country Code 132 (Paraguay)
Enumeration for Country Code 137 (Republic of Korea)
Enumeration for Country Code 138 (Kure Island)
Enumeration for Country Code 144 (Uruguay)
Enumeration for Country Code 147 (Lord Howe Is)
Enumeration for Country Code 148 (Venezuela)
Enumeration for Country Code 149 (Azores)
Enumeration for Country Code 150 (Australia)
Enumeration for Country Code 151 (Malyj Vysotskij)
Enumeration for Country Code 153 (Macquarie Is)
Enumeration for Country Code 163 (Papua New Guinea)
Enumeration for Country Code 170 (New Zealand)
Enumeration for Country Code 177 (Minami Torishima)
Enumeration for Country Code 192 (Ogasawara)
Enumeration for Country Code 206 (Austria)
Enumeration for Country Code 209 (Belgium)
Enumeration for Country Code 212 (Bulgaria)
Enumeration for Country Code 214 (Corsica)
Enumeration for Country Code 221 (Denmark)
Enumeration for Country Code 224 (Finland)
Enumeration for Country Code 225 (Sardinia)
Enumeration for Country Code 227 (France)
Enumeration for Country Code 230 (Fed. Rep. Of Germany)
Enumeration for Country Code 239 (Hungary)
Enumeration for Country Code 245 (Ireland)
Enumeration for Country Code 248 (Italy)
Enumeration for Country Code 256 (Madeira Is.)
Enumeration for Country Code 263 (Netherlands)
Enumeration for Country Code 269 (Poland)
Enumeration for Country Code 272 (Portugal)
Enumeration for Country Code 275 (Romania)
Enumeration for Country Code 281 (Spain)
Enumeration for Country Code 284 (Sweden)
Enumeration for Country Code 287 (Switzerland)
Enumeration for Country Code 288 (Ukraine)
Enumeration for Country Code 291 (United States)
Enumeration for Country Code 339 (Japan)
Enumeration for Country Code 375 (Philippines)
Enumeration for Country Code 497 (Croatia)
Enumeration for Country Code 503 (Czech Republic)
Enumeration for Country Code 504 (Slovak Republic)


Marco HB9CAT
hb9cat
Advanced Class
Posts: 39
Joined: 12 May 2014, 05:57

Re: ADIF Import: use STATE field for regional Administrative subdivisions

Post by hb9cat »

Thank you Terry,

you're right, using STATE does indeed work:
- I cleared an undeeded _space_ in my file
- Imported the file: no change to the existing records
- delete all those records from the Database
- imported: it works, I do the the STATE field filled in correctly

Which raises another concern: doesn't re-importing of the same records with a slight change update the records in the Database ?

Thanks
Marco HB9CAT

G4POP wrote: 28 Dec 2019, 23:14 Marco,
Clearly there is something wrong with the file your trying to import, I just made an ADIF export from Swisslog and also from DXLabs suite with state included, I then imported those files into Versions 1 and 2 of Log4OM and in both cases the state (TI) was displayed.

I then exported those QSO's from Log4OM Versions 1 and 2 as an ADIF file, when viewed in ADIF master and note pad both included the correct state information.

See this composite screen shot showing the Log4OM version 1 and 2 recent QSO records and also the ADIFMaster result



Untitled.jpg

Here is the exported ADIF data

#++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Log4OM by IW3HMH version 1.40.0.0
# https://www.log4om.com
# created: 28/12/2019 22:57:49 UTC
#++++++++++++++++++++++++++++++++++++++++++++++++++++++

<ADIF_VERS:5>3.0.4 <PROGRAMID:6>Log4OM <PROGRAMVERSION:8>1.40.0.0 <eoh>

<ADDRESS:48>P.O. BOX 216
CH-6802 RIVERA (TI)
Switzerland <A_INDEX:1>3 <ANT_AZ:3>132 <ANT_PATH:1>S <STATE:2>TI <BAND:3>20m <CALL:5>HB9EI <CONT:2>EU <COUNTRY:11>Switzerland <CQZ:2>14 <DISTANCE:3>850 <DXCC:3>287 <EQSL_QSL_RCVD:1>N <EQSL_QSL_SENT:1>N <GRIDSQUARE:6>JN46KD
User avatar
G4POP
Log4OM Alpha Team
Posts: 10753
Joined: 21 Jan 2013, 14:55
Location: Burnham on Crouch, Essex UK

Re: ADIF Import: use STATE field for regional Administrative subdivisions

Post by G4POP »

Re-import will ignore those qso's because they will be seen as dupes

Delete the qso's imported and then re-import
73 Terry G4POP
User avatar
G4POP
Log4OM Alpha Team
Posts: 10753
Joined: 21 Jan 2013, 14:55
Location: Burnham on Crouch, Essex UK

Re: ADIF Import: use STATE field for regional Administrative subdivisions

Post by G4POP »

hb9cat wrote: 29 Dec 2019, 08:43 Indeed Terry,

the standard defines the state as being a function of the DXCC field's value, there are enumerations for the following countries (not just U.S.):

Enumeration for Country Code 1 (Canada)
Enumeration for Country Code 5 (Aland Is.)
Enumeration for Country Code 6 (Alaska)
Enumeration for Country Code 15 (Asiatic Russia)
Enumeration for Country Code 21 (Baleric Is.)
Enumeration for Country Code 27 (Belarus)
Enumeration for Country Code 29 (Canary Is.)
Enumeration for Country Code 32 (Cetua & Melilla)
Enumeration for Country Code 50 (Mexico)
Enumeration for Country Code 54 (European Russia)
Enumeration for Country Code 61 (Franz Josef Land)
Enumeration for Country Code 100 (Argentina)
Enumeration for Country Code 108 (Brazil)
Enumeration for Country Code 110 (Hawaii)
Enumeration for Country Code 112 (Chile)
Enumeration for Country Code 126 (Kaliningrad)
Enumeration for Country Code 132 (Paraguay)
Enumeration for Country Code 137 (Republic of Korea)
Enumeration for Country Code 138 (Kure Island)
Enumeration for Country Code 144 (Uruguay)
Enumeration for Country Code 147 (Lord Howe Is)
Enumeration for Country Code 148 (Venezuela)
Enumeration for Country Code 149 (Azores)
Enumeration for Country Code 150 (Australia)
Enumeration for Country Code 151 (Malyj Vysotskij)
Enumeration for Country Code 153 (Macquarie Is)
Enumeration for Country Code 163 (Papua New Guinea)
Enumeration for Country Code 170 (New Zealand)
Enumeration for Country Code 177 (Minami Torishima)
Enumeration for Country Code 192 (Ogasawara)
Enumeration for Country Code 206 (Austria)
Enumeration for Country Code 209 (Belgium)
Enumeration for Country Code 212 (Bulgaria)
Enumeration for Country Code 214 (Corsica)
Enumeration for Country Code 221 (Denmark)
Enumeration for Country Code 224 (Finland)
Enumeration for Country Code 225 (Sardinia)
Enumeration for Country Code 227 (France)
Enumeration for Country Code 230 (Fed. Rep. Of Germany)
Enumeration for Country Code 239 (Hungary)
Enumeration for Country Code 245 (Ireland)
Enumeration for Country Code 248 (Italy)
Enumeration for Country Code 256 (Madeira Is.)
Enumeration for Country Code 263 (Netherlands)
Enumeration for Country Code 269 (Poland)
Enumeration for Country Code 272 (Portugal)
Enumeration for Country Code 275 (Romania)
Enumeration for Country Code 281 (Spain)
Enumeration for Country Code 284 (Sweden)
Enumeration for Country Code 287 (Switzerland)
Enumeration for Country Code 288 (Ukraine)
Enumeration for Country Code 291 (United States)
Enumeration for Country Code 339 (Japan)
Enumeration for Country Code 375 (Philippines)
Enumeration for Country Code 497 (Croatia)
Enumeration for Country Code 503 (Czech Republic)
Enumeration for Country Code 504 (Slovak Republic)


Marco HB9CAT
That is what I just stated
73 Terry G4POP
hb9cat
Advanced Class
Posts: 39
Joined: 12 May 2014, 05:57

Re: ADIF Import: use STATE field for regional Administrative subdivisions

Post by hb9cat »

For DXlog.net users: adding this

ADIF_KEYS=STATE;$VALUE.RecInfo.Substring(0,2)

to the contest definitions file will create the STATE entry in the ADIF file, it can then be imported into Log4OM

Marco HB9CAT
Locked