You can turn on "ignore errors" job property so the script will continue running even if the file cannot be opened. if FileOpen fails, file_handle_cus will not be changed and will stay 0, and so the script will proceed to NO_PROCESS_END. : IfThen( file_handle_cus, CHECK_ORD_READY) : FileClose file_handle_cus : goto NO_PROCESS_END : I'm already using FileExists before opening the file (see below). : CHECK_ORD: FileExists(file_ord,file_found) : IfThen( file_found, CHECK_CUS_READY) : goto NO_PROCESS_END : CHECK_CUS_READY: FileOpen : (file_cus,"StreamMode","Read",True,file_handle_cus) : IfThen( file_handle_cus, CHECK_ORD_READY) : FileClose file_handle_cus : goto NO_PROCESS_END : CHECK_ORD_READY: FileOpen : (file_ord,"StreamMode","Read",True,file_handle_ord) : IfThen( file_handle_ord, CHECK_TARGET_EXIST) : FileClose file_handle_ord : goto NO_PROCESS_END : There is no anyway to trap this error instead of using DOS type? : Why "file_handle_cus" or FileOpen does not return a error instead : of stopping the program? : Thanks.
|