Hi guys
Is there a way to change file name each day I do my questionnaire on CAPI like I do on Data Entry, or do I have to transfer each day data into the laptop. Or maybe is there a logic that I can use to change the file name automatically each day I collect data.
Regards,
Thabiso
CAPI data collection
Re: CAPI data collection
Hi Thabiso,
If I understand you right, you which to keep track of work done for each day. Not sure if you file is cumulative (cases for each day add on to the previous ones) or you create a separate file for each day. Either ways, you can change the file name and back up separately. The easiest way I guess is the use of the filecopy function: http://www.csprousers.org/help/html/fil ... nction.htm. In the result file name, you can add a date extension to the input file. Something like:
In Proc global, you can declare:
string(8) today;
Then in the entry preproc, you can set:
today=sysdate("ddmmyyyy");
Then you can write:
bu= filecopy(thisfile, thisfile_today);
Something along these lines should work.
Best...
If I understand you right, you which to keep track of work done for each day. Not sure if you file is cumulative (cases for each day add on to the previous ones) or you create a separate file for each day. Either ways, you can change the file name and back up separately. The easiest way I guess is the use of the filecopy function: http://www.csprousers.org/help/html/fil ... nction.htm. In the result file name, you can add a date extension to the input file. Something like:
In Proc global, you can declare:
string(8) today;
Then in the entry preproc, you can set:
today=sysdate("ddmmyyyy");
Then you can write:
bu= filecopy(thisfile, thisfile_today);
Something along these lines should work.
Best...
Re: CAPI data collection
Hi. So meaning I will have separate files for each day
Re: CAPI data collection
Yes... but if the files are cumulative, then the back up for day 2 will include everything from day 1 also.
Re: CAPI data collection
Why do you need a separate file for each day?
Re: CAPI data collection
To make a report of each field worker and manage their data collection on a daily basis. On data entry we normally set each data capturing file(01_03_2016) then next day we change it to that specific date on the file name.
Re: CAPI data collection
It would be easier to keep everything in one file and add a date variable to each case that you fill in using sysdate(). Then you can run frequencies or tables using the date to create reports.