I have a project that is working in my DEV environment but not my STG (staging) environmemt. I am receiving this error, "No such process", from ioerrtext. I cannot figure out my error. I am attempting to copy the file from the "Save path" location from my input file to another location to be used later. Any thoughts would be greatly appreciated.
Here is the relevant code:
func BackUpInputs (str plant_id, str route_id, str input_type)
{
if($debug == "DEBUG"){log(4,"**DEBUG** func BackUpInputs");}
If(!PreProc()){
num err_mv, err_del;
str keptfile = CurrInSavePath(), destfldr, destfile, errtext_mv, errtext_del;
if($debug == "DEBUG"){log(4,"**DEBUG** func BackUpInputs - keptfile: " + keptfile);}
if(input_type == "") input_type = "UNKNOWN";
destfldr = $gv_intercept+input_type+ "\Plant_" +plant_id + "\Route_" + route_id + "\";
if($debug == "DEBUG"){log(4,"**DEBUG** func BackUpInputs - destfldr: " + destfldr);}
DirExist(destfldr);
destfile = destfldr + CurrInFileName();
if(Exist(destfile)){
err_del=FileDelete(destfile);
if(err_del!=0){ errtext_del=ioerrtext(err_del); log(0,"**MSG** Not able to delete old BackUp file: "+errtext_del);}
}
if($debug == "DEBUG"){log(4,"**DEBUG** func BackUpInputs - destfile: " + destfile);}
err_mv = FileMove(keptfile,destfile);
if(err_mv!=0){ errtext_mv=ioerrtext(err_mv);
log(0,"**MSG** Not able to move BackUp file: "+errtext_mv);
}else{
log(0, "**MSG** An initial back file <22>"+ keptfile +"<22> now is available by new path: <22>"+destfile+"<22>");
}
}
}
func DirExist(str dir_path)
{
str err_md, err_txt;
if($debug == "DEBUG"){log(4,"**DEBUG** func DirExist - dir_path: " + dir_path);}
if(!Exist(dir_path)){
err_md = MkDir(dir_path); if(num(err_md)!=0){ err_txt=ioerrtext(err_md); log(0,"**MSG** Not able to create a folder for dir_path: "+dir_path+" / "+err_txt);}
}
}
Here are the resulting displays from my projects:
DEV (Development)
0307 011727 (1155) 3 **DEBUG** func _job_after_inv, $inputConnector = SWIS_in
0307 011727 (1155) 3 **DEBUG** func sysco_db_disconnect
0307 011727 (1155) 3 **DEBUG** func BackUpInputs
0307 011727 (1155) 3 **DEBUG** func BackUpInputs - keptfile: E:\Data\CADev_Input\CAN_IN\SSERVE_internal\intercepted_files\ds146C16466374464400.bak
0307 011727 (1155) 3 **DEBUG** func BackUpInputs - destfldr: E:\Data\CADev_Input\CAN_IN\SSERVE_INVS_CEN\SSERVE_internal\intercepted_files\SSERVE_INVS_CEN\Plant_259\Route_1924\
0307 011727 (1155) 3 **DEBUG** func DirExist - dir_path: E:\Data\CADev_Input\CAN_IN\SSERVE_INVS_CEN\SSERVE_internal\intercepted_files\SSERVE_INVS_CEN\Plant_259\Route_1924\
0307 011727 (1155) 3 **DEBUG** func BackUpInputs - destfile: E:\Data\CADev_Input\CAN_IN\SSERVE_INVS_CEN\SSERVE_internal\intercepted_files\SSERVE_INVS_CEN\Plant_259\Route_1924\MS248CAEXMON01B_SSCANINVS_Q-INVSQ_20220203154050_20220203214050661000affbf57f4ca145874fc75cbc3d5bb552_SSCANINVS_Q_259-2593300269.dsi
0307 011727 (1155) 0 **MSG** An initial back file "E:\Data\CADev_Input\CAN_IN\SSERVE_internal\intercepted_files\ds146C16466374464400.bak" now is available by new path: "E:\Data\CADev_Input\CAN_IN\SSERVE_INVS_CEN\SSERVE_internal\intercepted_files\SSERVE_INVS_CEN\Plant_259\Route_1924\MS248CAEXMON01B_SSCANINVS_Q-INVSQ_20220203154050_20220203214050661000affbf57f4ca145874fc75cbc3d5bb552_SSCANINVS_Q_259-2593300269.dsi"
0307 011727 (1723) 2 JobEnd:directoryscanner=SWIS_in
STG (staging)
0307 012638 (1155) 3 **DEBUG** func _job_after_inv, $inputConnector = SWIS_in
0307 012638 (1155) 3 **DEBUG** func sysco_db_disconnect
0307 012638 (1155) 3 **DEBUG** func BackUpInputs
0307 012638 (1155) 3 **DEBUG** func BackUpInputs - keptfile: \\isch3.na.sysco.net\CAEXStg_Input$\IDS_IN\CA_IN\SSERVE_internal\intercepted_files\ds2F2416466379974470.bak
0307 012638 (1155) 3 **DEBUG** func BackUpInputs - destfldr: \\isch3.na.sysco.net\CAEXStg_Input$\IDS_IN\CA_IN\SSERVE_INVS_CEN\SSERVE_internal\intercepted_files\SSERVE_INVS_CEN\Plant_259\Route_1924\
0307 012638 (1155) 3 **DEBUG** func DirExist - dir_path: \\isch3.na.sysco.net\CAEXStg_Input$\IDS_IN\CA_IN\SSERVE_INVS_CEN\SSERVE_internal\intercepted_files\SSERVE_INVS_CEN\Plant_259\Route_1924\
0307 012638 (1155) 3 **DEBUG** func BackUpInputs - destfile: \\isch3.na.sysco.net\CAEXStg_Input$\IDS_IN\CA_IN\SSERVE_INVS_CEN\SSERVE_internal\intercepted_files\SSERVE_INVS_CEN\Plant_259\Route_1924\MS248CAEXMON01B_SSCANINVS_Q-INVSQ_20220203154050_20220203214050661000affbf57f4ca145874fc75cbc3d5bb552_SSCANINVS_Q_259-2593300269.dsi
0307 012638 (1155) 0 **MSG** Not able to move BackUp file: No such process
0307 012638 (1723) 2 JobEnd:directoryscanner=SWIS_in