|
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: manipulating macro from dir extended_fcn
From |
"Carlos Eduardo Hernandez Castillo" <[email protected]> |
To |
[email protected] |
Subject |
st: manipulating macro from dir extended_fcn |
Date |
Tue, 18 Sep 2007 11:42:50 -0500 |
Dear statalist community:
I am trying to manipulate the macro resulting from the dir extended_fcn.
However, it is truncated by Stata every time I try to change it. For
example:
. local archivos: dir "`dirdaneechareasmodificados'" files "*.dta"
. display `"`archivos'"'
"7areasa1991.dta" "7areasd2001.dta" "barranquilla.dta" "bogota.dta"
"bucaramanga.dta" "cali.dta" "manizales
.dta" "medellin.dta" "nalech.dta" "nalenh.dta" "ocupados7areas_anual.dta"
"ocupados7areas_trimestral.dta"
"ocupadosnacional_anual.dta" "ocupadosnacional_trimestral.dta"
"ocupadosunificada_anual.dta" "pasto.dta"
"proporcionesnacional.dta" "temp.dta" "totalesbarranquilla.dta"
"totalesbogota.dta" "totalesbucaramanga.
dta" "totalescali.dta" "totalesmanizales.dta" "totalesmedellin.dta"
"totalesnacional.dta" "totalespasto.d
ta"
. global archivos=`"`archivos'"'
. display `"$archivos"'
"7areasa1991.dta" "7areasd2001.dta" "barranquilla.dta" "bogota.dta"
"bucaramanga.dta" "cali.dta" "manizales
.dta" "medellin.dta" "nalech.dta" "nalenh.dta" "ocupados7areas_anual.dta"
"ocupados7areas_trimestral.dta"
"ocupadosnacional_anual.dta" "oc
. local archivos=subinstr(`"`archivos'"',`"""',"",.)
. display `"`archivos'"'
7areasa1991.dta" "7areasd2001.dta" "barranquilla.dta" "bogota.dta"
"bucaramanga.dta" "cali.dta" "manizales.
dta" "medellin.dta" "nalech.dta" "nalenh.dta" "ocupados7areas_anual.dta"
"ocupados7areas_trimestral.dta" "ocupadosnacional_anual.dta" "oc
. local archivos=subinstr(`"`archivos'"',`"""',"",.)
. display `"`archivos'"'
7areasa1991.dta 7areasd2001.dta barranquilla.dta bogota.dta bucaramanga.dta
cali.dta manizales.dta medellin
.dta nalech.dta nalenh.dta ocupados7areas_anual.dta
ocupados7areas_trimestral.dta ocupadosnacional_anual.
dta oc
I would appreciate any help from you regarding this issue. What can I do to
stop it from being truncated? I am using Stata 9.2. Thanks in advance for
your help.
Carlos Eduardo Hern�ndez Castillo
Colombian Ministry of Finance
From: "Carlos Eduardo Hernandez Castillo" <[email protected]>
To: [email protected]
CC: [email protected]
Subject: too many files for dirlist
Date: Mon, 17 Sep 2007 16:37:20 -0500
Dear statalist community:
I have been using dirlist but it seems it has a maximum number of
characters to retrieve in the return macros. For example, in a directory
that contains the following files:
13areas.dta 7areas.dta Barranquilla.dta Bogota.dta Bucaramanga.dta Cali.dta
Cartagena.dta Cucuta.dta Ibague.dta Manizales.dta Medellin.dta Monteria.dta
NalECH.dta NalENH.dta OcupadosNacional.dta Pasto.dta Pereira.dta
Proporciones.dta TotalesNacional.dta
"display r(fnames)" would retrieve:
13areas.dta 7areas.dta Barranquilla.dta Bogota.dta Bucaramanga.dta Cali.dta
Cartagena.dta Cucuta.dta Ibague.dta Manizales.dta Medellin.dta Monteria.dta
NalECH.dta NalENH.dta OcupadosNacional.dta Pasto.dta Pereira.dta
Proporciones.dta TotalesNacional
I have been looking for an alternative to get the names of all the files
but I have not been able to do so, do you have any idea? I am using Stata
9.2. Thanks in Advance.
Carlos Eduardo Hern�ndez Castillo
Colombian Ministry of Finance
_________________________________________________________________
Las mejores tiendas, los precios mas bajos, entregas en todo el mundo,
YupiMSN Compras: http://latam.msn.com/compras/
_________________________________________________________________
MSN Amor: busca tu � naranja http://latam.msn.com/amor/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/