Data downloads not working
Posted: August 8th, 2018, 4:12 pm
I'm trying to download data that is restricted to a particular ED to my tablet. I'm using the following code and although I'm not seeing any errors I'm not seeing any new cases on the tablet. Is there something that I am missing?
Code: Select all
PROC CHOOSE_ED
Postproc
//there's a CHOOSE_ROUND field that is filled before this one
rnd_ed = maketext("%02d%03d", CHOOSE_ROUND,CHOOSE_ED);
downloadData(rnd_ed);
move to LOGIN;
Code: Select all
//downloads Data based on round and ED
function downloadData(string rnd_edno)
errmsg("Attempting to download all data from Round %s, ED %s",rnd_edno[1:2],rnd_edno[3:3]);
if syncconnect(FTP,"1.1.1.1","username","password") then //connect to FTP
syncdata(GET,LABOURFORCE_DICT,rnd_edno); //get labourforce data for round and ED
syncdata(GET,LISTING_DICT,rnd_edno); //get listing data for round and ED
syncdisconnect(); //disconnect
errmsg("Download of round %s, ED %s was successful",rnd_edno[1:2],rnd_edno[3:3]);
else
errmsg("Download of round %s, ED %s failed, Please try again",rnd_edno[1:2],rnd_edno[3:3]);
endif;
end;