creating QIF file under Dos using AWK

AC gnucash at acarver.net
Mon Mar 9 03:44:43 EDT 2015


On 2015-03-08 23:44, Michael DeBusk wrote:
> On Sun, Mar 8, 2015 at 7:23 PM, AC <gnucash at acarver.net> wrote:
> 
>>> Is it desirable to have "!Type:Bank" in each entry? AFAIK, it belongs
>>> only at the top of the file.
>>
>> According to the QIF file format information link that is provided in
>> the Gnucash wiki (the link goes to Wikipedia:
>> http://en.wikipedia.org/wiki/QIF) it is required on each transaction.
>> If not then that isn't clear from the samples.
> 
> Now I'm confused.
> 
> Here's a wayback machine link to the original QIF spec, no longer on
> Intuit's Web site:
> http://web.archive.org/web/20100222214101/http://web.intuit.com/support/quicken/docs/d_qif.html
> 
> Under the heading of "Required File Formatting," it says, "When
> Quicken exports an account register or list, it adds a line to the top
> of the file that identifies the type of account or list. Listed below
> are the header lines Quicken adds to the exported files:" It goes from
> there to give a table of header lines
> 
> I've never gotten an error message about this. I can assume you have
> never gotten one, either, doing it as you do.
> 

No idea, I don't use QIFs and I never import data.  I just happen to
write lots of awk scripts (for non-Gnucash purposes) on a regular basis
so I took what was requested (awk script to convert CSV to QIF) and then
followed the exact example listed in the Wikipedia page to generate the
output.  That's why I mentioned that if the type is supposed to be only
a single file header it is not clear from the Wikipedia page which
quotes the QIF spec but then turns around and posts an example
containing the type header per transaction.

If it really is supposed to be just a file header then it's just a
matter of moving the single print statement with the type identifier
from the main block up to the BEGIN block in the script.


More information about the gnucash-user mailing list