QIF Import omits nearly identical transactions

General Discussions and Announcements

QIF Import omits nearly identical transactions

Postby noahr » Sun Jul 10, 2011 3:51 pm

The short background is I would like to switch over to MyMoney from Quicken 2006 for Mac. With the upcoming OS 10.7 release, Quicken 2006 compiled for PowerPC architecture will no longer run and Intuit has demonstrated zero interest in providing quality financial software for their Mac users. I have about ten years worth of banking and investment account data that I would like to move to MyMoney.

So, I gave My Money a trial run today and ran into an issue where not all transactions are imported. These are transactions where the dollar amount is the same, the transaction description is the same, and often the category or transfer account is the same.
I did some investigating and found an earlier forum post reporting this or a very similar issue, giving me one idea.

I checked the QIF file contents; the similar transactions do show up as separate entries.
I turned off 'Data Matching' in Preferences -> Import/Export and then tried again from a new My Money file and new QIF Import. The observed behavior was the same as far as I can tell. I found examples of lots of missing transactions that were not imported from the QIF where another similar transaction existed on or about the same day.

Why should duplicate transaction removal ever be the normal behavior upon importing a QIF file?

Am I selecting the correct settings to turn off this behavior? What else can I try to import successfully?
Here are the settings I tried to disable duplicate matching:
matching disabled.jpg
Settings attempting to disable duplicate matching
matching disabled.jpg (115.49 KiB) Viewed 14816 times

And the original settings:
default settings.tiff
Default Import Settings for reference
default settings.tiff (176.5 KiB) Viewed 14816 times


Here are a couple of excerpts from my QIF file that show similar transactions where only one transaction is making it through the MyMoney import:
Code: Select all
D6/11/02
PRichmond Commonwealth Bank
MAtm ($A 20)
T-11.52
A
A
A
A
A
A
C*
LVacation
^
D6/11/02
PRichmond Commonwealth Bank
MAtm ($A 20)
T-11.52
A
A
A
A
A
A
C*
LVacation
^
D6/11/02
PRichmond Commonwealth Bank
MAtm ($A 20)
T-11.52
A
A
A
A
A
A
C*
LVacation


Code: Select all
D1/31/11
PInternet Transfer
M50% mortgage
T1,250.00
A
A
A
A
A
A
C*
L[Big Bank Checking]
^
D1/31/11
PInternet Transfer
M50% mortgage
T1,250.00
A
A
A
A
A
A
C*
LAlison:Neutral Money Exchange



Any help would be greatly appreciated, as other than this, I am really liking what I see with MyMoney.
noahr
 
Posts: 3
Joined: Sun Jul 10, 2011 3:25 pm

Re: QIF Import omits nearly identical transactions

Postby mthadm » Sun Jul 10, 2011 9:55 pm

Hello,


The problem with QIF format is that is completely lacks means of identifying a transaction so we have to perform a minimal matching even when its switched off, our data matching algorithm is explained at
http://wiki.mthbuilt.com/Data_Matching_Algorithm

Can you produce and import OFX or QFX files? They are much better suited for data transfers than QIF files, particularly in a large data set case


Thanks,
---
MTH Software

Reminder: MTH Software employees will never ask for the username and password for any of your banking or credit card accounts.
Please do not provide this information when using our contact form.

My Money download page: http://www.mthbuilt.com/download.html
My Money manual: http://wiki.mthbuilt.com/My_Money_2.0_Manual
User avatar
mthadm
Site Admin
 
Posts: 1056
Joined: Mon May 05, 2008 12:58 am

Re: QIF Import omits nearly identical transactions

Postby noahr » Sun Jul 10, 2011 11:13 pm

Quicken 2006 for Mac will only export in QIF so I cannot go directly to OFX.

Since Quicken 2006 nor 2007 will work with the soon-to-be released OS 10.7, I'm motivated to work through this problem. I'm sure there are many other Mac users anxious to find another product solution as well.

I read through your entry on the Data matching algorithm. It makes me wonder if this might work: Write a script to identify similar transactions in my QIF file, then mutate the similar entries in some way such that MyMoney would then import all transactions as unique. The only field that makes sense to modify is the Payee field. Can you suggest a modification that would work as I want? Perhaps appending something like 'UNIQUE_1' 'UNIQUE_2' to each similar transaction on that same date would do the trick. I'm seeking your input though since I don't fully understand the handling of digits in the Payee field.

