Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: basic string operations

From   Ronnie Babigumira <[email protected]>
To   [email protected]
Subject   Re: st: basic string operations
Date   Mon, 17 Apr 2006 10:18:43 +0200

Some helpful pointers
- Please mention OS and version of Stata

- Include the exact command you typed and error you got (I say this because I notice that in the code below you are using "-inflie-" and I think what you actually typed -infile-. You also say that the code bails out in the -insheet- loop but I cant see that loop in the code you show below).

Finally, your problem might be an issue with the slashes, try changing the last back slash to a forward slash

"C:\Program Files\ .......\Dict/file.dct"

Alexander Nervedi wrote:


I have a dictionary in a set of folders and data in another folder.

global dict "C:\Program Files\ .......\Dict"
global data "C:\Program Files\ .......\Data"
gloabl filename "file2 ... file 200"

Now I need to place a call like

inflie "C:\Program Files\ .......\Dict\file.dct", using("C:\Program Files\ .......\Data\file1.raw"
tempfile data
save "`data'"

for file in `filename'{

inflie "'$dict`$file.dct' ", using(" $data'$var' ")
append "`data'"


the code keeps bailing at the for loop insheet saying it cant chaneg directories. is there a neat way of specifying directory changes with two strings ?

any help would be really great. i have been banging my head on this for a bit.


Express yourself instantly with MSN Messenger! Download today - it's FREE!

* For searches and help try:

*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index