SwissSys output and input files

Does anyone know of a good source of documentation regarding how to parse and input Swiss Sys files? I have a few tools to get data into the program, but the documentation is sparse on how to use all of the fields in teh program.

Any hints on how to parse these files would be appreciated.

Gregory

You can contact the developer Thad Suits at suits@initco.net .

You’re much better off finding someone who has this in place and copy the master files directly over.

I got it to work by editing column names in foxpro, but it’s been so long ago. There’s a big difference between golden and regular update files in the format.

Using the internal files for either Swis-Sys or WinTD can get tricky, because the developers tend to change those files for their own benefit rather than for the benefit of outside developers, so you have to deal with changes between versions.

That’s why we’re trying to define new import and export files that meet the needs of TDs and the USCF.

In the process we should be able to clean up some of the differences between the gold master format and the bi-monthly update format. (The Gold Master format doesn’t have a field for the game count for a provisional rating, for example.)

cough XML cough :laughing:

XML doesn’t solve the problem, if the problem is that an important field is NOT INCLUDED. (IMHO, that’s what’s wrong with the current rating report export format and both of the rating supplement formats.)

XML is a format for presenting data, not a dictionary of what data is being presented.

Whether it is a good format choice probably boils down more to religion or politics than logic. (When I mentioned XML at the FIDE Technical Commission meeting in June, I was nearly laughed out of the room, possibly because Europeans in general do not consider XML a practical data format.)

I think it is also unreasonable to expect a software author to use XML for his INTERNAL files just because that might make it easier for outsiders to parse them. In fact, the author has NO obligation to document his internal file structures at all.

Swiss Sys supports text files for both input and output, depending on exactly what you are trying to accomplish.

I use what Swiss Sys calls Club Files for importing registration data and for my player database. In spite of their lengthy format, they are very fast, and I have found them to be more reliable and less hassle than custom databases (which have to be in dBase format) or internal files. They can also be used in tandem with the USCF database.

Swiss Sys can export results to delimited text files. I have never used these, but the description is pretty straightforward, and, again, it should be a lot cleaner than trying to deal with undocumented formats.

The SwisSys club file format is probably not as lengthy as an equivalent XML format would be. :slight_smile:

Wouldn’t XML be compressed much more than a dbase file? What about even a comma deliminated file?

I wouldn’t take the europeans laughing at you seriously. After all, it takes FIDE months to rate an event. They’re clearly behind in technology.

Hi all,

I am having a really hard time figuring out the output files.

Here is what I would like to do:

  1. Create pairings by opening up a text file in Swiss Sys that I create from a database. To do this, I need to understand how Swiss Sys handles the pairings.

  2. Do the opposite of 1, that is… take a Swiss Sys output file for the pairings and parse it in order to use my own software to publish the pairings for the match. I need the players ID (entered in the ID field) to be captured, and Swiss Sys does not output this to a text file when you try to export it.

I am not sure if I can get either 1, or do completed, but I will try.

I figured out how to handle players in a club though. To register players you need the following format:

NAME = lastName, FirstName
ID# = 390
RATING = 2291
RTNG2 = 0
CLUB = UMBC
TEAM = UMBC1

However; I would also like to get the ICC handle in there, as well as an email address. What are the custom field names?

Any help would be greatly appreciated :smiley:

I will email Thad too.

Take care,

Gregory

I haven’t seen the latest version of SwisSys yet, but the previous version did not have a lot of ‘custom’ fields.

As to whether dBase is more verbose than XML, here’s a record from the rating supplement update in dBase format. (I’ve put | characters in to indicate the beginning and end of the record since there are spaces involved:

|BONIN,JAY RICHARD          1009832720070131NY2340*  2261*  |

Here’s that same data in XML:

<PLAYER>
<NAME>BONIN,JAY RICHARD</NAME>
<ID>10098327</ID>
<EXP_DATE>20070131</EXP_DATE>
<STATE>NY</STATE>
<REG_RTG>2340*</REG_RTG>
<QUICK_RTG>2261*</QUICK_RTG>
</PLAYER>

The dBase record took up 56 characters, including 14 trailing spaces in fields, the XML version takes up around 170, depending on whether or not you count the line breaks.

Even if I use shorter element names, I think the dBase version will take up fewer characters.

Doing things like splitting the first and last name into separate (and probably hierarchical) elements as well as separating the rating fields into three elements (rating, regular vs provisional, provisional game count), which are things that would be desirable from a data management point of view, would make the record longer.

Note that this is NOT an argument against using XML, I’m just pointing out that saving SPACE is not what it was designed to do.

I’m still not sure if I understand exactly, Gregory, but I’ll give it a shot. If you can create a club file from your database (which will require a small amount of programming to format it correctly), then you can import it to a section in SwissSys (File|Club|Read From Club), and then pair it. SwissSys has predefined field names that it uses, but it will accept (and ignore) any others that you care to include (you can make up your own field names):

NAME = lastName, FirstName
ID# = 390
RATING = 2291
RTNG2 = 0
ICC = 123XYZ
EMAIL = NAME@ABC.COM
CLUB = UMBC
TEAM = UMBC1

The extra fields (ICC and EMAIL in this example) would not be read or understood by SwissSys. They would just be hanging around in your club file for whatever other use you want to make of them. Is that more or less what you want to do?

As far as exporting, if you go to Utilities|Dump to Delimited Textfile, it will dump all of the information it has about each player, one line per player, including the ID field, and all other registration fields, and any game results. There is a formatting option to specify the delimiter.

Bart, I haven’t read the docs on SwisSys in quite a while, does he explicitly say that you can include other fields in club files and they will always be ignored or is that just an assumption on your part?

If the latter, then your suggestion could cause problems with future releases of SwisSys. Even if the former, should Thad decide to include some field (such as Email address) in a future release this could still cause some compatability problems.

My statement about the extra fields was based on a specific test I did in response to Gregory’s question. SwissSys imported a test file correctly without choking on the extra fields. In the past I have inadvertently created files with misspelled keywords with no ill effects (except, of course, that it didn’t read that field).

You’re certainly right, though, Mike. If Thad decided to add other fields in the future it could cause problems, and I should have been more cautious in my reply. It’s always risky to assume anything about a program that’s not documented.

In any event, I’m not sure what advantage there is to having extra fields in the club file, unless you specifically programmed another application to parse them. I may have misunderstood Gregory’s original intent.

Thanks for the feeback guys,

I will post in this thread again when I figure out a solution.

Take care,

Gregory