diff --git a/LSL2/STPROC/OBJ_WO_REACT.txt b/LSL2/STPROC/OBJ_WO_REACT.txt index b8d3747..8b8eb85 100644 --- a/LSL2/STPROC/OBJ_WO_REACT.txt +++ b/LSL2/STPROC/OBJ_WO_REACT.txt @@ -16,7 +16,7 @@ COMPILE FUNCTION obj_WO_React(Method,Parms) DECLARE FUNCTION Get_Status, Msg, Utility, obj_Tables, NextKey, obj_Prod_Spec, obj_WO_Mat_QA, GetTickCount -Declare function Environment_Services +Declare function Environment_Services, Database_Services DECLARE SUBROUTINE Set_Status, Msg, obj_Tables, RList, ErrMsg, Btree.Extract, obj_WO_Mat_QA, Mona_Services $INSERT MSG_EQUATES @@ -90,7 +90,6 @@ WOReactKey = WONo:'*':StepNo:'*':ReactNo otParms = 'WO_REACT':@RM:WOReactKey WOReactRec = obj_Tables('ReadOnlyRec',otParms) - RDSNos = WOReactRec CassNos = WOReactRec @@ -105,13 +104,11 @@ Start = QAMetData Interval = QAMetData Stage = QAMetData MetPropCd = QAMetData - GOSUB BuildAllTestPos ;* Set RDSNos, Start and Interval -> returns AllTestPos - * * * Find where the the RDS being added will be in the list. * * * -LOCATE RDSNo IN WOReactRec BY 'AR' USING @VM SETTING InsPos THEN +LOCATE RDSNo IN WOReactRec USING @VM SETTING InsPos THEN otParms = 'WO_REACT':@RM:WOReactKey WOReactRec = obj_Tables('UnlockRec',otParms) @@ -120,10 +117,9 @@ LOCATE RDSNo IN WOReactRec BY 'AR' USING @VM SETTING InsPos TH END ELSE - LOCATE InsPos IN AllTestPos BY 'AR' USING @VM SETTING TrimPos ELSE Null + LOCATE InsPos IN AllTestPos USING @VM SETTING TrimPos ELSE Null ChangePosList = FIELD(AllTestPos,@VM,TrimPos,SeqCnt) - GOSUB RemSchedQA ;* Removes unsigned QAMet from cassettes scheduled past the box being removed END @@ -135,13 +131,12 @@ RDSNos = WOReactRec ;* List after insert CassNos = WOReactRec ;* List after insert * * * Now build list for cassette - -GOSUB BuildAllTestPos +GOSUB BuildAllTestPos ChangePosList = FIELD(AllTestPos,@VM,TrimPos,SeqCnt) GOSUB AddSchedQA ;* Add QAMet spec data to cassettes now associated with the test positions after removing the RDS & Cassno from the lists - + otParms = FIELDSTORE(otParms,@RM,4,0,WOReactRec) obj_Tables('WriteOnlyRec',otParms) ;* Done with updates to the WO_REACT record @@ -194,19 +189,17 @@ MetPropCd = QAMetData GOSUB BuildAllTestPos ;* Set RDSNos, Start and Interval -> returns AllTestPos - IF AllTestPos NE '' THEN * * * Find where the the RDS being removed is in the list. * * * LOCATE RDSNo IN WOReactRec USING @VM SETTING RemPos THEN - LOCATE RemPos IN AllTestPos BY 'AR' USING @VM SETTING TrimPos ELSE Null + LOCATE RemPos IN AllTestPos USING @VM SETTING TrimPos ELSE Null ChangePosList = FIELD(AllTestPos,@VM,TrimPos,SeqCnt) GOSUB RemSchedQA ;* Removes unsigned QAMet from cassettes scheduled past the box being removed - END ELSE otParms = 'WO_REACT':@RM:WOReactKey @@ -225,11 +218,9 @@ CassNos = WOReactRec ;* List after removal * * * Now build list for cassette GOSUB BuildAllTestPos - ChangePosList = FIELD(AllTestPos,@VM,TrimPos,SeqCnt) GOSUB AddSchedQA ;* Add QAMet spec data to cassettes now associated with the test positions after removing the RDS & Cassno from the lists - otParms = FIELDSTORE(otParms,@RM,4,0,WOReactRec) // 10/12/18 Changed to WriteOnlyRec as per Francois' instructions. - djs obj_Tables('WriteOnlyRec',otParms) ;* Done with updates to the WO_REACT record @@ -346,3 +337,4 @@ FOR I = 1 TO chgCnt NEXT I RETURN +