Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: STATA error r(603) File could not be opened - Dropbox

From   David Fredericks <>
Subject   st: STATA error r(603) File could not be opened - Dropbox
Date   Sat, 16 Feb 2013 14:11:26 +0700


I have  started another thread but a couple of people have posted
about file errors when trying to saving files - and I cant find the
appropriate place to respond.
I have been having this problem too and seem to have found a solution

I am running STATA MP11 on an Asus I7 laptop.  My internet connection
is slow (very slow!!).  I am building up a data set using a collapse
statement and repeatedly saving to the same file.  The problem is that
when I run the d0-file as a whole I get a "could not be opened r(603)"
statement - this happens semi randomly through the sequence of file
saves (example code below).  Suggested sources of the problem included
virus checking software and software that saves to the cloud.

The problem clearly seems to be that the file is being used when it is
 to be saved (no problems occur running line by line).  One suggested
solution was using - - "sleep 2000" to delay the save command.  I
found that by pausing the sync to Dropbox via the (very slow) internet
solved the problem (so far). Dropbox has this option I dont know about
other applications.

I suspect users will have different experiences depending on the size
of the file they are saving and the speed of the internet connection.

****************A SAMPLE OF OUTPUT/CODE********************************

. insheet using "$data_2\SECT1.txt", comma
(17 vars, 17881 obs)
. gen Original=1  if q3b==1
(11878 missing values generated)
. gen Born=1              if q3b==2
(16926 missing values generated)
. gen MarriedIn=1 if q3b==3
(17531 missing values generated)
. gen Joined=1    if q3b==4
(17784 missing values generated)
. gen OtherStatus=1 if q3b==5
(17458 missing values generated)
. collapse (count) Original Born MarriedIn Joined OtherStatus if q3==1
| q3==6 | q3==7 | q3==. , by(ntpc_id round ) // counts  students, hhs
with no students disapper
gen RoundCode = round + 63
merge 1:1 ntpc_id RoundCode using "$data_2\HH_MonthlyData2_All.dta"
 save  "$data_2\HH_MonthlyData2_All", replace
file D:\DropBox\xxxxxxxxxxxxxx\HH_MonthlyData2_All.dta saved
 *****************************************************Generate Primary
Age Children******************************
clear all
insheet using "$data_2\SECT1.txt", comma
(17 vars, 17881 obs)
collapse (count) id if q2>=6 & q2<=11 , by(round ntpc_id) // counts
children primary age, hhs with no students disapper
 rename id HH_PrimAge
gen RoundCode = round + 63
 merge 1:1 ntpc_id RoundCode using "$data_2\HH_MonthlyData2_All.dta"
. drop _m
. save  "$data_2\HH_MonthlyData2_All", replace
file D:\DropBox\xxxxxxxxxxxxxxxxx\\HH_MonthlyData2_All.dta could not be opened

David Fredericks
*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index