Importing txt data - unstacking
Posted: Thu Jan 16, 2014 3:42 am
Hi,
Im trying to import the OECD STAN database, where the txt file starts as:
Cou|Var|ind|year|value|datanote
AUS|CPNK|0199|1970|680794818590|
AUS|CPNK|0199|1971|718765520049|
...
USA|WAGE|zzz5|2008|368303000000|p
USA|WAGE|zzz5|2009|332853000000|p
when importing this file i tried the command
wfopen(type=text) "..\data\stan_all\data.txt" custom="|" names=(country, variable, industry, time, data) types=(a,a, a, d, f).
However, the industry variable is read as a number (199) and not an industry code. the industry code zzz5 is recorded as na.
Question 1: what is the command for importing this type of text file?
Question 2: what is the code to untsack this file into a pooled workfile? will pageunstack variable country industry time work?
Hope you can help me with this
Sincerely
Thomas
Im trying to import the OECD STAN database, where the txt file starts as:
Cou|Var|ind|year|value|datanote
AUS|CPNK|0199|1970|680794818590|
AUS|CPNK|0199|1971|718765520049|
...
USA|WAGE|zzz5|2008|368303000000|p
USA|WAGE|zzz5|2009|332853000000|p
when importing this file i tried the command
wfopen(type=text) "..\data\stan_all\data.txt" custom="|" names=(country, variable, industry, time, data) types=(a,a, a, d, f).
However, the industry variable is read as a number (199) and not an industry code. the industry code zzz5 is recorded as na.
Question 1: what is the command for importing this type of text file?
Question 2: what is the code to untsack this file into a pooled workfile? will pageunstack variable country industry time work?
Hope you can help me with this
Sincerely
Thomas