Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Multiple TXT DATA without var name: how to read. PLEASE HELP
From
statauser2010 <[email protected]>
To
[email protected]
Subject
st: Multiple TXT DATA without var name: how to read. PLEASE HELP
Date
Thu, 14 Oct 2010 18:04:55 -0700 (PDT)
Hi all,
I got a dataset which contains 35 txt files which I need to read, merge them
all together. However, as they are seperated, some files are variable names,
others contain only number. For example:
Example of file with variable names:
"FILE LAYOUT FOR INSTITUTION INFORMATION
DATA DELIMITED BY COMMAS
ALPHANUMERIC VALUES ARE ENCLOSED IN DOUBLE QUOTES
VARIABLE FIELD DEC.
NAME TYPE POS. VARIABLE DESCRIPTION
--------------- ------- ---- --------------------------------------
SYSTEM Numeric 0 System Code
DIST Numeric 0 District Code
ASSOC Numeric 0 Association Code
MONTH Numeric 0 Month of Report
YEAR Numeric 0 Year of Report
UNINUM Numeric 0 System, district, and Association
codes concatenated
SHORTNAME Alphanum. 0 Institution short name
MAIL_ADDR Alphanum. 0 Mailing address
STREET_ADDR Alphanum. 0 Street address
CITY Alphanum. 0 City name
STATE Alphanum. 0 State name
ZIP Alphanum. 0 Zip code"
Another file contains:
"FILE LAYOUT FOR SCHEDULE RC-M OTHER PROPERTY OWNED
ACTIVITY RECONCILEMENT
DATA DELIMITED BY COMMAS
VARIABLE FIELD DEC.
NAME TYPE POS. VARIABLE DESCRIPTION
------------- ------- ---- ---------------------
SYSTEM Numeric 0 System Code
DIST Numeric 0 District Code
ASSOC Numeric 0 Association Code
MONTH Numeric 0 Month of Report
YEAR Numeric 0 Year of Report
UNINUM Numeric 0 System, District, and Association
codes concatenated
ACQPROPBBAL Numeric 0 Other Property Owned-Beginning Balance
TRANSACQPROPT Numeric 0 Gross Amounts Transferred in from
Other Property Owned
ACQPROPDEP Numeric 0 Amounts Depreciated on Other
Property Owned
ACQPROPDISP Numeric 0 Properties Disposed of
CHGOFFACQPROP Numeric 0 Net chargeoffs/write-ups on Other
Property Owned
OACQPROP Numeric 0 Other - Other Property Owned
ACQPROP Numeric 0 Other Property Owned-Ending Balance"
etc,
One example of file with number only:
"4, 9, 3,03,2000, 409003, 0, 0, 0, 0, 0, 0, 0, 0, 0,, 0, 0, 0, 0, 0,, 0,
95557, 5514, 0, 0
4, 9, 4,03,2000, 409004, 0, 0, 0, 0, 0, 0, 0, 0, 0,, 0, 0, 0, 0, 0,, 0,
20406, 466, 0, 0
4, 9, 11,03,2000, 409011, 0, 0, 0, 0, 0, 0, 0, 0, 0,, 0, 0, 0, 0, 0,, 0,
24365, 2432, 0, 0
4, 9, 21,03,2000, 409021, 0, 0, 0, 0, 0, 0, 0, 0, 0,, 0, 0, 0, 0, 0,, 0,
6992, 208, 0, 0
4, 9, 24,03,2000, 409024, 0, 0, 0, 0, 0, 0, 0, 0, 0,, 0, 0, 0, 0, 0,, 0,
10691, 1018, 0, 0
4, 9, 26,03,2000, 409026, 0, 0, 0, 0, 0, 0, 0, 0, 0,, 0, 0, 0, 0, 0,, 0,
35608, 870, 0, 0
4, 9, 34,03,2000, 409034, 277, 0, 0, 0, 0, 0, 0, 0, 0,, 0, 0, 0, 0, 0,, 0,
13381, 341, 0, 0
4, 9, 42,03,2000, 409042, 0, 0, 0, 0, 0, 0, 0, 0, 0,, 0, 0, 0, 0, 0,, 0,
34010, 1242, 0, 0
4, 9, 45,03,2000, 409045, 0, 0, 0, 0, 0, 0, 0, 0, 0,, 0, 0, 0, 0, 0,, 0,
14353, 794, 0, 0
4, 9, 48,03,2000, 409048, 0, 0, 0, 0, 0, 0, 0, 0, 0,, 0, 0, 0, 0, 0,, 0,
64705, 2268, 0, 0"
Could anyone tell me how to:
1) which command to read file which contains variable names only ( example
1)?
2) how to know which variable to use for each number in file with number (
example 3), I have about 18 files which contain number only, the rest of
them contains variable? FYI: All those files are from a banking call report.
Thanks so much for your help.
--
View this message in context: http://statalist.1588530.n2.nabble.com/Multiple-TXT-DATA-without-var-name-how-to-read-PLEASE-HELP-tp5637336p5637336.html
Sent from the Statalist mailing list archive at Nabble.com.
*
* 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/