diff --git a/LSL2/STPROC/OBJ_WO_MAT.txt b/LSL2/STPROC/OBJ_WO_MAT.txt index 71f0289..b1202a5 100644 --- a/LSL2/STPROC/OBJ_WO_MAT.txt +++ b/LSL2/STPROC/OBJ_WO_MAT.txt @@ -1084,6 +1084,7 @@ AddInvTrans: IF Get_Status(errCode) THEN obj_Tables('UnlockRec',OtParms) + ErrorMsg = 'Unable to add inv. transaction. Unable to read OR get a lock on the WO_MAT record.' LogData = '' LogData<1> = LogFile LogData<2> = WONo @@ -1096,7 +1097,7 @@ AddInvTrans: LogData<9> = ToolID LogData<10> = ScanEntry LogData<11> = '' - LogData<12> = 'Unable to add inv. transaction. Unable to read OR get a lock on the WO_MAT record. Line 1099' + LogData<12> = ErrorMsg Logging_Services('AppendLog', objLogInvTransError, LogData, @RM, @FM) RETURN END @@ -1113,6 +1114,7 @@ AddInvTrans: IF Get_Status(errCode) THEN obj_Tables('UnlockRec',WOtParms) obj_Tables('UnlockRec',OtParms) + ErrorMsg = 'Unable to add inv. transaction. Unable to read or get a lock for WM_OUT record.' LogData = '' LogData<1> = LogFile LogData<2> = WONo @@ -1125,7 +1127,7 @@ AddInvTrans: LogData<9> = ToolID LogData<10> = ScanEntry LogData<11> = '' - LogData<12> = 'Unable to add inv. transaction. Unable to read WM_OUT record.' + LogData<12> = ErrorMsg Logging_Services('AppendLog', objLogInvTransError, LogData, @RM, @FM) RETURN END @@ -1142,6 +1144,7 @@ AddInvTrans: obj_Tables('WriteRec',WOtParms) IF Get_Status(errCode) THEN + ErrorMsg = 'Unable to add inv. transaction. Unable to write WM_OUT record.' LogData = '' LogData<1> = LogFile LogData<2> = WONo @@ -1154,7 +1157,7 @@ AddInvTrans: LogData<9> = ToolID LogData<10> = ScanEntry LogData<11> = '' - LogData<12> = 'Unable to add inv. transaction. Unable to write WM_OUT record.' + LogData<12> = ErrorMsg Logging_Services('AppendLog', objLogInvTransError, LogData, @RM, @FM) END @@ -1168,6 +1171,7 @@ AddInvTrans: IF Get_Status(errCode) THEN obj_Tables('UnlockRec',WOtParms) obj_Tables('UnlockRec',OtParms) + ErrorMsg = 'Unable to add inv. transaction. Unable to read WM_OUT record.' LogData = '' LogData<1> = LogFile LogData<2> = WONo @@ -1180,7 +1184,7 @@ AddInvTrans: LogData<9> = ToolID LogData<10> = ScanEntry LogData<11> = '' - LogData<12> = 'Unable to add inv. transaction. Unable to read WM_OUT record.' + LogData<12> = ErrorMsg Logging_Services('AppendLog', objLogInvTransError, LogData, @RM, @FM) RETURN END @@ -1199,6 +1203,7 @@ AddInvTrans: IF @WINDOW NE 'WO_MAT_INV' THEN IF WOMatRec = '' OR WOMatRec = '' THEN obj_Tables('UnlockRec',OtParms) + ErrorMsg = 'Unable to add inv. transaction. null LOT_NO or CUST_PART_NO values.' LogData = '' LogData<1> = LogFile LogData<2> = WONo @@ -1211,7 +1216,7 @@ AddInvTrans: LogData<9> = ToolID LogData<10> = ScanEntry LogData<11> = '' - LogData<12> = 'Unable to add inv. transaction. null LOT_NO or CUST_PART_NO values.' + LogData<12> = ErrorMsg Logging_Services('AppendLog', objLogInvTransError, LogData, @RM, @FM) RETURN END @@ -1250,9 +1255,9 @@ AddInvTrans: NumAttempts = 0 Loop NumAttempts += 1 - Database_Services('WriteDataRow', 'WO_MAT', WOMatKey, WOMatRec, True$, False$, True$) + Database_Services('WriteDataRow', 'WO_MAT', WOMatKey, WOMatRec, True$, False$, False$) if Error_Services('HasError') then - ErrorMessage = Error_Services('GetMessage') + ErrorMsg = Error_Services('GetMessage') LogData = '' LogData<1> = LogFile LogData<2> = WONo @@ -1265,7 +1270,7 @@ AddInvTrans: LogData<9> = ToolID LogData<10> = ScanEntry LogData<11> = '' - LogData<12> = 'Unable to add inv. transaction. ' : ErrorMessage : ' Next line is the expected INV Actions.' + LogData<12> = 'Unable to add inv. transaction. ' : ErrorMsg : ' Next line is the expected INV Actions.' Logging_Services('AppendLog', objLogInvTransError, LogData, @RM, @FM) LogData = '' @@ -1335,14 +1340,6 @@ AddInvTrans: Logging_Services('AppendLog', WOMatObjLog2, LogData, @RM, @FM) - IF Get_Status(errCode) THEN - errCode = errCode:'User = ':ScanUserID - Gosub SendErrorNotification - END ELSE - - - END ;* End of check for Write error - obj_Tables('UnlockRec',OtParms) CASE 1 @@ -5678,6 +5675,9 @@ RETURN SendErrorNotification: * * * * * * * * * * * + If Not(Assigned(errCode)) then + errCode = '' + end swap @SVM with CRLF$ in errCode ErrorMsg = 'Error code: ':errCode