Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | "Buzz Burhans" <buzzb3@earthlink.net> |
To | <statalist@hsphsun2.harvard.edu> |
Subject | st: auto-create dictionary file |
Date | Fri, 6 May 2011 12:18:02 -0600 |
I have a large comma delimited text file I need to read into Stata. I need to do this repeatedly with similarly structured files I previously split out from a large master file. The subfiles I need to import are nonetheless large in terms of both number of observations and number of variables. If I -insheet- the file I get a portion of it and then I run out of memory. -insheet- does not allow an -in- option, so I can't restrict the amount it tries to import, and I can't specify the variable types to conserve memory (use of -compress- after the import decreases the file size tremendously). I'd like to use -infile- to take advantage of being able to use -in- and to specify the new variable types. Is there any way to produce a Stata .dct dictionary file automatically, so that I could then modify it for use with -infile- or -infix-, instead of having to create a dictionary from scratch? Using -findit- I found a very old STB program (STB9) called -creatdct- by Bill Gould which automatically creates Stata .dct dictionaries. That program seems to have limitations in terms of file size, and I could not get it to work. It appears that that program was a precursor to later functionality built into the -insheet- and -infile- commands, but I am not aware of a way to get a dictionary file after running those commands. I'm guessing Stat Transfer would work easily here, but this is not a task I have to do often enough to justify owning it, so I'd like to come up with an alternative "manual" method. Thanks for any insights. Buzz Buzz Burhans, Ph.D. Dairy-Tech Group So. Albany, VT / Twin Falls ID Cell: 208-320-0829 ID Fax: 208-735-1289 VT Fax: 802-755-6842 Email: buzzb3@earthlink.net * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/