Another option might be a QIF to OFX converter before importing into MyMoney. Does anyone have any experience with something that does this?
Quicken Essentials for Mac apparently comes with Quicken File Exchange Utility http://quicken.intuit.com/support/articles/getting-started/upgrading-and-conversion/7629.html that will produce .QDFX files. I'm unable to figure out if it is meant to export any other format. Either way, it comes with the software that I do not want to buy. Googling, I also found this converter program for QIF to OFX conversion http://www.bigredconsulting.com/aboutofxwriter.htm. I'm holding off on spending time and money on this route though without some validation.

Can you clarify: Are the Import/Export matching preferences considered when doing a 'Import QIF file'?
noahr
 
Posts: 3
Joined: Sun Jul 10, 2011 3:25 pm

Re: QIF Import omits nearly identical transactions

Postby mthadm » Mon Jul 11, 2011 8:56 am

Hello,


Any of the options would work, i.e. adding a small unique identifier to the payee name or producing OFX/QFX out of QIF will be fine. Please keep in mind that producing QFX out of QIF with a 3rd party software will most likely run into the same problem as the utility will need to parse the QIF file and assign unique identifiers based on your transactions content. The best way of handling this is either to run your payee generation script or produce QFX files from Quicken since internally in can differentiate between transactions. Please note that MyMoney can't handle QDFX format, only text based formats are supported, such as OFX/QFX or permutations of thereof.


Thanks,
---
MTH Software

Reminder: MTH Software employees will never ask for the username and password for any of your banking or credit card accounts.
Please do not provide this information when using our contact form.

My Money download page: http://www.mthbuilt.com/download.html
My Money manual: http://wiki.mthbuilt.com/My_Money_2.0_Manual
User avatar
mthadm
Site Admin
 
Posts: 1056
Joined: Mon May 05, 2008 12:58 am

Re: QIF Import omits nearly identical transactions

Postby noahr » Sat Jul 16, 2011 12:27 am

Well, I have had limited success.

I wrote a simple (and embarrassing ) utility that scans my Quicken 2006 QIF 'all-export' file and appends a unique identifier at the end of the Payee field for transactions that would fall into this case. i.e. real transactions that would not be imported because they look too similar.

I could not attach my source code or binary. Copy and paste from the quote below if interested in trying it.
Compile by
Code: Select all
g++ duplicateDefender.cpp -o duplicateDefender

Run with
Code: Select all
./duplicateDefender "Quicken all export file.qif"

That will produce output.qif.
One way you can diff and compare is:
Code: Select all
diff 'Quicken all export file.qif' output.qif


Its not smooth sailing from here however. As I mentioned, I am trying to move over ten years of transactions in 30 accounts.

I was excited to see the previously mentioned missing transactions were present. The account balances were still not correct.
Ultimately, I had to go through every account scanning around in comparison to my open Quicken register. I found about thirty transfer transactions that appeared twice in the registers and a handful of cases where two similar transaction should exist, but again only one was imported. It was fairly easy, but time consuming, to delete these duplicate transfers. (Easier than typing them in if they had been totally missing.) These remaining problems were not the transactions modified by my utility.

Another big, and unresolved problem remains. My investment account transactions did not import. Basically all I got was the cash transactions. No securities buys / sells, etc. I even tried importing a QIF file with only one investment accounts transactions. No luck. I see that the buys / sells are listed in the QIF file.
Can anyone offer any advice with this problem?

I tried to search the forums myself for help on the investment thing. 'investment import' is too common a search phrase so no luck. Please reduce this sensitivity with the forum back-end. I've seen that error too many times already.


By the way, I am in part embarrassed because so many things could break with my utility if used on a QIF file structured in ways other than what I had right in front of me. Example sensitivities are the order that the D P M T fields appear in a record, where in the file the 'transactions' are listed, and the new line character used. If you try it, I suggest running a diff on the input and output file. Hopefully you only see the desired appends made to similar transactions.
Code: Select all
/**
 * duplicateDefender.cpp
 * Appends unique tag at the end of adjacent similar transactions
 * that might be filtered out by the MyMoney program
 * on import.
 *
 *  Usage:   ./duplicateDefender 'quicken export file.qif'
 *    Will produce a output file: output.qif that has the desired modifications to problematic transactions.
 */

#include <iostream>
#include <fstream>

using namespace std;
const char LINE_SEP_CHAR = '\r';    // Quicken outputs file with cr character, not newline. This little inflexibility with the newline
                    // function could turn out to be quite cripling for usefullness with other programs.

int main(int argc, char* argv[])
{
    for (int i=0; i<argc; i++) {
        cout << "arg " << i << ": " << argv[i] << endl;
    }
    if (argc != 2 )
    {
        cerr << "Expected one input argument, the file name of the QIF file to scan.  If this file has any spaces, inclose the filename in quotes." << endl;
        return -1;
    }
   
    const char * inputFile = argv[1];
   
    ifstream instream;
    instream.open( inputFile );
    if ( ! instream.is_open()  )
    {
        cerr << "Unable to open input file: " << inputFile << endl;
        return -1;
    }
   
    ofstream ostream;
    string outputFile("output.qif");
    ostream.open( outputFile.c_str(), fstream::trunc );
    if ( ! ostream.is_open() )
    {
        cerr << "Unable to open output file: " << outputFile  << endl;
        return -1;
    }
   
    /* scan through the file identifying transaction and saving last date, amount, and payee.
     * Upon finding subsequent matching transactions, permute the subsequent payee by appending
     * unique string to the end of Payee.
     */
   
    string lastPayee, lastAmount, lastDate, lastMemo;
    const int MAX_LINE_LENGTH = 512;
    char lineArray[MAX_LINE_LENGTH];
    int linenumber = 0;
    bool match = false;
    int unique_counter = 0;
    int fieldMatchesThisRecord(0);
    bool startedTransactionSection = false;
    string transactionStartString( "POpening Balance" );
    do {

        linenumber++;
        instream.getline( lineArray, MAX_LINE_LENGTH, LINE_SEP_CHAR ); 
       
        if (! startedTransactionSection) {
            if (transactionStartString == lineArray) {
                startedTransactionSection = true;
            }
        }
        if (startedTransactionSection) {
          switch (lineArray[0]) {
            case 'D':
                if ((lastDate == lineArray) && (strlen(lineArray)>1) ) {
                    //cout << "match " << endl;
                    match = true;
                } else
                {
                    match = false;
                    lastDate = lineArray;
                }
                fieldMatchesThisRecord++;
                break;
            case 'P':
                if ((lastPayee == lineArray)  && (strlen(lineArray)>1)) {
                    //cout << "match " << endl;
                    match = match && true;
                } else
                {
                    match = false;
                    lastPayee = lineArray;
                }
                fieldMatchesThisRecord++;
                break;
            case 'M':
                lastMemo = lineArray;
                break;
            case 'T':
                if ((lastAmount == lineArray)  && (strlen(lineArray)>1)) {
                    //cout << "match " << endl;
                    match = match && true;
                } else
                {
                    match = false;
                    lastAmount = lineArray;
                }
                fieldMatchesThisRecord++;
                /* at this point, we can decide if we should modify the payee field when there is a match, and dump these four fields out to output stream */
                ostream << lastDate << endl;
                if ( match && (fieldMatchesThisRecord == 3) ) {
                    ostream << lastPayee << " UNIQUIFY" << unique_counter++ << endl;
                    cout << "Matched Transaction modified: " << lastDate << "   " << lastPayee << endl;
                }
                else
                    ostream << lastPayee << endl;
                ostream << lastMemo << endl << lastAmount << endl;
               
               
                break;
               
            case '^':
                fieldMatchesThisRecord = 0;
                match = false; // resets for next transaction
                // deliberately continuing to default
            default:
                // for non-critical lines, dump straight to output stream
                ostream << lineArray << endl;
                break;
          }
        }
        else
            ostream << lineArray << endl;
       
        if (instream.fail()) {
            cout << "istream fail detected.  Actually ok at very end of file. " << endl;
        }
    } while ( !instream.eof()  );
   
   
   
   
   
   
   
    instream.close();
   
    return 0;
}
noahr
 
Posts: 3
Joined: Sun Jul 10, 2011 3:25 pm

Re: QIF Import omits nearly identical transactions

Postby mthadm » Sat Jul 16, 2011 9:14 am

Investments transactions are finicky, it could be something that Quicken exports wrong or it could be something that MyMoney isn't importing properly.

Could you please send us a fragment of investment related qif - we will take a look so we know whats going on. Please sanitize the qif, i.e. remove account numbers, names, etc. It is a text file and you can edit it in a text wrangler for example. Please email it to info@mthbuilt.com, once we know whats the issue we will either post a private build so you can confirm the fix or we will post a workaround,


Thanks,
---
MTH Software

Reminder: MTH Software employees will never ask for the username and password for any of your banking or credit card accounts.
Please do not provide this information when using our contact form.

My Money download page: http://www.mthbuilt.com/download.html
My Money manual: http://wiki.mthbuilt.com/My_Money_2.0_Manual
User avatar
mthadm
Site Admin
 
Posts: 1056
Joined: Mon May 05, 2008 12:58 am


Return to General Discussions and Announcements

Who is online

Users browsing this forum: No registered users and 3 guests

cron