Compare commits

54 Commits

Author SHA1 Message Date
51da9ef7c2 http, hurl for api testing
txt for metrology proof

settings for vscode
2025-08-21 11:28:11 -07:00
722bc63bdb Changed VOID and PACKAGING LOT_EVENTS to COMMENT type events. Modified code to only add them if lot is in new LOT table. 2025-08-20 16:27:11 -07:00
1f2777cd18 Updated service to pass in a user id when placing a lot on hold 2025-08-20 15:29:52 -07:00
10bf8bf878 Consolidated OPEN to LOT_START. Consolidated INCREASE_WAFER_QTY to BONUS_WAFER_QTY. Fixed bug in Lot_Services. Fixed bug in Copy_Lot_Operation_Record_To_SQL. 2025-08-20 15:22:48 -07:00
1a572a31b2 modified legacy lot operation logging to be per lot instead of per date and legacy operation 2025-08-20 10:42:18 -07:00
098f740585 Removed lot events for non-epipro RDS lots in lieu of logging 2025-08-20 17:09:10 +00:00
89bb3e479b Reworded the error to be inclusive of all missing metrology results from WO_MAT_QA record 2025-08-18 15:01:04 -07:00
60522d74c1 Improvements suggested by Daniel. 2025-08-18 19:14:49 +00:00
3561b41a7b Resolve rebase oddities. 2025-08-18 19:14:49 +00:00
a636198128 Create new services.
Commit to switch branches.

Fix error text.

Fixed CassetteID variable typo.

Commit final changes.
2025-08-18 19:14:49 +00:00
adc247fd4c added CHRON_ID to LOT_EVENT table to have a sequential integer for debugging 2025-08-18 09:25:34 -07:00
a094971d7d ErrorMsg wasn't initialized. Added initialization at the top of the service 2025-08-18 01:42:35 +00:00
47b54f6a16 Had an instance of an RDS being deleted. Looking into root cause. Interim fix including blocking ALL RDS deletions. 2025-08-17 17:51:09 -07:00
804258a167 Mona_Services was interferring with error checking and returning. Used buffered error message to return and error properly 2025-08-15 17:44:26 -07:00
6d552ab824 Added error checking to scan_services to check for null wo_mat records 2025-08-15 17:27:29 -07:00
2fbf41d528 re-order the error checking 2025-08-16 00:22:07 +00:00
ba2faa8c9f Found most likely root cause of WO_MAT records getting cleared at 1UNLOAD. 2025-08-16 00:22:07 +00:00
0a2d53d173 added delete from sql routines for LOT_EVENT and related tables 2025-08-15 14:37:27 -07:00
844de71599 removed temporary 1D scan allowance that was in place to exhaust existing inventory with old labels 2025-08-14 16:51:30 -07:00
494988d394 Restored obj_RDS('MetPropFlag') to previous version for performance reasons. Refactored Supplement_Services to improve performance. 2025-08-14 13:15:21 -07:00
e1c7544fac Fixed bug for new PSN stage met tests 2025-08-14 15:58:52 +00:00
6d5c9c0ab7 removed code to add LOT_EVENT records for legacy WO_MAT log events 2025-08-13 16:31:38 -07:00
a8dff61cfa Enhanced Error Checking 2025-08-13 21:54:33 +00:00
09d2d13e63 Created methods to provide Metrology Services with JSON source for SLL Section 2025-08-13 21:54:33 +00:00
14331fcf49 Added in missing Lot Operation Id to event records 2025-08-13 20:28:59 +00:00
667831a003 added support for mestsa024ec 2025-08-13 12:25:34 -07:00
82b74f0b96 Enable BioRad Stratus pdsf usage 2025-08-13 09:41:52 -07:00
f4f63c28e3 Added JSON body and response logging to CreateNewOrder service. Modified how reactor log comments are added for ABORT_ALARM NICA orders. Modified ABORT_ALARM solution to not trigger on WAITING_FOR_MAINTENANCE_UNSCHEDULED 2025-08-12 16:24:12 -07:00
1f2b73797b Enable BioRad pdsf usage 2025-08-12 07:52:13 -07:00
54eaf15598 Increased the MAX_NUM_CASS$ equate to 150 as we have a workorder with more than 96 WO_MAT ID's 2025-08-08 11:44:44 -07:00
fffadaa1c3 Found that the location of the cassettes being added were first being sorted in an ascending order within a LOCATE loop. 2025-08-07 14:55:21 -07:00
a6da80dc3c Revert "Created temporary workarounds to QA Metrology not getting set correctly." 2025-08-07 18:07:28 +00:00
3125225639 Created temporary workarounds to QA Metrology not getting set correctly. 2025-08-06 16:20:43 -07:00
f54331eb0e Fixed HgCV frequency bug 2025-08-05 12:46:25 -07:00
847483f603 Added new Stratus Qual Data Import method to stop using BioRad Qual Data Import for Stratus runs 2025-08-05 16:02:39 +00:00
88281fff05 Added a query param in GetWOMatKeys service to only get WOMat Keys that are not VOID 2025-08-04 17:16:16 -07:00
8499d03ef8 modified update work order services to throttle better 2025-08-01 08:26:27 -07:00
3186ec1ad6 Bug fix to ensure correct WM_OUT key is identified and created. Added services to ensure WM_IN and WM_OUT indexes are maintained. 2025-07-31 17:18:09 -07:00
898f21b73d Refactored error checking to utilize ErrorMsg variable so that errors make their way back to the calling routine. 2025-07-30 17:07:01 +00:00
f7ee12a78d Fixed a bug where the ProcessProcedureQueue service would write an invalid record to the PROC_QUEUE2 table when failing to read a record. 2025-07-30 09:48:56 -07:00
475df5ba54 Minor bug fix in UpdateWorkOrderData. Modified ProcessRequest service to dump record for troubleshooting purposes. 2025-07-30 09:24:02 -07:00
28a8a10ba2 Not sure how this bug was re-introduced. 99% sure we pushed this to prod. 2025-07-29 16:16:32 -07:00
6934799e92 Added troubleshooting logs to find cause of LBLCHK transactions going missing 2025-07-29 21:11:25 +00:00
03f42dedea updated UpdateWorkOrderData service to correct WO_MAT records containing multiple RDS keys 2025-07-29 13:34:57 -07:00
033e3baee8 added condition to search RDS table for matching WO_MAT record to correct index 2025-07-29 12:52:06 -07:00
4bfae8e7b7 minor fix to prevent an error message from being displayed on brand new work orders 2025-07-29 12:03:55 -07:00
0f0c735023 added SYSOBJ check to the PostProcedure service to prevent invalid procedures from getting posted to the procedure queue 2025-07-29 11:56:42 -07:00
4eee1b0f0a modified check to look at WO_MAT record instead of WO_STEP to see if RDS already exists for a given cassette 2025-07-29 18:22:52 +00:00
e2e8731316 Removed uneccessary transaction postings 2025-07-29 10:52:39 -07:00
a21f41fd29 modified service to dispatch a single job at a time to avoid clogging up the SRP Engine Server 2025-07-29 09:33:11 -07:00
2bbc5c065d updated service to remove keys if lot is voided 2025-07-28 15:08:11 -07:00
9e54865e1e moved procedure call from WO_MAT_ACTIONS to a standalone service to avoid posting too many transactions 2025-07-28 14:34:20 -07:00
c7f1f86249 SP1 Misfit bug fix 2025-07-28 16:06:35 +00:00
c89bb6b3d4 added services and triggers to manually add index transactions to keep indexes up-to-date 2025-07-28 15:57:33 +00:00
62 changed files with 2688 additions and 3962 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
LSL2/STPROC/TEST_DANIEL*.txt
LSL2/STPROC/TEST_DAKOTA.txt
LSL2/STPROC/JONATHAN_SERVICES.txt
LSL2/STPROC/CHASE_SERVICES.txt

16
.vscode/.http vendored Normal file
View File

@ -0,0 +1,16 @@
###
GET https://messa020ec.infineon.com/api/oiWizard/reactors
Accept: application/json
###
GET https://messa020ec.infineon.com/api/oiWizard/materials/rds/1000416
Accept: application/json
###
GET https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQSV3/1750770474/header
Accept: application/json
###

29
.vscode/.hurl vendored Normal file
View File

@ -0,0 +1,29 @@
###
GET https://messa020ec.infineon.com/api/oiWizard/reactors
Accept: application/json
HTTP 200
[Asserts]
header "Content-Type" == "application/hal+json"
###
GET https://messa020ec.infineon.com/api/oiWizard/materials/rds/1000416
Accept: application/json
HTTP 200
[Asserts]
header "Content-Type" == "application/hal+json"
###
GET https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQSV3/1750770474/header
Accept: application/json
HTTP 200
[Asserts]
header "Content-Type" == "application/json; charset=utf-8"
jsonpath "$.TotalRows" == 1
###

234
.vscode/.txt vendored Normal file
View File

@ -0,0 +1,234 @@
// T:\met08resisrp2100\06_SourceCode\met08resisrp2100\Adaptation\FileHandlers\OpenInsight\FileRead.cs
// x.Date // 001
// x.Employee // 002
// x.Recipe // 003
// x.Reactor // 004
// x.RDS // 005
// x.PSN // 006
// x.Layer // 007
// x.Zone // 008
// T:\met08anlysdifaast230\06_SourceCode\met08anlysdifaast230\Adaptation\FileHandlers\OpenInsight\FileRead.cs
// x.PSN // 001
// x.Reactor // 002
// logistics.MesEntity // 003
// x.RDS // 004
// x.Recipe // 005
// x.Employee // 006
// x.SlotNumber // 007
// T:\met08thftirstratus\06_SourceCode\met08thftirstratus\Adaptation\FileHandlers\OpenInsight\FileRead.cs
// "Stratus_" // 001
// x.Date // 002
// logistics.JobID // 003
// "FQA Thickness" // 004
// x.Employee // 005
// x.Recipe // 006
// x.Reactor // 007
// x.RDS // 008
// x.PSN // 009
// x.Lot // 010
// x.Cassette // 011
// x.MeanThickness // 012
// descriptions[i].Slot // 013
// descriptions[i].Mean // 014
// T:\met08thftirqs408m\06_SourceCode\met08thftirqs408m\Adaptation\FileHandlers\OpenInsight\FileRead.cs
// Bio-Rad UniqueId // 001
// Date // 002
// ThicknessFourteenCriticalPointsAverage // 003
// Recipe // 004
// Reactor // 005
// RDS // 006
// PSN // 007
// Layer // 008
// Zone // 009
// Cassette // 010
// Wafer // 011
// RVThickness // 012
// Position // 013
// Thickness // 014
// T:\met08resimapcde\06_SourceCode\met08resimapcde\Adaptation\FileHandlers\OpenInsight\FileRead.cs
// x.UniqueId // 001
// x.Run // 002
// x.Date // 003
// x.Lot // 004
// x.Recipe // 005
// x.Reactor // 006
// x.RDS // 007
// x.PSN // 008
// x.Layer // 009
// x.Zone // 010
// logistics.MesEntity // 011
// x.Employee // 012
// x.Engineer // 013
// x.DLRatio // 014
// x.Temp // 015
// x.AutoOptimizeGain // 016
// x.AutoProbeHeightSet // 017
// x.DataReject // 018
// x.FileName // 019
// x.Avg // 020
// x.StdDev // 021
// x.SemiRadial // 022
// description.Pt // 023
// description.R // 024
// description.T // 025
// description.Rs // 026
// description.Merit // 027
// T:\met08resihgcv\06_SourceCode\met08resihgcv\Adaptation\FileHandlers\OpenInsight\FileRead.cs
// x.UniqueId // 001
// logistics.MesEntity // 002
// x.Reactor // 003
// x.RDS // 004
// x.PSN // 005
// x.Layer // 006
// x.Zone // 007
// x.Wafer // 008
// x.Lot // 009
// x.Plan // 010
// x.Date // 011
// x.WaferSize // 012
// x.Ccomp // 013
// x.Area // 014
// x.CondType // 015
// x.Model // 016
// x.StartVoltage // 017
// x.StopVoltage // 018
// x.RampRate // 019
// x.GLimit // 020
// x.SetupFile // 021
// x.SetupFile // 022
// x.Folder // 023
// x.Pattern // 024
// x.RhoMethod // 025
// x.NAvgMean // 026
// x.NAvgStdDev // 027
// x.NAvgRadialGradient // 028
// x.NslMean // 029
// x.NslStdDev // 030
// x.NslRadialGradient // 031
// x.VdMean // 032
// x.VdStdDev // 033
// x.VdRadialGradient // 034
// x.FlatZMean // 035
// x.FlatZStdDev // 036
// x.FlatZRadialGradient // 037
// x.RhoAvgMean // 038
// x.RhoAvgStdDev // 039
// x.RhoAvgRadialGradient // 040
// x.RhoslMean // 041
// x.RhoslStdDev // 042
// x.RhoslRadialGradient // 043
// x.PhaseMean // 044
// x.PhaseStdDev // 045
// x.PhaseRadialGradient // 046
// x.GradeMean // 047
// x.GradeStdDev // 048
// x.GradeRadialGradient // 049
// x.RsMean // 050
// x.RsStdDev // 051
// x.RsRadialGradient // 052
// description.Index // 053
// description.NAvg // 054
// description.Nsl // 055
// description.Vd // 056
// description.FlatZ // 057
// description.RhoAvg // 058
// description.Rhosl // 059
// description.Phase // 060
// description.Grade // 061
// T:\met08ddupsfs6420\06_SourceCode\met08ddupsfs6420\Adaptation\FileHandlers\OpenInsight\FileRead.cs
// x.AreaCountAvg // 001 - AreaCountAvg
// x.AreaCountMax // 002 - AreaCountMax
// x.AreaCountMin // 003 - AreaCountMin
// x.AreaCountStdDev // 004 - AreaCountStdDev
// x.AreaTotalAvg // 005 - AreaTotalAvg
// x.AreaTotalMax // 006 - AreaTotalMax
// x.AreaTotalMin // 007 - AreaTotalMin
// x.AreaTotalStdDev // 008 - AreaTotalStdDev
// x.Date // 009 -
// x.HazeAverageAvg // 010 - Haze Average
// x.HazeAverageMax // 011 -
// x.HazeAverageMin // 012 -
// x.HazeAverageStdDev // 013 -
// x.HazeRegionAvg // 014 -
// x.HazeRegionMax // 015 -
// x.HazeRegionMin // 016 -
// x.HazeRegionStdDev // 017 -
// x.Lot // 018 -
// x.LPDCM2Avg // 019 -
// x.LPDCM2Max // 020 -
// x.LPDCM2Min // 021 -
// x.LPDCM2StdDev // 022 -
// x.LPDCountAvg // 023 -
// x.LPDCountMax // 024 -
// x.LPDCM2Min // 025 -
// x.LPDCountStdDev // 026 -
// x.Employee // 027 -
// x.RDS // 028 - Lot
// x.Reactor // 029 - Process
// x.Recipe // 030 - Part
// x.ScratchCountAvg // 031 - Scratch Count
// x.ScratchCountMax // 032 -
// x.ScratchCountMin // 033 -
// x.ScratchTotalStdDev // 034 -
// x.ScratchTotalAvg // 035 - Scratch Length
// x.ScratchTotalMax // 036 -
// x.ScratchTotalMin // 037 -
// x.ScratchTotalStdDev // 038 -
// x.SumOfDefectsAvg // 039 - Average Sum of Defects
// x.SumOfDefectsMax // 040 - Max Sum of Defects
// x.SumOfDefectsMin // 041 - Min Sum of Defects
// x.SumOfDefectsStdDev // 042 - SumOfDefectsStdDev
// logistics.MesEntity // 043 -
// T:\met08ddupsp1tbi\06_SourceCode\met08ddupsp1tbi\Adaptation\FileHandlers\OpenInsight\FileRead.cs
// x.DcnLpdMin // 001 -
// x.DcnLpdMax // 002 -
// x.DcnLpdMean // 003 - DCN LPD
// x.DcnAreaCountMin // 004 -
// x.DcnAreaCountMax // 005 -
// x.DcnAreaCountMean // 006 - DCN Area
// x.DcnAreaMin // 007 -
// x.DcnAreaMax // 008 -
// x.Date // 009 -
// x.DcnHazeAvgMean // 010 - Haze Average
// string.Empty // 011 -
// string.Empty // 012 -
// string.Empty // 013 -
// string.Empty // 014 -
// string.Empty // 015 -
// string.Empty // 016 -
// string.Empty // 017 -
// string.Empty // 018 -
// string.Empty // 019 -
// string.Empty // 020 -
// string.Empty // 021 -
// string.Empty // 022 -
// string.Empty // 023 -
// string.Empty // 024 -
// string.Empty // 025 -
// string.Empty // 026 -
// string.Empty // 027 -
// x.RDS // 028 - Lot
// x.Reactor // 029 - Process
// x.Recipe // 030 - Part
// x.DcnScrMean // 031 - Scratch Count
// string.Empty // 032 -
// string.Empty // 033 -
// string.Empty // 034 -
// x.DcnMicroScrMean // 035 - Scratch Length
// string.Empty // 036 -
// string.Empty // 037 -
// string.Empty // 038 -
// x.DcnAllMean // 039 - Average Sum of Defects
// x.DcnAllMax // 040 - Max Sum of defects
// x.DcnAllMin // 041 - Min Sum of Defects
// string.Empty // 042 -
// logistics.MesEntity // 043 -
// x.DcnAreaMean // 044 - DCN MM2

6
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,6 @@
{
"files.associations": {
"*.txt": "vb",
},
"cSpell.words": []
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -488,9 +488,11 @@ Service PushSigProfileToWoMat(CleanInspKey)
If WOMatKey NE '' then
WOMatRec = Database_Services('ReadDataRow', 'WO_MAT', WOMatKey)
If Error_Services('NoError') then
WOMatSigProf = WOMatRec<WO_MAT_SIG_PROFILE$>
WOMatSigs = WOMatRec<WO_MAT_SIGNATURE$>
WOMatSigDTMs = WOMatRec<WO_MAT_SIG_DTM$>
WOMatSigProf = WOMatRec<WO_MAT_SIG_PROFILE$>
WOMatSigs = WOMatRec<WO_MAT_SIGNATURE$>
WOMatSigDTMs = WOMatRec<WO_MAT_SIG_DTM$>
WOMatSigsOrig = WOMatSigs
WOMatSigDTMsOrig = WOMatSigDTMs
InspSig = Record<CLEAN_INSP_INSP_SIG$>
InspSigDTM = Record<CLEAN_INSP_INSP_SIG_DTM$>
@ -520,8 +522,12 @@ Service PushSigProfileToWoMat(CleanInspKey)
NumSteps = DCount(WOMatSigProf, @VM)
WOMatSigs = Field(WOMatSigs, @VM, 1, NumSteps)
WOMatSigDTMs = Field(WOMatSigDTMs, @VM, 1, NumSteps)
Transaction_Services('PostWriteFieldTransaction', 'WO_MAT', WOMatKey, WO_MAT_SIGNATURE$, WOMatSigs)
Transaction_Services('PostWriteFieldTransaction', 'WO_MAT', WOMatKey, WO_MAT_SIG_DTM$, WOMatSigDTMs)
If WOMatSigs NE WOMatSigsOrig then
Transaction_Services('PostWriteFieldTransaction', 'WO_MAT', WOMatKey, WO_MAT_SIGNATURE$, WOMatSigs)
end
If WOMatSigDTMs NE WOMatSigDTMsOrig then
Transaction_Services('PostWriteFieldTransaction', 'WO_MAT', WOMatKey, WO_MAT_SIG_DTM$, WOMatSigDTMs)
end
end else
ErrorMsg = 'Error in ':Service:' service. Error message: ':Error_Services('GetMessage')
end

View File

@ -9,7 +9,7 @@ COMPILE FUNCTION Comm_PRS_Stage(EntID,Event,Parm1,Parm2,Parm3,Parm4,Parm5)
DECLARE SUBROUTINE Set_Property, Set_Status, ErrMsg, Set_Property, obj_AppWindow, Send_Event, Security_Err_Msg
DECLARE SUBROUTINE Send_Message, Btree.Extract, Comm_Prod_Spec, Forward_Event, Post_Event
DECLARE FUNCTION Get_Property, Get_Status, Popup, Send_Message, Msg, Start_Window, MemberOf, Security_Check
DECLARE FUNCTION Comm_Prod_Spec
DECLARE FUNCTION Comm_Prod_Spec, obj_Popup
$INSERT POPUP_EQUATES
@ -143,7 +143,7 @@ obj_Appwindow('Create',@WINDOW)
**** Set Dropdown columns in .MET_TEST edit table ****
MetStyles = Send_Message(@WINDOW:'.MET_TEST','COLSTYLE',0,'')
MetStyles = Send_Message(@WINDOW:'.MET_TEST','COLSTYLE',0,'')
MetStyles<COL$MET_TEST> = BitOr(MetStyles<COL$MET_TEST>,DROPDOWN_STYLE$)
MetStyles<COL$MET_PROP> = BitOr(MetStyles<COL$MET_PROP>,DROPDOWN_STYLE$)
@ -192,7 +192,6 @@ NEXT I
Send_Message(@WINDOW:'.MET_TEST','COLFORMAT',COL$MET_PROP,PropCodes)
* Class Tools is set in the POSCHANGED event for the edit table.
/*
@ -235,6 +234,23 @@ Read:
GOSUB Refresh
* Met Property Descriptions *
PSNo = Get_Property(@WINDOW : '.PS_NO', 'TEXT')
Stage = Get_Property(@WINDOW:'.STAGE','DEFPROP')
Props = Xlate('PRS_STAGE', PSNo:'*':Stage, PRS_STAGE_MET_PROP$, 'X')
PropDescs = obj_Popup('CodeDesc','MET_PROPERTY':@RM:Props)
CtrlEntID = @WINDOW:'.MET_TEST'
DescCount = DCount(PropDescs, @VM)
FOR Row = 1 to DescCount
PropDesc = PropDescs<1, Row>
Set_Property(CtrlEntId,"CELLPOS",PropDesc,COL$MET_PROP_DESC:@FM:Row)
Next Row
RETURN
@ -722,8 +738,8 @@ CurrLine = Get_Property(CtrlEntID,'LIST')<CurrRow>
DefProp = ''
BEGIN CASE
BEGIN CASE
CASE CurrCol = COL$MET_TOOL_CLASS
PropCode = CurrLine<1,COL$MET_PROP>
@ -764,6 +780,12 @@ BEGIN CASE
RETURN
CASE CurrCol = COL$MET_PROP_DESC
PropCode = CurrLine<1,COL$MET_PROP>
DefProp = obj_Popup('CodeDesc','MET_PROPERTY':@RM:PropCode)
CASE CurrCol = COL$MET_MIN AND CurrLine<1,COL$MET_MIN> = ''
MetTest = CurrLine<1,COL$MET_TEST>
@ -1229,3 +1251,4 @@ return

View File

@ -2015,7 +2015,7 @@ HoldClick:
HoldData = Dialog_Box('DIALOG_HOLD',@WINDOW,Transition:@FM:@FM:HoldType:@FM:Stage:@FM:Interrupted)
If HoldData NE 'Cancel' then
Hold_Services('ToggleHold', WOMatKey, HoldEntity, HoldEntityID, CtrlEnt, '', HoldData, '')
Hold_Services('ToggleHold', WOMatKey, HoldEntity, HoldEntityID, CtrlEnt, '', HoldData, @User4)
IF Error_Services("HasError") THEN
ErrCode = Error_Services("GetMessage")
ErrMsg(errCode)

View File

@ -425,7 +425,7 @@ RejMat:
Msg(@window, MsgUp) ;* take down the processing message
end
end
IneligibleSlots = ''
AllSlotsPermitted = True$ ; // Assume that all slots are permitted to be NCR'd for now.
For I = 1 TO SelCnt
@ -434,7 +434,7 @@ RejMat:
WfrID = SlotList<SelectedRows<I>, COL$WAFER_ID>
PrevNCR = SlotList<SelectedRows<I>, COL$SLOT_NCR>
MUWfrID = SlotList<SelectedRows<I>, COL$MU_WAFER_ID>
If (WfrId EQ '') then
If (WfrID EQ '') then
AllSlotsPermitted = False$
IneligibleSlots<0, -1> = SlotNo
end
@ -1233,3 +1233,7 @@ LogRecord:
return

View File

@ -8,7 +8,7 @@ COMPILE FUNCTION Comm_WO_Rec(Instruction, Parm1,Parm2)
DECLARE SUBROUTINE Set_Property, Set_Status, ErrMsg, Set_Property, obj_AppWindow, obj_Notes, Print_RX_Voucher, obj_Tables
DECLARE SUBROUTINE Btree.Extract, Send_Event, Security_Err_Msg, Forward_Event, End_Window, obj_WO_Log, obj_WO_Mat
DECLARE SUBROUTINE Logging_Services, Post_Event, Work_Order_Services, Error_Services, Database_Services
DECLARE SUBROUTINE Logging_Services, Post_Event, Work_Order_Services, Error_Services, Database_Services, Service_Services
DECLARE FUNCTION Get_Property, Get_Status, Popup, Send_Message, Msg, Security_Check, Dialog_Box, RowExists, obj_Prod_Spec
DECLARE FUNCTION obj_Schedule, Dialog_Box, obj_WO_Log, obj_Order_Det, FindWindow,ShowWindow, obj_Tables, obj_WO_Mat, MemberOf
DECLARE FUNCTION Logging_Services, Environment_Services, Work_Order_Services, Error_Services, Service_Services
@ -179,15 +179,19 @@ Read:
MsgUp = Msg(@window, Def)
Columns = 'CASS_NO':@VM:'LOT_NO':@VM:'WAFER_QTY':@VM:'CUST_PART_NO':@VM:'SUB_PART_NO':@VM:'SUB_VEND_CD':@VM:'RX_DTM':@VM:'RX_BY':@VM:'ORDER_ITEM'
WOMatKeys = Wo_Mat_Services('GetWOMatKeys', WONo)
If Error_Services('NoError') then
CassData = WO_Mat_Services('GetWOMatData', WOMatKeys, Columns)
If Error_Services('NoError') then
Set_Property(@Window:'.CASS_NO', 'ARRAY', CassData)
Msg(@window, MsgUp)
end else
Msg(@window, MsgUp)
Msg(@Window, '', 'OK', '', 'Process Error':@FM:Error_Services('GetMessage'))
end
If Error_Services('NoError') then
If (WOMatKeys NE '') then
CassData = WO_Mat_Services('GetWOMatData', WOMatKeys, Columns)
If Error_Services('NoError') then
Set_Property(@Window:'.CASS_NO', 'ARRAY', CassData)
Msg(@window, MsgUp)
end else
Msg(@window, MsgUp)
Msg(@Window, '', 'OK', '', 'Process Error':@FM:Error_Services('GetMessage'))
end
end else
Msg(@window, MsgUp)
end
end else
Msg(@window, MsgUp)
Msg(@Window, '', 'OK', '', 'Process Error':@FM:Error_Services('GetMessage'))
@ -647,6 +651,8 @@ Scan:
end
Logging_Services('AppendLog', objReceiveLog, LogData, @RM, @FM)
Service_Services('PostProcedure', 'WORK_ORDER_SERVICES', 'UpdateWorkOrderData':SD$:WONo)
Post_Event(@Window, 'READ')
end
@ -931,4 +937,3 @@ AddLeftover:
RETURN

View File

@ -32,7 +32,8 @@ DataFields := "EVENT_BEGIN_WAFER_QTY" :@VM:SQL_Format(Rec(LOT_EVENT_EVENT_BEGIN
DataFields := "EVENT_END_WAFER_QTY" :@VM:SQL_Format(Rec(LOT_EVENT_EVENT_END_WAFER_QTY$), "INT"):@FM
DataFields := "EVENT_OPERATION_ID" :@VM:SQL_Format(Rec(LOT_EVENT_EVENT_OPERATION_ID$), "STR"):@FM
DataFields := "EVENT_OPERATOR_ID" :@VM:SQL_Format(Rec(LOT_EVENT_EVENT_OPERATOR_ID$), "STR"):@FM
DataFields := "SEQUENCE" :@VM:SQL_Format(Rec(LOT_EVENT_SEQUENCE$), "INT")
DataFields := "SEQUENCE" :@VM:SQL_Format(Rec(LOT_EVENT_SEQUENCE$), "INT"):@FM
DataFields := "CHRON_ID" :@VM:SQL_Format(Rec(LOT_EVENT_CHRON_ID$), "INT")
// Symbolics
@ -43,3 +44,4 @@ Ans = SQL_Write(Connection, "LOT_EVENT", Keys, DataFields);
// Multi-valued Fields
Return Ans

View File

@ -14,7 +14,7 @@ Declare function SQL_Write, SQL_Write_MV, SQL_Format
Ans = ""
// Parse record into a dimensioned array for speed
Dim Rec(24)
Dim Rec(25)
MatParse Record into Rec
// List of key names and their values
@ -54,3 +54,4 @@ Ans = SQL_Write(Connection, "LOT_OPERATION", Keys, DataFields);
// Multi-valued Fields
Return Ans

View File

@ -62,11 +62,10 @@ Main:
Open "DICT.":Table to @DICT then null
@ID = Key
Ans = Function(@Handler(Connection, Key, @RECORD))
If Ans EQ '' then
If (Ans EQ '') then
If Assigned(pKey) then
If pKey NE '' then
If (pKey NE '') then
Delete pTable, pKey else Null
Unlock pTable, pKey else Null
end
end
end
@ -101,7 +100,9 @@ Main:
end
If Assigned(pKey) then
If (pKey NE '') then
If (pKey NE '') then
// Call unlock here in case we ran into an error above
Unlock pTable, pKey else Null
// Always log the result
Open 'SQL_LOG' to hLog then
If Ans EQ '' then

View File

@ -0,0 +1,30 @@
Compile function Delete_LOT_EVENT_Record_From_SQL(Connection, Key, Record)
/*****************************************************************************\
Deletes the given LOT_EVENT record from the MSSQL database.
History
-------
08/15/2025 DJS Original Programmer
\*****************************************************************************/
Declare function SQL_Delete, SQL_Format
Ans = ""
// List of key names and their values
Keys = "LOT_EVENT_ID":@VM:SQL_Format(Key, "STR")
//-------------------------------------------------------------------------------------------------
// Multi-valued Fields
!! Delete records from MV tables first !!
// Currently no multi-value (child) tables
// LOT_EVENT
If Ans EQ "" then
Ans = SQL_Delete(Connection, "LOT_EVENT", Keys)
end
Return Ans

View File

@ -0,0 +1,30 @@
Compile function Delete_LOT_EVENT_TYPE_Record_From_SQL(Connection, Key, Record)
/*****************************************************************************\
Deletes the given LOT_EVENT_TYPE record from the MSSQL database.
History
-------
08/15/2025 DJS Original Programmer
\*****************************************************************************/
Declare function SQL_Delete, SQL_Format
Ans = ""
// List of key names and their values
Keys = "LOT_EVENT_TYPE_ID":@VM:SQL_Format(Key, "STR")
//-------------------------------------------------------------------------------------------------
// Multi-valued Fields
!! Delete records from MV tables first !!
// Currently no multi-value (child) tables
// LOT_EVENT_TYPE
If Ans EQ "" then
Ans = SQL_Delete(Connection, "LOT_EVENT_TYPE", Keys)
end
Return Ans

View File

@ -0,0 +1,30 @@
Compile function Delete_LOT_OPERATION_Record_From_SQL(Connection, Key, Record)
/*****************************************************************************\
Deletes the given LOT_OPERATION record from the MSSQL database.
History
-------
08/15/2025 DJS Original Programmer
\*****************************************************************************/
Declare function SQL_Delete, SQL_Format
Ans = ""
// List of key names and their values
Keys = "LOT_OPERATION_ID":@VM:SQL_Format(Key, "STR")
//-------------------------------------------------------------------------------------------------
// Multi-valued Fields
!! Delete records from MV tables first !!
// Currently no multi-value (child) tables
// LOT_OPERATION
If Ans EQ "" then
Ans = SQL_Delete(Connection, "LOT_OPERATION", Keys)
end
Return Ans

View File

@ -0,0 +1,30 @@
Compile function Delete_LOT_Record_From_SQL(Connection, Key, Record)
/*****************************************************************************\
Deletes the given LOT record from the MSSQL database.
History
-------
08/15/2025 DJS Original Programmer
\*****************************************************************************/
Declare function SQL_Delete, SQL_Format
Ans = ""
// List of key names and their values
Keys = "LOT_ID":@VM:SQL_Format(Key, "STR")
//-------------------------------------------------------------------------------------------------
// Multi-valued Fields
!! Delete records from MV tables first !!
// Currently no multi-value (child) tables
// LOT
If Ans EQ "" then
Ans = SQL_Delete(Connection, "LOT", Keys)
end
Return Ans

View File

@ -0,0 +1,30 @@
Compile function Delete_OPERATION_Record_From_SQL(Connection, Key, Record)
/*****************************************************************************\
Deletes the given OPERATION record from the MSSQL database.
History
-------
08/15/2025 DJS Original Programmer
\*****************************************************************************/
Declare function SQL_Delete, SQL_Format
Ans = ""
// List of key names and their values
Keys = "OPERATION_ID":@VM:SQL_Format(Key, "STR")
//-------------------------------------------------------------------------------------------------
// Multi-valued Fields
!! Delete records from MV tables first !!
// Currently no multi-value (child) tables
// OPERATION
If Ans EQ "" then
Ans = SQL_Delete(Connection, "OPERATION", Keys)
end
Return Ans

View File

@ -52,10 +52,11 @@ Main:
// Read the record and call the handler
If Key NE "" then
Ans = Function(@Handler(Connection, Key))
If Ans EQ '' then
If (Ans EQ '') then
If Assigned(pKey) then
Delete pTable, pKey else Null
Unlock pTable, pKey else Null
If (pKey NE '') then
Delete pTable, pKey else Null
end
end
end
end
@ -85,7 +86,9 @@ Main:
// Always log the result
If Assigned(pKey) then
If (pKey NE '') then
If (pKey NE '') then
// Call unlock here in case an error was encountered above
Unlock pTable, pKey else Null
Open 'SQL_LOG' to hLog then
If Ans EQ '' then
Result = 'PROCESSED'

View File

@ -590,7 +590,9 @@ Service SetupDevServices()
BaselineServices = 'Update Material Logs':@VM:'Log Transaction Postings':@VM:'Process Wafer Image Queue':@VM
BaselineServices := 'Process UCL Requests':@VM:'Process ROTR Requests':@VM:'Process Wafer Image Requests':@VM
BaselineServices := 'Process SQL Requests':@VM:'Send Notes':@VM:'Update Notification Groups':@VM
BaselineServices := 'Update Security Groups':@VM:'Auto Scheduler'
BaselineServices := 'Update Security Groups':@VM:'Auto Scheduler':@VM:'Update NICA Orders':@VM:'Process Procedure Queue':@VM
BaselineServices := 'Process Transaction Queue':@VM:'Update Open Work Order Statuses':@VM:'Update Work Order Wafer Quantities':@VM
BaselineServices := 'Process Mona Requests'
Query = "SELECT SERVICES"

View File

@ -84,7 +84,7 @@ Service IsProd()
Machine = Environment_Services('GetServer')
IsProd = False$
If Machine _NEC "messa012" and Machine _NEC "mestsa01ec" and Machine _NEC "mestsa09ec" and Machine _NEC "mestsa010ec" and Machine _NEC "mestsa011ec" and Machine _NEC "mestsa012ec" and Machine _NEC "MESTST1010" and Machine _NEC "MESTST1009" then
If Machine _NEC "messa012" and Machine _NEC "mestsa01ec" and Machine _NEC "mestsa09ec" and Machine _NEC "mestsa010ec" and Machine _NEC "mestsa011ec" and Machine _NEC "mestsa012ec" and Machine _NEC "mestsa024ec" and Machine _NEC "MESTST1010" and Machine _NEC "MESTST1009" then
IsProd = True$
end
Response = IsProd
@ -122,7 +122,8 @@ Service GetApplicationRootIP()
Case Machine EQ 'MESTSA09EC' ; ApplicationRootIP = '\\10.95.140.62'
Case Machine EQ 'MESTSA010EC' ; ApplicationRootIP = '\\10.95.140.63'
Case Machine EQ 'MESTSA011EC' ; ApplicationRootIP = '\\10.95.140.64'
Case Machine EQ 'MESTSA012EC' ; ApplicationRootIP = '\\10.95.140.65'
Case Machine EQ 'MESTSA012EC' ; ApplicationRootIP = '\\10.95.140.65'
Case Machine EQ 'MESTSA024EC' ; ApplicationRootIP = '\\10.95.140.66'
Case Machine EQ 'MESSA012' ; ApplicationRootIP = '\\10.95.176.50'
Case Machine EQ 'MESST5201' ; ApplicationRootIP = '\\10.95.140.14'
Case Machine EQ 'MESST5202' ; ApplicationRootIP = '\\10.95.140.14'
@ -325,6 +326,7 @@ Service GetLocalRootPath()
Case Machine EQ 'MESTSA010EC' ; LocalRootPath = 'D:'
Case Machine EQ 'MESTSA011EC' ; LocalRootPath = 'D:'
Case Machine EQ 'MESTSA012EC' ; LocalRootPath = 'D:'
Case Machine EQ 'MESTSA024EC' ; LocalRootPath = 'D:'
Case Machine EQ 'MESST6501' ; LocalRootPath = 'C:' ; // This is a map to the user's actual C drive.
Case Machine EQ 'MESST6502' ; LocalRootPath = 'C:' ; // This is a map to the user's actual C drive.
Case Machine EQ 'MESTST1006' ; LocalRootPath = 'C:' ; // This is a map to the user's actual C drive.

View File

@ -46,19 +46,19 @@ Compile function Hold_Services(@Service, @Params)
***********************************************************************************************************************/
#pragma precomp SRP_PreCompiler
$insert LOGICAL
$Insert SERVICE_SETUP
$Insert APP_INSERTS
$Insert SERVICE_SETUP
$Insert MSG_EQUATES
$Insert DICT_EQUATES
$Insert WO_MAT_EQUATES
$INSERT NOTIFICATION_EQU
$Insert NOTIFICATION_EQU
Declare function Database_Services, Error_Services, Obj_Wm_In, Obj_Wm_Out, Unassigned, Wm_In_Services, Wm_Out_Services
Declare function PSN_Services, SRP_Rotate_Array, Datetime, Hold_Services, Memberof, Error_Services, Rds_Services
Declare function Environment_Services, Utility, Logging_Services
Declare subroutine Database_Services, Error_Services, Obj_notes, Hold_Services, Obj_Wm_In, Obj_Wm_Out, Wm_In_Services
Declare subroutine Wm_Out_Services, Rds_Services, Lot_Event_Services
Declare subroutine Wm_Out_Services, Rds_Services, Lot_Event_Services, Logging_Services
GoToService else
Error_Services('Add', Service : ' is not a valid service request within the ' : ServiceModule : ' module.')
@ -268,7 +268,7 @@ end service
// Places a lot on hold.
//----------------------------------------------------------------------------------------------------------------------
Service OnHold(WOMatKey, HoldEntity, HoldEntityID, HoldType, HoldData, OperatorID, OriginFlag)
IF WOMatKey = '' or HoldEntity = '' or HoldEntityID = '' or HoldType = '' THEN
Error_Services('Add', 'Null parameter WOMatKey, HoldEntity, HoldEntityID, or HoldType passed to service.')
end else
@ -361,29 +361,42 @@ Service OnHold(WOMatKey, HoldEntity, HoldEntityID, HoldType, HoldData, OperatorI
If Error_Services("NoError") then
Hold_Services("HoldNotification", HoldEntity, HoldEntityID, Reason, True$, HoldType, OperatorID)
Hold_Services("CreateComment", HoldEntity, HoldEntityID, Reason, True$, HoldType, OperatorID)
//Add in logging lot event
If UserId EQ '' then
UserId = OperatorId
end
LotKey = ''
Begin Case
Case HoldEntity EQ 'WM_IN'
WONo = Field(WOMatKey, '*', 1)
StepNo = 1
CassNo = Field(WOMatKey, '*', 2)
WONo = Field(WOMatKey, '*', 1)
StepNo = 1
CassNo = Field(WOMatKey, '*', 2)
WMInKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Event_Services('CreateLotEvent', WMInKey, CurrDTM, 'HOLD_ON', 'Lot placed on hold.', '', UserId, True$, 'WM_IN')
LotKey = 'I':WMInKey
Convert '*' to '.' in LotKey
Case HoldEntity EQ 'WM_OUT'
WONo = Field(WOMatKey, '*', 1)
StepNo = 1
CassNo = Field(WOMatKey, '*', 2)
WONo = Field(WOMatKey, '*', 1)
StepNo = 1
CassNo = Field(WOMatKey, '*', 2)
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Event_Services('CreateLotEvent', WMOutKey, CurrDTM, 'HOLD_ON', 'Lot placed on hold.', '', UserId, True$, 'WM_OUT')
LotKey = 'O':WMOutKey
Convert '*' to '.' in LotKey
Case HoldEntity EQ 'RDS'
RDSNo = Xlate('WO_MAT', WOMatKey, WO_MAT_RDS_NO$, 'X')
Lot_Event_Services('CreateLotEvent', RDSNo, CurrDTM, 'HOLD_ON', 'Lot placed on hold.', '', UserId, True$, 'RDS')
RDSNo = Xlate('WO_MAT', WOMatKey, WO_MAT_RDS_NO$, 'X')
LotKey = 'R':RDSNo
Convert '*' to '.' in LotKey
Case HoldEntity EQ 'WO_MAT'
Lot_Event_Services('CreateLotEvent', WOMatKey, CurrDTM, 'HOLD_ON', 'Lot placed on hold.', '', UserId, True$, 'WO_MAT')
LotKey = 'W':WOMatKey
Convert '*' to '.' in LotKey
End Case
Machine = Environment_Services('GetServer')
Headers = 'Logging DTM' : @FM : 'Machine' : @FM : 'Log'
ColumnWidths = 20 : @FM : 15 : @FM : 300
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\Lot'
makeDirSuccess = Utility("MAKEDIR", LogPath)
LogFileName = LotKey:'.csv'
objLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, ' ', Headers, ColumnWidths, False$, False$)
LogData = ''
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS') ; // Logging DTM
LogData<2> = Machine
LogData<3> = 'Lot ':LotKey:' of type ':HoldEntity:' placed on hold by user ':OperatorId
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
end
end else
Error_Services('Add', 'Lot is already on hold.')
@ -406,7 +419,7 @@ End Service
// Removes a hold placed on a lot.
//----------------------------------------------------------------------------------------------------------------------
Service OffHold(WOMatKey, HoldEntity, HoldEntityID, HoldType, HoldData, OperatorID, OriginFlag)
IF WOMatKey = '' or HoldEntity = '' or HoldEntityID = '' or HoldType = '' THEN
Error_Services('Add', 'Null parameter WOMatKey, HoldEntity, HoldEntityID, or HoldType passed to service.')
end else
@ -497,29 +510,43 @@ Service OffHold(WOMatKey, HoldEntity, HoldEntityID, HoldType, HoldData, Operator
If Error_Services("NoError") then
Hold_Services("HoldNotification", HoldEntity, HoldEntityID, Reason, False$, HoldType, OperatorID)
Hold_Services("CreateComment", HoldEntity, HoldEntityID, Reason, False$, HoldType, OperatorID)
//Add in logging lot event
if UserID EQ '' then
UserId = OperatorId
end
Begin Case
Case HoldEntity EQ 'WM_IN'
WONo = Field(WOMatKey, '*', 1)
StepNo = 1
CassNo = Field(WOMatKey, '*', 2)
WMInKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Event_Services('CreateLotEvent', WMInKey, CurrDTM, 'HOLD_OFF', 'Lot taken off hold.', '', UserId, True$, 'WM_IN')
Case HoldEntity EQ 'WM_OUT'
WONo = Field(WOMatKey, '*', 1)
StepNo = 1
CassNo = Field(WOMatKey, '*', 2)
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Event_Services('CreateLotEvent', WMOutKey, CurrDTM, 'HOLD_OFF', 'Lot taken off hold.', '', UserId, True$, 'WM_OUT')
Case HoldEntity EQ 'RDS'
RDSNo = Xlate('WO_MAT', WOMatKey, WO_MAT_RDS_NO$, 'X')
Lot_Event_Services('CreateLotEvent', RDSNo, CurrDTM, 'HOLD_OFF', 'Lot taken off hold.', '', UserId, True$, 'RDS')
Case HoldEntity EQ 'WO_MAT'
Lot_Event_Services('CreateLotEvent', WOMatKey, CurrDTM, 'HOLD_OFF', 'Lot taken off hold.', '', UserId, True$, 'WO_MAT')
End Case
LotKey = ''
Begin Case
Case HoldEntity EQ 'WM_IN'
WONo = Field(WOMatKey, '*', 1)
StepNo = 1
CassNo = Field(WOMatKey, '*', 2)
WMInKey = WONo : '*' : StepNo : '*' : CassNo
LotKey = 'I':WMInKey
Convert '*' to '.' in LotKey
Case HoldEntity EQ 'WM_OUT'
WONo = Field(WOMatKey, '*', 1)
StepNo = 1
CassNo = Field(WOMatKey, '*', 2)
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
LotKey = 'O':WMOutKey
Convert '*' to '.' in LotKey
Case HoldEntity EQ 'RDS'
RDSNo = Xlate('WO_MAT', WOMatKey, WO_MAT_RDS_NO$, 'X')
LotKey = 'R':RDSNo
Case HoldEntity EQ 'WO_MAT'
LotKey = WOMatKey
Convert '*' to '.' in LotKey
End Case
Machine = Environment_Services('GetServer')
Headers = 'Logging DTM' : @FM : 'Machine' : @FM : 'Log'
ColumnWidths = 20 : @FM : 15 : @FM : 300
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\Lot'
makeDirSuccess = Utility("MAKEDIR", LogPath)
LogFileName = LotKey:'.csv'
objLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, ' ', Headers, ColumnWidths, False$, False$)
LogData = ''
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS') ; // Logging DTM
LogData<2> = Machine
LogData<3> = 'Lot ':LotKey:' of type ':HoldEntity:' taken off hold by user ':OperatorId
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
end
end else
Error_Services('Add', 'Lot is not on hold.')

View File

@ -55,7 +55,7 @@ $Insert LOT_EQUATES
$Insert LOT_OPERATION_EQUATES
Declare function Error_Services, Logging_Services, Environment_Services, Database_Services, RTI_CreateGUID
Declare function Lot_Event_Services, Lot_Services
Declare function Lot_Event_Services, Lot_Services, NextKey
Declare subroutine Error_Services, Logging_Services, Database_Services, Lot_Services, Service_Services
Declare subroutine Transaction_Services
@ -89,28 +89,36 @@ Service CreateLotEvent(LotId, EventDateTime, EventType=EVENT_TYPES, EventNote, E
end
end
If RowExists('LOT', LotId) then
CurrLotOperation = Lot_Services('GetLotCurrOperationId', LotId)
NewEventId = RTI_CreateGUID()
If NewEventId NE '' then
NewEventSequence = Lot_Event_Services('GetLotEventNextSequence', LotId)
If Error_Services('NoError') then
NewEventRec = ''
NewEventRec<LOT_EVENT_LOT_ID$> = LotId
NewEventRec<LOT_EVENT_LOT_EVENT_TYPE$> = EventType
NewEventRec<LOT_EVENT_EVENT_DATETIME$> = EventDatetime
NewEventRec<LOT_EVENT_EVENT_NOTE$> = EventNote
NewEventRec<LOT_EVENT_EQUIPMENT_ID$> = EventEquipmentId
NewEventRec<LOT_EVENT_EVENT_OPERATOR_ID$> = OperatorId
NewEventRec<LOT_EVENT_SEQUENCE$> = NewEventSequence
Database_Services('WriteDataRow', 'LOT_EVENT', NewEventId, NewEventRec)
If Error_Services('NoError') then
Transaction_Services('PostWriteFieldTransaction', 'LOT', LotId, LOT_MOST_RECENT_LOT_EVENT_ID$, NewEventId)
If Error_Services('HasError') then ErrorMessage = Error_Services('GetMessage')
end else
ErrorMessage = 'Error creating new event : ' : Error_Services('GetMessage')
end
end else
ErrorMessage = Error_Services('GetMessage')
end
NextEventChronId = NextKey('LOT_EVENT')
If NextEventChronId NE 0 then
NewEventSequence = Lot_Event_Services('GetLotEventNextSequence', LotId)
If Error_Services('NoError') then
NewEventRec = ''
NewEventRec<LOT_EVENT_LOT_ID$> = LotId
NewEventRec<LOT_EVENT_LOT_EVENT_TYPE$> = EventType
NewEventRec<LOT_EVENT_EVENT_DATETIME$> = EventDatetime
NewEventRec<LOT_EVENT_EVENT_NOTE$> = EventNote
NewEventRec<LOT_EVENT_EVENT_OPERATION_ID$> = CurrLotOperation
NewEventRec<LOT_EVENT_EQUIPMENT_ID$> = EventEquipmentId
NewEventRec<LOT_EVENT_EVENT_OPERATOR_ID$> = OperatorId
NewEventRec<LOT_EVENT_SEQUENCE$> = NewEventSequence
NewEventRec<LOT_EVENT_CHRON_ID$> = NextEventChronId
Database_Services('WriteDataRow', 'LOT_EVENT', NewEventId, NewEventRec)
If Error_Services('NoError') then
Transaction_Services('PostWriteFieldTransaction', 'LOT', LotId, LOT_MOST_RECENT_LOT_EVENT_ID$, NewEventId)
If Error_Services('HasError') then ErrorMessage = Error_Services('GetMessage')
end else
ErrorMessage = 'Error creating new event : ' : Error_Services('GetMessage')
end
end else
ErrorMessage = Error_Services('GetMessage')
end
end else
ErrorMessage = 'Error creating new event. Error calling NextKey("LOT_EVENT") to get LOT_EVENT_CHRON_ID.'
end
end else
ErrorMessage = 'Error creating an event Id.'
end
@ -233,3 +241,5 @@ return

View File

@ -53,7 +53,8 @@ Declare function PSN_Services, Return_To_Fab_Services
Declare subroutine Database_Services, Btree.Extract, Lot_Services, Error_Services, Labeling_Services, SRP_Json, Logging_Services
Declare subroutine SRP_Run_Command, Service_Services, obj_notes, Lot_Event_Services, Mona_Services
$insert APP_INSERTS
$Insert SERVICE_SETUP
$Insert APP_INSERTS
$Insert LOT_EQUATES
$Insert TEST_WAFER_PROD_EQUATES
$Insert Lot_Operation_Equates
@ -65,6 +66,7 @@ $Insert RDS_EQUATES
$Insert WO_LOG_EQUATES
$Insert PROD_VER_EQUATES
$Insert OPERATION_EQUATES
$Insert IFX_EQUATES
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\Lot'
LogDate = Oconv(Date(), 'D4/')
@ -81,7 +83,7 @@ objLotStartLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, ',', He
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' LotRun.csv'
Headers = 'Logging DTM' : @FM : 'Lot Id' : @FM : 'Username' : @FM : 'Tool Id' : @FM : 'Message'
objRunLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, ',', Headers, '', False$, False$)
objLotRunLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, ',', Headers, '', False$, False$)
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' LotMove.csv'
Headers = 'Logging DTM' : @FM : 'Lot Id' : @FM : 'Username' : @FM : 'Message'
@ -106,7 +108,9 @@ end else
MonaResource = 'GRP_OPENINSIGHT_MES_OP_FE_DEV_LOTSERVICES'
end
GoToService
GoToService else
Error_Services('Add', Service : ' is not a valid service request within the ' : ServiceModule : ' services module.')
end
Return Response or ""
@ -1226,7 +1230,7 @@ Service OpenLot(LotId)
LotRec<LOT_OPEN$> = True$
Database_Services('WriteDataRow', 'LOT', LotId, LotRec, True$, False$, False$)
If Error_Services('NoError') then
Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'OPEN', 'Lot status set to Open.', '', 'SYSTEM')
Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'LOT_START', 'Lot created.', '', 'SYSTEM')
end else
ErrorMessage = 'Error setting lot ' : LotId : ' to open.' : Error_Services('GetMessage')
end
@ -1409,7 +1413,7 @@ Service ReduceLotWaferCount(LotId, ReductionQty, OperatorId)
// Write Lot Event
Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'REDUCE_WAFER_QTY', 'Reduced wafer count by ' : ReductionQty, '', OperatorId, False$, '')
if LotNewWfrQty EQ 0 AND LotType EQ 'TW' then
ServiceParms = 'AutoCloseTestWaferLot' : @VM : LotId : @VM : 'SYSTEM'
ServiceParms = 'AutoCloseTestWaferLot' : SD$ : LotId : SD$ : 'SYSTEM'
Service_Services('PostProcedure', 'LOT_SERVICES', ServiceParms)
If Error_Services('HasError') then
Recipients = Xlate('NOTIFICATION', 'FI_SUPPORT', NOTIFICATION_USER_ID$, 'X')
@ -1465,7 +1469,7 @@ Service IncreaseLotWaferCount(LotId, IncreaseQty, OperatorId)
Database_Services('WriteDataRow', 'LOT', LotId, LotRec, True$, False$, False$)
If Error_Services('NoError') then
// Write Lot Event
Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'INCREASE_WAFER_QTY', 'Increased wafer count by ' : IncreaseQty, '', OperatorId, False$, '')
Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'BONUS_WAFER_QTY', 'Increased wafer count by ' : IncreaseQty, '', OperatorId, False$, '')
end else
ErrorMessage = 'Error in Increase Lot Wafer Count service, Error writing Lot Id ' : LotId : ' with new quantity.'
end
@ -1580,11 +1584,11 @@ Service CreateNewVoidedLotRecord(LotId, LegacyLotId, LotType=LOT_TYPES, Username
EndTick = GetTickCount()
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
If ErrorMessage NE '' then Error_Services('Add', ErrorMessage)
end service
Service CanUserModifyLot(UserId)
Begin Case

View File

@ -254,19 +254,13 @@ Service ProcessPTIScanData(ScanData, ScanType = SCAN_TYPES, Param1, Param2, Para
If ErrorMsg EQ '' then Response = ScanSubLot
Case ScanType EQ 'CASSETTE1'
debug
// Assume this is intended to be a Cassette ID scan (either WMO or RDS). Only if this is a
// non-existent carrier will the scan data be considered invalid.
// Strip '1T', 'I', and 'O' prefixes.
ValidCassetteID = False$ ; // Assume Cassette ID is not valid for now.
DelimCount = DCount(ScanData, '|')
Begin Case
Case (ScanData[1, 1] EQ 'I')
! Temporary exception while we exhaust current WMI inventory on KIT racks that
! do not have a 2D barcode.
CassetteID = ScanData
SeqNo = 'SEQ1'
Case ( (ScanData[1, 2] EQ '1T') or (ScanData[1, 1] EQ 'O') )
Case ( (ScanData[1, 2] EQ '1T') or (ScanData[1, 1] EQ 'O') or (ScanData[1, 1] EQ 'I') )
ErrorMsg = '1D Lot Label Scanned. 2D Lot Label Required.'
Case (DelimCount NE 8)
ErrorMsg = 'Invalid Lot Label Scan.'
@ -315,12 +309,7 @@ Service ProcessPTIScanData(ScanData, ScanType = SCAN_TYPES, Param1, Param2, Para
DelimCount = DCount(ScanData, '|')
Begin Case
Case (ScanData[1, 1] EQ 'I')
! Temporary exception while we exhaust current WMI inventory on KIT racks that
! do not have a 2D barcode.
CassetteID = ScanData
Seq2No = 'SEQ2'
Case ( (ScanData[1, 2] EQ '1T') or (ScanData[1, 1] EQ 'O') )
Case ( (ScanData[1, 2] EQ '1T') or (ScanData[1, 1] EQ 'O') or (ScanData[1, 1] EQ 'I') )
ErrorMsg = '1D Lot Label Scanned. 2D Lot Label Required.'
Case (DelimCount NE 8)
ErrorMsg = 'Invalid Lot Label Scan.'

View File

@ -383,16 +383,12 @@ Service GetSP1(Handle)
Result<10> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].DcnHazeAvgMean'); // HazeAvg
Result<28> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].RDS'); // RDSKeyID
Result<30> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].Session'); // ScanRecipe
IsMisfit = IndexC(Result<30>, 'MISFIT', 1)
IF IsMisfit THEN
Result<3> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].DcnAllMean'); // SoDAvg
Result<2> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].DcnAllMax'); // SoDMax
Result<1> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].DcnAllMin'); // SoDMin
END ELSE
Result<39> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].DcnAllMean'); // SoDAvg
Result<40> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].DcnAllMax'); // SoDMax
Result<41> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].DcnAllMin'); // SoDMin
END
Result<3> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].DcnLpdMean'); // SoDAvg
Result<2> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].DcnLpdMax'); // SoDMax
Result<1> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].DcnLpdMin'); // SoDMin
Result<39> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].DcnAllMean'); // SoDAvg
Result<40> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].DcnAllMax'); // SoDMax
Result<41> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].DcnAllMin'); // SoDMin
Result<43> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].MesEntity'); // ScanTool
Result<44> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].DcnAreaMean'); // DCNMM2
END
@ -418,36 +414,27 @@ Service ImportMetrologyFiles(Machine=MACHINE_TYPES)
Begin Case
Case Machine _EQC 'Tencor'
SearchPattern = '*.pdsf';
DataPath = Environment_Services('GetApplicationRootPath') : '\Metrology\MET08DDUPSFS6420\Source\MET08DDUPSFS6420\'
Case Machine _EQC 'HgCV'
SearchPattern = '*.pdsf';
DataPath = Environment_Services('GetApplicationRootPath') : '\Metrology\MET08RESIHGCV\Source\MET08RESIHGCV\'
Case Machine _EQC 'CDE'
SearchPattern = '*.pdsf';
DataPath = Environment_Services('GetApplicationRootPath') : '\Metrology\MET08RESIMAPCDE\Source\MET08RESIMAPCDE\'
Case Machine _EQC 'Biorad'
SearchPattern = '*.txt';
DataPath = Environment_Services('GetApplicationRootPath') : '\Metrology\MET08THFTIRQS408M\Source\MET08THFTIRQS408M\'
Case Machine _EQC 'Stratus'
SearchPattern = '*.txt';
DataPath = Environment_Services('GetApplicationRootPath') : '\Metrology\MET08THFTIRSTRATUS\Source\MET08THFTIRSTRATUS\'
Case Machine _EQC 'SP1'
SearchPattern = '*.pdsf';
DataPath = Environment_Services('GetApplicationRootPath') : '\Metrology\MET08DDUPSP1TBI\Source\MET08DDUPSP1TBI\'
Case Machine _EQC 'SPV'
SearchPattern = '*.txt';
DataPath = Environment_Services('GetApplicationRootPath') : '\Metrology\MET08RESISRP2100\Source\MET08RESISRP2100\'
Case Machine _EQC 'SRP'
SearchPattern = '*.txt';
DataPath = Environment_Services('GetApplicationRootPath') : '\Metrology\MET08ANLYSDIFAAST230\Source\MET08ANLYSDIFAAST230\'
Case Otherwise$
SearchPattern = '*.txt';
Error_Services('Add', 'Error in ':Service:' service. Unsupported Machine "':Machine:'" passed into service')
End Case
If Error_Services('NoError') then
SearchPattern = '*.pdsf';
InitDir DataPath:SearchPattern
FileList = DirList()
FileNames = ''
@ -524,41 +511,15 @@ Service ImportMetrologyFiles(Machine=MACHINE_TYPES)
RepoPath = Environment_Services('GetApplicationRootPath') : '\Metrology\Run Data Repository\MET08ANLYSDIFAAST230\Source\MET08ANLYSDIFAAST230\'
End Case
IF SearchPattern = '*.pdsf' THEN
OSREAD Text FROM DataPath:FileName THEN
json = Metrology_Services('GetJsonFromProcessDataStandardFormat', Text);
END ELSE
json = '';
END
IF LEN(json) GT 0 THEN
RunData = Metrology_Services('GetRunData', Machine, json);
END ELSE
Metrology_Services('LogResults', PSN, Machine, 'UID002', Service : ' : ' : 'Failed to get PDSF json');
END
OSREAD Text FROM DataPath:FileName THEN
json = Metrology_Services('GetJsonFromProcessDataStandardFormat', Text);
END ELSE
OSREAD RunData FROM DataPath:FileName THEN
Set_Status(0)
OSWrite RunData to RepoPath:FileName
status_code = ''
If Get_Status(status_code) then
ErrorMessage = 'Error writing run data file to repository: status_code = ' : status_code
Metrology_Services('LogResults', '', Machine, 'UID001', Service : ' : ' : ErrorMessage)
Set_Status(0)
end
SWAP '|' WITH @VM IN RunData
SWAP CRLF$ WITH @FM IN RunData
LOOP
LastChar = RunData[-1,1]
UNTIL LastChar NE @FM
RunData[-1,1] = ''
REPEAT
Convert Tab$ to @FM in RunData
END else
Metrology_Services('LogResults', '', Machine, 'UID001', 'Read : ' : FileName : ', Size : ' : FileSize)
end
json = '';
END
IF LEN(json) GT 0 THEN
RunData = Metrology_Services('GetRunData', Machine, json);
END ELSE
Metrology_Services('LogResults', PSN, Machine, 'UID002', Service : ' : ' : 'Failed to get PDSF json');
END
*************************
@ -681,7 +642,12 @@ Service ImportMetrologyRunData(Machine, DataPath, FileName, RunData)
Begin Case
Case Machine _EQC 'Stratus'
PSN = RunData<9>
Metrology_Services('ImportStratusData', RunData, ResourceID, PSN)
QualFile = ( (PSN EQ 'T-Low') or (PSN EQ 'T-Mid') or (PSN EQ 'T-High') or (PSN EQ 'T_LOW') or (PSN EQ 'T_MID') or (PSN EQ 'T_HIGH') )
IF QualFile THEN
Metrology_Services('ImportStratusQualData', RunData, ResourceID, PSN)
END ELSE
Metrology_Services('ImportStratusData', RunData, ResourceID, PSN)
END
MachineType@ = 'Stratus'
Case Machine _EQC 'Biorad'
@ -742,6 +708,43 @@ Service ImportMetrologyRunData(Machine, DataPath, FileName, RunData)
end service
Service ImportStratusQualData(RunData, ResourceID, PSN)
Machine = 'BioRad'
URL = "https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQSV3/":ResourceID:"/header"
TimeoutDuration = HTTPClient_Services('GetTimeoutDuration')
If TimeoutDuration NE 30 then Httpclient_Services('SetTimeoutDuration', 30)
Response = Httpclient_Services('SendHTTPRequest', 'GET', URL, '', '', '', '', '', '', '')
If Response NE '' then
objJSON = ''
If SRP_JSON(objJSON, 'Parse', Response) EQ '' then
SumOOS = SRP_JSON(objJSON, 'GetValue', 'Results[1].iq_sum')
ToolID = RunData<7>
TimeStamp = RunData<2>
If SumOOS NE '' then
Swap 'T_LOW' with 'T-Low' in PSN
Swap 'T_MID' with 'T-Mid' in PSN
Swap 'T_HIGH' with 'T-High' in PSN
Pass = (SumOOS EQ 0)
QualResponse = PM_Services('ProcessQual', PSN, ToolID, TimeStamp, Pass)
StatusCode = QualResponse<1>
Message = QualResponse<2>
Metrology_Services('LogResults', PSN, Machine, StatusCode, Service : ' : ' : Message)
end else
LogMessage = 'IQS response missing Results[1].iq_sum. Error message: ':SRP_JSON(objJSON, 'GetValue', 'message')
Metrology_Services('LogResults', PSN, Machine, 'UID002', Service : ' : ' : LogMessage)
end
SRP_JSON(objJSON, 'Release')
end else
Metrology_Services('LogResults', PSN, Machine, 'UID002', Service : ' : ' : 'Failed to parse IQS JSON response')
end
end else
Metrology_Services('LogResults', PSN, Machine, 'UID002', Service : ' : ' : 'Null response from IQS API.')
end
end service
Service ImportStratusData(RunData, ResourceID, PSN)
Machine = 'Stratus'
@ -3643,7 +3646,3 @@ LoadRunDataToDatabase:
end
return

View File

@ -508,23 +508,23 @@ GetRdsColumns:
GoSub GetView
If CurrentViewSelection _EQC 'quick' then
RDSColumns = ''
RDSColumns<0, 1> = 'ABBREV_OR_CO_NAME'
RDSColumns<0, 2> = 'WO'
RDSColumns<0, 3> = 'WO_STEP'
RDSColumns<0, 4> = 'SEQ'
RDSColumns<0, 5> = 'REACTOR'
RDSColumns<0, 6> = 'RUN_ORDER_NUM'
RDSColumns<0, 7> = 'UNLOAD_THICK_TEST'
RDSColumns<0, 8> = 'HGCV_TEST'
RDSColumns<0, 9> = 'DATE_IN'
RDSColumns<0, 10> = 'TIME_IN'
RDSColumns<0, 11> = 'DATE_OUT'
RDSColumns<0, 12> = 'TIME_OUT'
RDSColumns<0, 13> = 'PART_NUM'
RDSColumns<0, 14> = 'LOT_NUM'
RDSColumns<0, 15> = 'SUPPL_INST'
RDSColumns<0, 16> = 'HOLD_STATUS'
RDSColumns = ''
RDSColumns<0, 1> = 'ABBREV_OR_CO_NAME'
RDSColumns<0, 2> = 'WO'
RDSColumns<0, 3> = 'WO_STEP'
RDSColumns<0, 4> = 'SEQ'
RDSColumns<0, 5> = 'REACTOR'
RDSColumns<0, 6> = 'RUN_ORDER_NUM'
RDSColumns<0, 7> = 'UNLOAD_THICK_TEST'
RDSColumns<0, 8> = 'HGCV_TEST'
RDSColumns<0, 9> = 'DATE_IN'
RDSColumns<0, 10> = 'TIME_IN'
RDSColumns<0, 11> = 'DATE_OUT'
RDSColumns<0, 12> = 'TIME_OUT'
RDSColumns<0, 13> = 'PART_NUM'
RDSColumns<0, 14> = 'LOT_NUM'
RDSColumns<0, 15> = 'SUPPL_INST'
RDSColumns<0, 16> = 'HOLD_STATUS'
end else
RDSColumns = ''
RDSColumns<0, 1> = 'ABBREV_OR_CO_NAME'
@ -609,7 +609,7 @@ return
GetExistingSupps:
Gosub GetView
NumRDS = DCount(RDSList, @FM)
SuppsWithLots = Supplement_Services('GetLotsWithSupplements', 'RDS')
@ -677,6 +677,3 @@ CheckSelectedForHolds:
return

View File

@ -30,7 +30,7 @@ Compile function NDW_WAFER_COUNTER_EVENTS(CtrlEntId, Event, @PARAMS)
***********************************************************************************************************************/
#pragma precomp SRP_PreCompiler
#window NDW_PACKAGING
#window NDW_WAFER_COUNTER
$insert APP_INSERTS
$insert EVENT_SETUP
@ -44,7 +44,7 @@ Equ MSG_WIDTH$ to 650
Equ Comma$ to ','
Declare function MemberOf, Form_Services, Wafer_Counter_Services, SRP_Json, WO_Mat_Services, Wm_Out_Services, Datetime
Declare function Logging_Services, Environment_Services
Declare function Logging_Services, Environment_Services, Wo_Mat_Qa_Services, Return_To_Fab_Services
Declare subroutine SRP_Json, PlaceDialog, Wafer_Counter_Services, Logging_Services
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WaferCounter'
@ -97,13 +97,26 @@ Event WINDOW.CREATE(CreateParam)
LogData<5> = ToolLoc
LogData<6> = @Window:'.CREATE'
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
QAMetComplete = ''
If CassID NE '' then
If RowExists('WM_OUT', CassID) then
WOMatKey = Xlate('WM_OUT', CassID, 'WO_MAT_KEY', 'X')
end else
WOMatKey = Xlate('RDS', CassID, 'WO_MAT_KEY', 'X')
end
QAMetComplete = Wo_Mat_Qa_Services('GetQAMetComplete', WOMatKey)
end
Convert '.' to '*' in CassID
ExpectedQty = ''
ExpectedWfrMap = ''
If WfrCntAdj EQ '' then WfrCntAdj = 0
Set_Property(@Window:'.EDL_CASS_ID', 'TEXT', CassID)
Begin Case
Case (CassID NE '' AND QAMetComplete EQ False$)
ErrorMsg = 'Wafer Counter Operation Not Allowed. QA Metrology Incomplete.'
Case ( (CassID EQ '') and (ToolLoc EQ '') )
// Alternate workflow
Set_Property(@Window:'.LBL_CASS_ID', 'TEXT', 'Cass ID')
@ -319,36 +332,49 @@ Event EDL_CASS_BARCODE.LOSTFOCUS(Flag, FocusID)
Set_Property(@Window:'.EDL_CASS_ID', 'TEXT', CassetteID)
Begin Case
Case RowExists('RDS', CassetteID)
ExpectedQty = Xlate('RDS', CassetteID, 'WFRS_OUT', 'X')
Set_Property(@Window:'.EDL_EXPECTED_QTY', 'TEXT', ExpectedQty)
Set_Property(@Window:'.LBL_CASS_ID', 'TEXT', 'Cass RDS')
Set_Property(@Window:'.LBL_CASS_BARCODE', 'TEXT', 'Cass RDS 2D')
WOMatKey = Xlate('RDS', CassetteID, 'WO_MAT_KEY', 'X')
CurrWfrMap = WO_Mat_Services('GetWaferMap', WOMatKey)
If Error_Services('NoError') then
ExpectedWfrMap = CurrWfrMap
WOMatKey = Xlate('RDS', CassetteID, 'WO_MAT_KEY', 'X')
QAMetComplete = Wo_Mat_Qa_Services('GetQAMetComplete', WOMatKey)
If QAMetComplete EQ True$ then
ExpectedQty = Xlate('RDS', CassetteID, 'WFRS_OUT', 'X')
Set_Property(@Window:'.EDL_EXPECTED_QTY', 'TEXT', ExpectedQty)
Set_Property(@Window:'.LBL_CASS_ID', 'TEXT', 'Cass RDS')
Set_Property(@Window:'.LBL_CASS_BARCODE', 'TEXT', 'Cass RDS 2D')
WOMatKey = Xlate('RDS', CassetteID, 'WO_MAT_KEY', 'X')
CurrWfrMap = WO_Mat_Services('GetWaferMap', WOMatKey)
If Error_Services('NoError') then
ExpectedWfrMap = CurrWfrMap
end else
ErrorMsg = Error_Services('GetMessage')
end
end else
ErrorMsg = Error_Services('GetMessage')
ErrorMsg = 'Wafer Counter Operation Not Allowed. A Metrology stage is incomplete.'
end
Case RowExists('WM_OUT', CassetteID)
ExpectedQty = Xlate('WM_OUT', CassetteID, 'WAFER_CNT', 'X')
Set_Property(@Window:'.EDL_EXPECTED_QTY', 'TEXT', ExpectedQty)
Set_Property(@Window:'.LBL_CASS_ID', 'TEXT', 'Cass WMO')
Set_Property(@Window:'.LBL_CASS_BARCODE', 'TEXT', 'Cass WMO 2D')
CurrWfrMap = WM_Out_Services('GetWaferMap', CassetteID)
If Error_Services('NoError') then
ExpectedWfrMap = CurrWfrMap
WOMatKey = Xlate('WM_OUT', CassetteID, 'WO_MAT_KEY', 'X')
QAMetComplete = Wo_Mat_Qa_Services('GetQAMetComplete', WOMatKey)
If QAMetComplete EQ True$ then
ExpectedQty = Xlate('WM_OUT', CassetteID, 'WAFER_CNT', 'X')
Set_Property(@Window:'.EDL_EXPECTED_QTY', 'TEXT', ExpectedQty)
Set_Property(@Window:'.LBL_CASS_ID', 'TEXT', 'Cass WMO')
Set_Property(@Window:'.LBL_CASS_BARCODE', 'TEXT', 'Cass WMO 2D')
CurrWfrMap = WM_Out_Services('GetWaferMap', CassetteID)
If Error_Services('NoError') then
ExpectedWfrMap = CurrWfrMap
end else
ErrorMsg = Error_Services('GetMessage')
end
end else
ErrorMsg = Error_Services('GetMessage')
end
ErrorMsg = 'Wafer Counter Operation Not Allowed. QA Metrology Incomplete.'
end
End Case
Convert @VM to '' in ExpectedWfrMap
Set_Property(@Window, '@EXPECTED_WFR_MAP', ExpectedWfrMap)
If ErrorMsg EQ '' then
Convert @VM to '' in ExpectedWfrMap
Set_Property(@Window, '@EXPECTED_WFR_MAP', ExpectedWfrMap)
end
end else
If CassetteID NE VerifyCassID then
ErrorMsg = 'Scanned cassette ID does not match cassette to verify!'
@ -598,3 +624,9 @@ ClearForm:
return

View File

@ -425,7 +425,7 @@ Service CreateNewOrder(EntityType=ENTITY_TYPES, EntityID, OrderType=ORDER_TYPES,
SRP_JSON(objJson, 'SetValue', 'reactorNumber', ReactNo)
NewChecklistInstIds = Xlate('NICA_CHECKLISTS', NewSortedChecklistIds, 'NICA_BASE_INSTRUCTION_ID', 'X')
SRP_JSON(objJson, 'SetValueArray', 'baseInstructionIds', NewChecklistInstIds, @VM)
Body = SRP_JSON(objJson, 'Stringify', 'Styled')
Body = SRP_JSON(objJson, 'Stringify', 'Fast')
Convert @FM to '' in Body
SRP_JSON(objJson, 'Release')
end else
@ -443,11 +443,12 @@ Service CreateNewOrder(EntityType=ENTITY_TYPES, EntityID, OrderType=ORDER_TYPES,
IsSuccessful = False$
If ErrorMsg EQ '' then
AttemptNo = 0
Retries = 3
BackoffSeconds = 1
OrderId = ''
Loop
Loop
while (IsSuccessful EQ False$ and Retries GT 0)
WaitSeconds = (3 - retries) * BackoffSeconds
Delay(WaitSeconds)
@ -458,7 +459,32 @@ Service CreateNewOrder(EntityType=ENTITY_TYPES, EntityID, OrderType=ORDER_TYPES,
end else
Headers = 'Accept':@VM:'*/*'
end
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS') ; // Logging DTM
LogData<2> = Machine
AttemptNo += 1
LogData<3> = 'Attempt number ':AttemptNo:' to send HTTP POST request to ':NicaURL
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
// Write directly to the log file to avoid mangling the JSON
OSRead LogBytes from LogPath:'\':LogFileName then
LogBytes := CRLF$:Body
OSWrite LogBytes to LogPath:'\':LogFileName
end
HttpResponseJson = Httpclient_Services('SendHTTPRequest', 'POST', NicaURL, Headers, Body, '', '', False$, False$, '', IgnoreCertErrors)
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS') ; // Logging DTM
LogData<2> = Machine
LogData<3> = 'Attempt number ':AttemptNo:' HttpResponse from ':NicaURL:':'
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
// Write directly to the log file to avoid mangling the JSON
OSRead LogBytes from LogPath:'\':LogFileName then
LogBytes := CRLF$:HttpResponseJson
OSWrite LogBytes to LogPath:'\':LogFileName
end
If HttpResponseJson NE '' then
ObjResponseJson = ''
If SRP_JSON(ObjResponseJson, 'Parse', HttpResponseJson) EQ '' then

View File

@ -19,11 +19,11 @@ Compile Function obj_WM_Out(Method,Parms)
Declare Function Get_Status, Msg, Utility, obj_Tables, NextKey, obj_WO_Verify, obj_Prod_Spec, Send_Dyn, obj_RDS_Makeup
Declare Function obj_RDS2, obj_WM_Out, Delete, Signature_Services, Environment_Services, Logging_Services
Declare Function Database_Services
Declare Function Database_Services, SRP_Array
Declare Subroutine Set_Status, Msg, obj_Tables, Send_Dyn, obj_WO_Step, obj_RDS_Layer, obj_RDS_Test, Btree.Extract
Declare Subroutine Extract_SI_Keys, obj_WM_Out, obj_WO_Mat, obj_Post_Log, obj_WO_Mat_Log, ErrMsg, obj_WO_Wfr
Declare Subroutine Logging_Services, Material_Services, Database_Services, Update_Index, Work_Order_Services
Declare Subroutine Service_Services, obj_Notes
Declare Subroutine Service_Services, obj_Notes, Delay
$Insert MSG_EQUATES
$Insert APP_INSERTS
@ -40,6 +40,8 @@ $Insert CLEAN_INSP_EQUATES
$Insert WMO_WFRS_EQUATES
$Insert REACT_RUN_EQUATES
EQU NUM_RETRIES$ TO 50
ErrTitle = 'Error in Stored Procedure "obj_WM_Out"'
ErrorMsg = ''
ErrCode = ''
@ -167,14 +169,37 @@ Create:
WMOutKeys = XLATE('WO_STEP',WONo:'*':WOStep,WO_STEP_WM_OUT_KEYS$,'X')
IF WMOutKeys = '' THEN
WMOutKeys = SRP_Array('SortRows', WMOutKeys, 'AR3', 'LIST', @VM, '*')
If WMOutKeys NE '' then
LastCassNo = WMOutKeys[-1, 'B*']
end else
LastCassNo = 0
end
hSysLists = Database_Services('GetTableHandle', 'SYSLISTS')
CassNo = ''
CandidateCassNo = LastCassNo + 1
Loop
CandidateWmOutKey = WONo:'*':WOStep:'*':CandidateCassNo
If Not(RowExists('WM_OUT', CandidateWmOutKey)) then
Lock hSysLists, CandidateWmOutKey then
CassNo = CandidateCassNo
end
end
Until (CassNo NE '')
CandidateCassNo += 1
Repeat
IF (CassNo EQ 1) THEN
WMOStartBox = 1
WMOStartSlot = 1
END ELSE
LastBoxOut = WMOutKeys[-1,'B':@VM]
LastWMORec = XLATE('WM_OUT',LastBoxOut,'','X')
PrevCassNo = CassNo - 1
LastBoxOut = WONo:'*':WOStep:'*':PrevCassNo
LastWMORec = XLATE('WM_OUT',LastBoxOut,'','X')
LastBoxLastSlot = LastWMORec<WM_OUT_SLOT_NO$>[-1,'B':@VM]
IF LastBoxLastSlot < CassLoadQty THEN
IF ( (LastBoxLastSlot NE '') and (LastBoxLastSlot LT CassLoadQty) ) THEN
WMOStartBox = FIELD(LastBoxOut,'*',3) ;* Start IN the last box
WMOStartSlot = LastBoxLastSlot + 1 ;* Start with first slot past current and less than Load Qty
END ELSE
@ -225,7 +250,8 @@ Create:
NumAttempts = 0
Loop
NumAttempts += 1
Database_Services('WriteDataRow', 'WM_OUT', WMOutKey, WMOutRec)
If NumAttempts GT 1 then Delay(NumAttempts)
Database_Services('WriteDataRow', 'WM_OUT', WMOutKey, WMOutRec, True$, False$, False$)
If Error_Services('HasError') then
// Log the error
LogData = ''
@ -247,9 +273,11 @@ Create:
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
Done = True$
end
Until ( (NumAttempts EQ 10) or (Done EQ True$) )
Until ( (NumAttempts GT NUM_RETRIES$) or (Done EQ True$) )
Repeat
Unlock hSysLists, CandidateWmOutKey else Null
WMOutRec = Database_Services('ReadDataRow', 'WM_OUT', WMOutKey)
If WMOutRec EQ '' then
// Record did not write to the database
@ -280,7 +308,6 @@ Create:
WMOCassNo += 1
WMOSlotNo = 1
REPEAT
Result = OutOnlyCassIDs
@ -1961,5 +1988,3 @@ ConvertCleanInsp:
RETURN

View File

@ -1132,8 +1132,9 @@ ReleaseCassettes:
END ELSE
IF WOStepRec<WO_STEP_RDS_KEY$,CassNo> EQ '' THEN
WOMatRec = XLATE('WO_MAT',WoNo:'*':CassNo,'','X')
WOMatRec = XLATE('WO_MAT',WoNo:'*':CassNo,'','X')
RDSNoCheck = WOMatRec<WO_MAT_RDS_NO$>
If RDSNoCheck EQ '' then
CassLotNo = WOMatRec<WO_MAT_LOT_NO$>
CassWaferQty = WOMatRec<WO_MAT_WAFER_QTY$>
@ -1228,7 +1229,7 @@ ReleaseCassettes:
END
END ;* End of check for GAN reactor
END ;* End of Check for existing RDS on this WO_Step*CassetteNo
END ;* End of Check for existing RDS
END ;* End of check for EpiPRO reactor type
NEXT N
NEXT WOStep

View File

@ -121,6 +121,11 @@ SAPFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' SetS
SAPHeaders = 'Logging DTM' : @FM : 'WOMatKey' : @FM : 'SAPBatchNo'
objSAPLog = Logging_Services('NewLog', SAPLogPath, SAPFileName, CRLF$, Comma$, SAPHeaders, '', False$, False$)
WOMatLogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WO_Mat'
WOMatLogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' WO_MAT_LOG - Inv Transaction Error.csv'
WOMatHeaders = 'Logging DTM' : @FM : 'WONo' : @FM : 'CassNo' : @FM : 'User' : @FM : 'Log Pos' : @FM : 'Tag' : @FM : 'Warehouse' : @FM : 'Loc' : @FM : 'InvAction' : @FM : 'ToolID'
objLogInvTransError = Logging_Services('NewLog', WOMatLogPath, WOMatLogFileName, CRLF$, Comma$, WOMatHeaders, '', False$, False$)
IsProd = Environment_Services('IsProd')
If IsProd EQ True$ then
MonaResource = 'GRP_OPENINSIGHT_MES_OP_FE_OBJWOMAT'
@ -1040,6 +1045,20 @@ AddInvTrans:
IF ErrorMsg NE '' THEN
ErrorMsg := CRLF$:Parms
SWAP @RM WITH CRLF$ IN ErrorMsg
LogData = ''
LogData<1> = LogFile
LogData<2> = WONo
LogData<3> = CassNo
LogData<4> = InvLocation
LogData<5> = InvAction
LogData<6> = InvDTM
LogData<7> = ScanUserID
LogData<8> = Tag
LogData<9> = ToolID
LogData<10> = ScanEntry
LogData<11> = ''
LogData<12> = 'Unable to add inv. transaction. Missing Parameter detected. ' : ErrorMsg
Logging_Services('AppendLog', objLogInvTransError, LogData, @RM, @FM)
RETURN
END
@ -1065,6 +1084,21 @@ 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
LogData<3> = CassNo
LogData<4> = InvLocation
LogData<5> = InvAction
LogData<6> = InvDTM
LogData<7> = ScanUserID
LogData<8> = Tag
LogData<9> = ToolID
LogData<10> = ScanEntry
LogData<11> = ''
LogData<12> = ErrorMsg
Logging_Services('AppendLog', objLogInvTransError, LogData, @RM, @FM)
RETURN
END
@ -1080,6 +1114,21 @@ 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
LogData<3> = CassNo
LogData<4> = InvLocation
LogData<5> = InvAction
LogData<6> = InvDTM
LogData<7> = ScanUserID
LogData<8> = Tag
LogData<9> = ToolID
LogData<10> = ScanEntry
LogData<11> = ''
LogData<12> = ErrorMsg
Logging_Services('AppendLog', objLogInvTransError, LogData, @RM, @FM)
RETURN
END
@ -1095,7 +1144,21 @@ AddInvTrans:
obj_Tables('WriteRec',WOtParms)
IF Get_Status(errCode) THEN
NULL
ErrorMsg = 'Unable to add inv. transaction. Unable to write WM_OUT record.'
LogData = ''
LogData<1> = LogFile
LogData<2> = WONo
LogData<3> = CassNo
LogData<4> = InvLocation
LogData<5> = InvAction
LogData<6> = InvDTM
LogData<7> = ScanUserID
LogData<8> = Tag
LogData<9> = ToolID
LogData<10> = ScanEntry
LogData<11> = ''
LogData<12> = ErrorMsg
Logging_Services('AppendLog', objLogInvTransError, LogData, @RM, @FM)
END
END ;* End of check for PTO or PKO location
@ -1108,6 +1171,21 @@ 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
LogData<3> = CassNo
LogData<4> = InvLocation
LogData<5> = InvAction
LogData<6> = InvDTM
LogData<7> = ScanUserID
LogData<8> = Tag
LogData<9> = ToolID
LogData<10> = ScanEntry
LogData<11> = ''
LogData<12> = ErrorMsg
Logging_Services('AppendLog', objLogInvTransError, LogData, @RM, @FM)
RETURN
END
@ -1125,6 +1203,21 @@ AddInvTrans:
IF @WINDOW NE 'WO_MAT_INV' THEN
IF WOMatRec<WO_MAT_LOT_NO$> = '' OR WOMatRec<WO_MAT_CUST_PART_NO$> = '' 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
LogData<3> = CassNo
LogData<4> = InvLocation
LogData<5> = InvAction
LogData<6> = InvDTM
LogData<7> = ScanUserID
LogData<8> = Tag
LogData<9> = ToolID
LogData<10> = ScanEntry
LogData<11> = ''
LogData<12> = ErrorMsg
Logging_Services('AppendLog', objLogInvTransError, LogData, @RM, @FM)
RETURN
END
END
@ -1162,7 +1255,51 @@ 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
ErrorMsg = Error_Services('GetMessage')
LogData = ''
LogData<1> = LogFile
LogData<2> = WONo
LogData<3> = CassNo
LogData<4> = InvLocation
LogData<5> = InvAction
LogData<6> = InvDTM
LogData<7> = ScanUserID
LogData<8> = Tag
LogData<9> = ToolID
LogData<10> = ScanEntry
LogData<11> = ''
LogData<12> = 'Unable to add inv. transaction. ' : ErrorMsg : ' Next line is the expected INV Actions.'
Logging_Services('AppendLog', objLogInvTransError, LogData, @RM, @FM)
LogData = ''
LogData<1> = WONo
LogData<2> = CassNo
LogData<3> = WOMatRec<WO_MAT_INV_ACTION$>
Logging_Services('AppendLog', objLogInvTransError, LogData, @RM, @FM)
end else
LogData = ''
LogData<1> = LogFile
LogData<2> = WONo
LogData<3> = CassNo
LogData<4> = InvLocation
LogData<5> = InvAction
LogData<6> = InvDTM
LogData<7> = ScanUserID
LogData<8> = Tag
LogData<9> = ToolID
LogData<10> = ScanEntry
LogData<11> = ''
LogData<12> = 'Successfully wrote inv transaction to WO_MAT record. Next line is the resultant INV Actions.'
Logging_Services('AppendLog', objLogInvTransError, LogData, @RM, @FM)
LogData = ''
LogData<1> = WONo
LogData<2> = CassNo
LogData<3> = WOMatRec<WO_MAT_INV_ACTION$>
Logging_Services('AppendLog', objLogInvTransError, LogData, @RM, @FM)
end
WOMatRecVerify = Database_Services('ReadDataRow', 'WO_MAT', WOMatKey)
LastEntryIndex = DCount(WOMatRecVerify<WO_MAT_INV_WH$>, @VM)
LastEntryAction = WOMatRecVerify<WO_MAT_INV_ACTION$, LastEntryIndex>
@ -1203,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
@ -5546,6 +5675,9 @@ RETURN
SendErrorNotification:
* * * * * * * * * * *
If Not(Assigned(errCode)) then
errCode = ''
end
swap @SVM with CRLF$ in errCode
ErrorMsg = 'Error code: ':errCode
@ -5581,3 +5713,4 @@ ExpCOA:
RETURN

View File

@ -47,6 +47,14 @@ LogTime = Oconv(Time(), 'MTS')
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' Front-end Create Log.csv'
Headers = 'Logging DTM'
objLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, Comma$, Headers, '', False$, False$)
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WO_MAT_LOG'
LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS')
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : '_Post_Log.csv'
Headers = 'Logging DTM'
objLogPost = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, Comma$, Headers, '', False$, False$)
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
IsProd = Environment_Services('IsProd')
@ -84,6 +92,7 @@ RETURN Result
* * * * * * *
Create:
* * * * * * *
StartTick = GetTickCount()
MetricName = 'Create'
@ -157,99 +166,19 @@ Create:
WOMatLogRec<WO_MAT_LOG_TOOL_ID$> = ToolID
WOMatLogRec<WO_MAT_LOG_SCAN_ENTRY$> = ScanEntry
* OtParms = 'WO_MAT_LOG':@RM:WOMatLogKey:@RM:@RM:WOMatLogRec
* obj_Tables('WriteRec',OtParms)
*
* errCode = ''
* IF Get_Status(errCode) THEN
* ErrorMsg = 'obj_WO_Mat_Log':TAB$:'Create: Write error':TAB$:LogFile:TAB$:WONos:TAB$:CassNos:TAB$:WhCd:'*':LocCd:TAB$:Action:TAB$:TransDTM:TAB$:UserID:TAB$:Tags:TAB$:ToolID:TAB$:errCode
* END ElSE
* ErrorMsg = ''
* END
Database_Services('WriteDataRow', 'WO_MAT_LOG', WOMatLogKey, WOMatLogRec, True$, False$, True$)
If Error_Services('NoError') then
ReactType = XLATE('WO_LOG', WONos, WO_LOG_REACT_TYPE$, 'X')
If ReactType NE 'EPP' then
WONo = WoNos
CassNo = CassNos
WOMatKey = WONo : '*' : CassNo
RDSKey = XLATE('WO_MAT', WOMatKey, WO_MAT_RDS_NO$, 'X')
Lot_Event_Services('CreateLotEvent', RDSKey, Datetime(), Action, '', '', UserId, True$, 'RDS')
end else
Begin Case
Case Action EQ 'RCVD'
//WMI
WONo = WoNos
StepNo = 1
CassNo = CassNos
WMInKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Event_Services('CreateLotEvent', WMInKey, Datetime(), Action, '', '', UserId, True$, 'WM_IN')
Case Action EQ 'REL'
//WMI
WONo = WoNos
StepNo = 1
CassNo = CassNos
WMInKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Event_Services('CreateLotEvent', WMInKey, Datetime(), Action, '', '', UserId, True$, 'WM_IN')
Case Action EQ '1VER'
//RDS action, do nothing for now
Case Action EQ '1LOAD'
//RDS, do nothing for now
Case Action EQ '1UNLOAD'
//RDS, do nothing for now
Case Action EQ '1MO_PSTI'
WONo = WoNos
StepNo = 1
CassNo = CassNos
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Event_Services('CreateLotEvent', WMOutKey, Datetime(), Action, '', '', UserId, True$, 'WM_OUT')
Case Action EQ '1MO_QA'
WONo = WoNos
StepNo = 1
CassNo = CassNos
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Event_Services('CreateLotEvent', WMOutKey, Datetime(), Action, '', '', UserId, True$, 'WM_OUT')
Case Action EQ 'PACK'
WONo = WoNos
StepNo = 1
CassNo = CassNos
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Event_Services('CreateLotEvent', WMOutKey, Datetime(), Action, '', '', UserId, True$, 'WM_OUT')
Case Action EQ 'PSVER'
WONo = WoNos
StepNo = 1
CassNo = CassNos
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Event_Services('CreateLotEvent', WMOutKey, Datetime(), Action, '', '', UserId, True$, 'WM_OUT')
Case Action EQ 'SHIP'
WONo = WoNos
StepNo = 1
CassNo = CassNos
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Event_Services('CreateLotEvent', WMOutKey, Datetime(), Action, '', '', UserId, True$, 'WM_OUT')
Case Action EQ 'LBLCHK'
//WMO
WONo = WoNos
StepNo = 1
CassNo = CassNos
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Event_Services('CreateLotEvent', WMOutKey, Datetime(), Action, '', '', UserId, True$, 'WM_OUT')
End Case
end
ErrorMsg = ''
end else
ErrorMsg = Error_Services('GetMessage')
end
If Error_Services('HasError') then ErrorMsg = Error_Services('GetMessage')
EndTick = GetTickCount()
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
RETURN
* * * * * * *
Post:
* * * * * * *
hSysLists = Database_Services('GetTableHandle', 'SYSLISTS')
ServiceKeyID = 'Obj_WO_Mat_Log*Post'
Lock hSysLists, ServiceKeyID then
@ -350,7 +279,29 @@ Post:
LockedToolID = ScanToolID
LockedScanEntry = ScanEntry
END
//Log the error
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = WONo
LogData<3> = CassNo
LogData<4> = Tag
LogData<5> = ScanUserId
LogData<6> = ScanToolId
LogData<7> = ScanEntry
LogData<8> = 'Error reported from obj_wo_mat -> Add InvTrans. Check specific log.'
Logging_Services('AppendLog', objLogPost, LogData, @RM, @FM)
END else
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = WONo
LogData<3> = CassNo
LogData<4> = Tag
LogData<5> = ScanUserId
LogData<6> = ScanToolId
LogData<7> = ScanEntry
LogData<8> = 'Successfully process obj_wo_mat -> AddInvTrans. Check specific log file for more details.'
Logging_Services('AppendLog', objLogPost, LogData, @RM, @FM)
end
NEXT I
WMLRec<WO_MAT_LOG_WO_NO$> = LockedWONos
@ -375,4 +326,3 @@ Post:
RETURN

View File

@ -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<WO_REACT_RDS_NO$>
CassNos = WOReactRec<WO_REACT_CASS_NO$>
@ -105,13 +104,11 @@ Start = QAMetData<COL$QA_MET_START>
Interval = QAMetData<COL$QA_MET_INTERVAL>
Stage = QAMetData<COL$QA_MET_STAGE>
MetPropCd = QAMetData<COL$QA_MET_PROP>
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<WO_REACT_RDS_NO$> BY 'AR' USING @VM SETTING InsPos THEN
LOCATE RDSNo IN WOReactRec<WO_REACT_RDS_NO$> USING @VM SETTING InsPos THEN
otParms = 'WO_REACT':@RM:WOReactKey
WOReactRec = obj_Tables('UnlockRec',otParms)
@ -120,10 +117,9 @@ LOCATE RDSNo IN WOReactRec<WO_REACT_RDS_NO$> 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<WO_REACT_RDS_NO$> ;* List after insert
CassNos = WOReactRec<WO_REACT_CASS_NO$> ;* 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<COL$QA_MET_PROP>
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<WO_REACT_RDS_NO$> 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<WO_REACT_CASS_NO$> ;* 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

View File

@ -712,7 +712,7 @@ Service CreatePackagingRecord(LotId, UserId, EqpId)
NewPackagingRec<PACKAGING_COMPLETE_DTM$> = TransDtm
Database_Services('WriteDataRow', 'PACKAGING', NewRecId, NewPackagingRec, True$, 0, False$)
If Error_Services('NoError') then
Lot_Event_Services('CreateLotEvent', LotId, TransDtm, 'PACKAGING', 'Lot Packaged.', EqpId, UserId)
Lot_Event_Services('CreateLotEvent', LotId, TransDtm, 'COMMENT', 'Lot Packaged.', EqpId, UserId)
end else
ErrorMessage = Error_Services('GetMessage')
end
@ -765,5 +765,3 @@ Service AddPackToLotOperation(LotOperationId, PackagingId, UserId)
end service

View File

@ -3170,7 +3170,10 @@ Service UpdateFailedWafers(WOMatKey)
AllFailedWafers<0, WfrIndex> = (PreFailedWafers<0, WfrIndex> OR FWIFailedWafers<0, WfrIndex> OR LWIFailedWafers<0, WfrIndex> OR PostFailedWafers<0, WfrIndex>)
Next WfrIndex
end
Transaction_Services('PostWriteFieldTransaction', 'WO_MAT', WOMatKey, WO_MAT_FAILED_WAFERS$, AllFailedWafers)
AllFailedWafersOrig = WOMatRec<WO_MAT_FAILED_WAFERS$>
If AllFailedWafers NE AllFailedWafersOrig then
Transaction_Services('PostWriteFieldTransaction', 'WO_MAT', WOMatKey, WO_MAT_FAILED_WAFERS$, AllFailedWafers)
end
end else
Error_Services('Add', 'Error in ':Service:' service. RDSNo is null')
end

View File

@ -622,7 +622,7 @@ READONLY_RECORD:
return
WRITE_RECORD_PRE:
StartTick = GetTickCount()
MetricName = 'WriteRecordPre'
@ -903,6 +903,10 @@ WRITE_RECORD:
Service_Services('PostProcedure', 'WORK_ORDER_SERVICES', 'UpdateScrappedQty':SD$:WONo)
end
If {WO} NE '' then Service_Services('PostProcedure', 'RDS_SERVICES', 'VerifyWOLogRDSKeyIndex':SD$:Name)
If {WO_MAT_KEY} NE '' then Service_Services('PostProcedure', 'RDS_SERVICES', 'VerifyWOMatRDSNoIndex':SD$:Name)
If {WO_STEP_KEY} NE '' then Service_Services('PostProcedure', 'RDS_SERVICES', 'VerifyWOStepRDSKeyIndex':SD$:Name)
EndTick = GetTickCount()
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
@ -919,11 +923,23 @@ DELETE_RECORD_PRE:
LogData<3> = Name
LogData<4> = Notes
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
ActionFlow = ACTION_STOP$
return
DELETE_RECORD:
Notes = RetStack()
Swap @FM with ' | ' in Notes
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = @User4
LogData<3> = Name
LogData<4> = Notes
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
ActionFlow = ACTION_STOP$
return
@ -986,3 +1002,4 @@ Restore_System_Variables:
return

View File

@ -86,10 +86,10 @@ EQU READONLY_GREEN$ TO 192 + (220*256) + (192*65536)
Declare subroutine ErrMsg, Set_Status, obj_WO_Mat, obj_WO_Mat_Log, obj_RDS, Set_Property, Send_Event, Database_Services
Declare subroutine Dialog_Box, Qa_Services, Obj_React_Ll, Start_Window, obj_React_Status, Reactor_Services, Rds_Services
Declare subroutine Lot_Event_Services, Override_Log_Services
Declare subroutine Lot_Event_Services, Override_Log_Services, Logging_Services
Declare function Dialog_Box, Msg, MemberOf, obj_WO_Mat, Database_Services, Get_Property, obj_React_Status, Get_Status
Declare function QA_Services, Database_Services, Rds_Services, Obj_Calendar, Override_Log_Services, Max, Supplement_Services
Declare function Datetime, Test_Run_Services
Declare function Datetime, Test_Run_Services, Environment_Services, Logging_Services
SubclassInfo = Form_Services('FindSubclassControl')
Subclass = SubclassInfo<1>
@ -100,11 +100,11 @@ If Event EQ 'OLE' then
Transfer Param1 to Event
Transfer Param2 to Param1
Transfer Param3 to Param2
* Transfer Param4 to Param3
* Transfer Param5 to Param4
* Transfer Param6 to Param5
* Transfer Param7 to Param6
* Transfer Param8 to Param7
Transfer Param4 to Param3
Transfer Param5 to Param4
Transfer Param6 to Param5
Transfer Param7 to Param6
Transfer Param8 to Param7
end
GoToEvent Event for CtrlEntID
@ -463,7 +463,19 @@ Event PUB_SIGN.CLICK()
OverrideUser = Response<2>
If Valid then
Lot_Event_Services('CreateLotEvent', RDSNo, Datetime(), 'UNSIGN_LOAD', 'Load stage unsigned', 'Reactor', @User4, True$, 'RDS')
Machine = Environment_Services('GetServer')
Headers = 'Logging DTM' : @FM : 'Machine' : @FM : 'Log'
ColumnWidths = 20 : @FM : 15 : @FM : 300
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\Lot'
makeDirSuccess = Utility("MAKEDIR", LogPath)
LogFileName = 'R':RDSNo:'.csv'
objLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, ' ', Headers, ColumnWidths, False$, False$)
LogData = ''
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS') ; // Logging DTM
LogData<2> = Machine
LogData<3> = 'LOAD stage unsigned for RDS ':RDSNo:' by user ':@User4
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
// 4. Remove WO_MAT Unload signature, date, and time
WOMatRec = Database_Services('ReadDataRow', 'WO_MAT', WOMatKey)
@ -728,4 +740,3 @@ OLE_LL_Status:
return

View File

@ -59,7 +59,6 @@ $insert COMPANY_EQUATES
$insert WO_MAT_QA_EQUATES
$insert WAFER_COUNTER_EQUATES
Equ COL$LOG_FILE to 1
Equ COL$LOG_DTM to 2
Equ COL$ACTION to 3
@ -88,10 +87,12 @@ EQU APPGREEN$ TO 192 + (220*256) + (192*65536)
EQU APPRED$ TO 255 + (128*256) + (128*65536)
EQU APPORANGE$ TO 255 + (176*256) + (0*65536)
Declare subroutine ErrMsg, Set_Status, obj_WO_Mat, obj_WO_Mat_Log, obj_RDS, RDS_Services, Signature_Services, obj_Notes
Declare subroutine Comm_RDS, WO_Mat_QA_Services, Wafer_Counter_Services, Dialog_Box, Lot_Event_Services
Declare function Dialog_Box, Msg, MemberOf, obj_WO_Mat, Database_Services, QA_Services, Signature_Services
Declare function RDS_Services, Wafer_Counter_Services, Datetime, Supplement_Services
Declare subroutine ErrMsg, Set_Status, obj_WO_Mat, obj_WO_Mat_Log, obj_RDS, RDS_Services, Signature_Services, obj_Notes
Declare subroutine Comm_RDS, WO_Mat_QA_Services, Wafer_Counter_Services, Dialog_Box, Lot_Event_Services
Declare subroutine Logging_Services
Declare function Dialog_Box, Msg, MemberOf, obj_WO_Mat, Database_Services, QA_Services, Signature_Services
Declare function RDS_Services, Wafer_Counter_Services, Datetime, Supplement_Services, Environment_Services
Declare function Logging_Services
SubclassInfo = Form_Services('FindSubclassControl')
Subclass = SubclassInfo<1>
@ -102,11 +103,11 @@ If Event EQ 'OLE' then
Transfer Param1 to Event
Transfer Param2 to Param1
Transfer Param3 to Param2
* Transfer Param4 to Param3
* Transfer Param5 to Param4
* Transfer Param6 to Param5
* Transfer Param7 to Param6
* Transfer Param8 to Param7
Transfer Param4 to Param3
Transfer Param5 to Param4
Transfer Param6 to Param5
Transfer Param7 to Param6
Transfer Param8 to Param7
end
GoToEvent Event for CtrlEntID
@ -603,8 +604,18 @@ Event SIGN_BUTTON.CLICK()
Set_Property(@Window : '.POST_EPI_SUP_SIG_DATE', 'TEXT', SigDt)
Set_Property(@Window : '.POST_EPI_SUP_SIG_TIME', 'TEXT', SigTmPlusOne)
** Create LOT_EVENT **
Lot_Event_Services('CreateLotEvent', RDSNo, Datetime(), 'SIGN_FQA', '', '', @USER4, True$, 'RDS')
Machine = Environment_Services('GetServer')
Headers = 'Logging DTM' : @FM : 'Machine' : @FM : 'Log'
ColumnWidths = 20 : @FM : 15 : @FM : 300
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\Lot'
makeDirSuccess = Utility("MAKEDIR", LogPath)
LogFileName = 'R':RDSNo:'.csv'
objLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, ' ', Headers, ColumnWidths, False$, False$)
LogData = ''
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS') ; // Logging DTM
LogData<2> = Machine
LogData<3> = 'FQA stage signed for RDS ':RDSNo:' by user ':@User4
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
/* Sync up the RDS record with WO_MAT */
IOOptions = Get_Property(@Window, 'IOOPTIONS')

View File

@ -1889,9 +1889,12 @@ Service PushSigProfileToWoMat(RDSNo)
If WOMatKey NE '' then
WOMatRec = Database_Services('ReadDataRow', 'WO_MAT', WOMatKey)
If Error_Services('NoError') then
WOMatSigProf = obj_WO_Mat('CassSigProfile', WOMatKey)
WOMatSig = WOMatRec<WO_MAT_SIGNATURE$>
WOMatSigDTM = WOMatRec<WO_MAT_SIG_DTM$>
WOMatSigProf = obj_WO_Mat('CassSigProfile', WOMatKey)
WOMatSig = WOMatRec<WO_MAT_SIGNATURE$>
WOMatSigDTM = WOMatRec<WO_MAT_SIG_DTM$>
WOMatSigProfOrig = WOMatSigProf
WOMatSigOrig = WOMatSig
WOMatSigDTMOrig = WOMatSigDTM
// Update WO_MAT signature profile to match for the "1VER" stage
Stage = '1VER'
@ -1963,9 +1966,15 @@ Service PushSigProfileToWoMat(RDSNo)
WOMatSigDTM<0, vPos> = FQASigDTM
end
Transaction_Services('PostWriteFieldTransaction', 'WO_MAT', WOMatKey, WO_MAT_SIG_PROFILE$, WOMatSigProf)
Transaction_Services('PostWriteFieldTransaction', 'WO_MAT', WOMatKey, WO_MAT_SIGNATURE$, WOMatSig)
Transaction_Services('PostWriteFieldTransaction', 'WO_MAT', WOMatKey, WO_MAT_SIG_DTM$, WOMatSigDTM)
If WOMatSigProf NE WOMatSigProfOrig then
Transaction_Services('PostWriteFieldTransaction', 'WO_MAT', WOMatKey, WO_MAT_SIG_PROFILE$, WOMatSigProf)
end
If WOMatSig NE WOMatSigOrig then
Transaction_Services('PostWriteFieldTransaction', 'WO_MAT', WOMatKey, WO_MAT_SIGNATURE$, WOMatSig)
end
If WOMatSigDTM NE WOMatSigDTMOrig then
Transaction_Services('PostWriteFieldTransaction', 'WO_MAT', WOMatKey, WO_MAT_SIG_DTM$, WOMatSigDTM)
end
end else
ErrorMsg = Error_Services('GetMessage')
@ -2064,6 +2073,219 @@ Service GetRDSKeys(WONo)
end service
Service VerifyWOMatRDSNoIndex(RDSNo)
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\RDS'
LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS')
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' !RDS WO_MAT{RDS_NO} Log.csv'
Headers = 'Logging DTM':@FM:'RDSNo':@FM:'WOMatKey':@FM:'Result'
objVerifyRDSNoLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, COMMA$, Headers, '', False$, False$)
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
LogData = ''
LogData<1> = LoggingDtm
LogData<2> = RDSNo
LogData<4> = 'Begin ':Service
Logging_Services('AppendLog', objVerifyRDSNoLog, LogData, @RM, @FM)
ErrorMsg = ''
If RDSNo NE '' then
If RowExists('RDS', RDSNo) then
WOMatKey = Xlate('RDS', RDSNo, 'WO_MAT_KEY', 'X')
If WOMatKey NE '' then
WOMatRDSNo = Xlate('WO_MAT', WOMatKey, 'RDS_NO', 'X')
LogData<3> = WOMatKey
Logging_Services('AppendLog', objVerifyRDSNoLog, LogData, @RM, @FM)
If WOMatRDSNo EQ '' then
LogData<4> = 'RDSNo missing from WO_MAT record. Generating index transaction.'
Logging_Services('AppendLog', objVerifyRDSNoLog, LogData, @RM, @FM)
// Add index transaction to update RDS_NO relational index (target WO_MAT table)
IndexTransactionRow = 'WO_MAT*RDS_NO*AR':@FM:RDSNo:@FM:"":@FM:WOMatKey:@FM
Open "!RDS" to BangTable then
Lock BangTable, 0 then
Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM
PendingTrans := IndexTransactionRow
Write PendingTrans on BangTable, 0 then
LogData<4> = 'Index transaction successfully added.'
Logging_Services('AppendLog', objVerifyRDSNoLog, LogData, @RM, @FM)
end else
ErrorMsg = 'Unable to write index transaction to !RDS. ':RDSNo
end
Unlock BangTable, 0 else ErrorMsg = 'Unable to Open !RDS to add index transaction. ':RDSNo
end else
ErrorMsg = 'Unable to Lock !RDS to add index transaction. ':RDSNo
end
end else
ErrorMsg = 'Unable to Open !RDS to add index transaction. ':RDSNo
end
end else
LogData<4> = 'Index ok. RDSNo not missing from WO_MAT record.'
Logging_Services('AppendLog', objVerifyRDSNoLog, LogData, @RM, @FM)
end
end else
LogData<4> = 'WO_MAT key for RDS ':RDSNo:' is null. Nothing to update.'
Logging_Services('AppendLog', objVerifyRDSNoLog, LogData, @RM, @FM)
end
end
end
If ErrorMsg NE '' then
LogData<4> = ErrorMsg
Logging_Services('AppendLog', objVerifyRDSNoLog, LogData, @RM, @FM)
end
LogData<4> = 'End ':Service
Logging_Services('AppendLog', objVerifyRDSNoLog, LogData, @RM, @FM)
If ErrorMsg NE '' then Error_Services('Add', ErrorMsg)
end service
Service VerifyWOStepRDSKeyIndex(RDSNo)
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\RDS'
LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS')
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' !RDS WO_STEP{RDS_KEY} Log.csv'
Headers = 'Logging DTM':@FM:'RDSNo':@FM:'WOStep':@FM:'Result'
objVerifyRDSKeyLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, COMMA$, Headers, '', False$, False$)
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
LogData = ''
LogData<1> = LoggingDtm
LogData<2> = RDSNo
LogData<4> = 'Begin ':Service
Logging_Services('AppendLog', objVerifyRDSKeyLog, LogData, @RM, @FM)
ErrorMsg = ''
If RDSNo NE '' then
If RowExists('RDS', RDSNo) then
WOStepKey = Xlate('RDS', RDSNo, 'WO_STEP_KEY', 'X')
If WOStepKey NE '' then
WOStepRDSKeys = Xlate('WO_STEP', WOStepKey, 'RDS_KEY', 'X')
LogData<3> = WOStepKey
Logging_Services('AppendLog', objVerifyRDSKeyLog, LogData, @RM, @FM)
Locate RDSNo in WOStepRDSKeys using @VM setting vPos then
LogData<4> = 'Index ok. RDSNo not missing from WO_STEP record.'
Logging_Services('AppendLog', objVerifyRDSKeyLog, LogData, @RM, @FM)
end else
LogData<4> = 'RDSNo missing from WO_STEP record. Generating index transaction.'
Logging_Services('AppendLog', objVerifyRDSKeyLog, LogData, @RM, @FM)
// Add index transaction to update RDS_KEY relational index (target WO_STEP table)
IndexTransactionRow = 'WO_STEP*RDS_KEY*AR':@FM:RDSNo:@FM:"":@FM:WOStepKey:@FM
Open "!RDS" to BangTable then
Lock BangTable, 0 then
Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM
PendingTrans := IndexTransactionRow
Write PendingTrans on BangTable, 0 then
LogData<4> = 'Index transaction successfully added.'
Logging_Services('AppendLog', objVerifyRDSKeyLog, LogData, @RM, @FM)
end else
ErrorMsg = 'Unable to write index transaction to !RDS. ':RDSNo
end
Unlock BangTable, 0 else ErrorMsg = 'Unable to Open !RDS to add index transaction. ':RDSNo
end else
ErrorMsg = 'Unable to Lock !RDS to add index transaction. ':RDSNo
end
end else
ErrorMsg = 'Unable to Open !RDS to add index transaction. ':RDSNo
end
end
end else
LogData<4> = 'WO_STEP key for RDS ':RDSNo:' is null. Nothing to update.'
Logging_Services('AppendLog', objVerifyRDSKeyLog, LogData, @RM, @FM)
end
end
end
If ErrorMsg NE '' then
LogData<4> = ErrorMsg
Logging_Services('AppendLog', objVerifyRDSKeyLog, LogData, @RM, @FM)
end
LogData<4> = 'End ':Service
Logging_Services('AppendLog', objVerifyRDSKeyLog, LogData, @RM, @FM)
If ErrorMsg NE '' then Error_Services('Add', ErrorMsg)
end service
Service VerifyWOLogRDSKeyIndex(RDSNo)
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\RDS'
LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS')
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' !RDS RDS{WO} Log.csv'
Headers = 'Logging DTM':@FM:'RDSNo':@FM:'WOStep':@FM:'Result'
objVerifyRDSWoIndexLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, COMMA$, Headers, '', False$, False$)
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
LogData = ''
LogData<1> = LoggingDtm
LogData<2> = RDSNo
LogData<4> = 'Begin ':Service
Logging_Services('AppendLog', objVerifyRDSWoIndexLog, LogData, @RM, @FM)
ErrorMsg = ''
If RDSNo NE '' then
If RowExists('RDS', RDSNo) then
WONo = Xlate('RDS', RDSNo, 'WO', 'X')
If WONo NE '' then
WOLogRDSKeys = ''
Extract_Si_Keys('RDS', 'WO', WONo, WOLogRDSKeys)
LogData<3> = WONo
Logging_Services('AppendLog', objVerifyRDSWoIndexLog, LogData, @RM, @FM)
Locate RDSNo in WOLogRDSKeys using @VM setting vPos then
LogData<4> = 'Index ok. RDSNo not missing from Btree index.'
Logging_Services('AppendLog', objVerifyRDSWoIndexLog, LogData, @RM, @FM)
end else
LogData<4> = 'RDSNo missing from Btree index. Generating index transaction.'
Logging_Services('AppendLog', objVerifyRDSWoIndexLog, LogData, @RM, @FM)
// Add index transaction to update RDS_KEY relational index (target WO_STEP table)
IndexTransactionRow = 'WO':@FM:RDSNo:@FM:"":@FM:WONo:@FM
Open "!RDS" to BangTable then
Lock BangTable, 0 then
Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM
PendingTrans := IndexTransactionRow
Write PendingTrans on BangTable, 0 then
LogData<4> = 'Index transaction successfully added.'
Logging_Services('AppendLog', objVerifyRDSWoIndexLog, LogData, @RM, @FM)
end else
ErrorMsg = 'Error in ':Service:' service. Unable to write index transaction to !RDS. ':RDSNo
end
Unlock BangTable, 0 else ErrorMsg = 'Error in ':Service:' service. Unable to Open !RDS to add index transaction. ':RDSNo
end else
ErrorMsg = 'Error in ':Service:' service. Unable to Lock !RDS to add index transaction. ':RDSNo
end
end else
ErrorMsg = 'Error in ':Service:' service. Unable to Open !RDS to add index transaction. ':RDSNo
end
end
end else
LogData<4> = 'WONo for RDS ':RDSNo:' is null. Nothing to update.'
Logging_Services('AppendLog', objVerifyRDSWoIndexLog, LogData, @RM, @FM)
end
end
end else
ErrorMsg = 'Error in ':Service:' service. Null RDSNo passed in.'
end
If ErrorMsg NE '' then
LogData<4> = ErrorMsg
Logging_Services('AppendLog', objVerifyRDSWoIndexLog, LogData, @RM, @FM)
end
LogData<4> = 'End ':Service
Logging_Services('AppendLog', objVerifyRDSWoIndexLog, LogData, @RM, @FM)
If ErrorMsg NE '' then Error_Services('Add', ErrorMsg)
end service
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Internal GoSubs
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -279,55 +279,66 @@ Event PUB_SIGN.CLICK()
ReactorType = XLATE('RDS',RDSNo,'REACTOR_TYPE','X')
ErrMsg = ''
If Len(ReactorType) GE 3 and ReactorType[1, 3] _EQC 'HTR' then
WoMatKey = WONo:'*':CassNo
IsLastCassetteInWo = WO_MAT_Services('CassetteIsLastInWo', WoMatKey)
If Error_Services('NoError') then
If IsLastCassetteInWo then
NextEventScheduled = False$
NextEventHasSamePsn = True$
NextEventIsBlock = False$
NextScheduledEvent = Schedule_Services('GetNextEvent', Reactor)
If Error_Services('NoError') then
NextEventScheduled = True$
NextEventHasSamePsn = Schedule_Services('NextEventIsSamePsn', Reactor)
NextEventIsBlock = Schedule_Services('NextEventIsBlock', Reactor)
end
If NextEventScheduled EQ False$ or NextEventHasSamePsn EQ False$ or NextEventIsBlock EQ True$ then
WoMatRecord = Database_Services('ReadDataRow', 'WO_MAT', WoMatKey)
WoMatRecord<WO_MAT_LAST_CASSETTE_TEST_WAFER_ACK_REQ$> = True$
TestWaferRanSinceLoad = WoMatRecord<WO_MAT_LAST_CASSETTE_TEST_WAFER_RAN$>
If TestWaferRanSinceLoad NE True$ then
TestWaferRanSinceLoad = Rds_Services('TestWaferRanAfterLoad', RDSNo)
WoMatRecord<WO_MAT_LAST_CASSETTE_TEST_WAFER_RAN$> = TestWaferRanSinceLoad
If TestWaferRanSinceLoad NE True$ then
Message = ''
If NextEventScheduled EQ False$ or NextEventIsBlock EQ True$ then
Message = 'No material scheduled. Test wafer required.'
end else if NextEventHasSamePsn EQ False$ then
Message = 'Next work order is a NEW PSN number. Test wafer required.'
If ( (WONo NE '') and (CassNo NE '') ) then
WoMatKey = WONo:'*':CassNo
If RowExists('WO_MAT', WOMatKey) then
WoMatRecord = Database_Services('ReadDataRow', 'WO_MAT', WoMatKey)
If Error_Services('NoError') then
IsLastCassetteInWo = WO_MAT_Services('CassetteIsLastInWo', WoMatKey)
If Error_Services('NoError') then
If IsLastCassetteInWo then
NextEventScheduled = False$
NextEventHasSamePsn = True$
NextEventIsBlock = False$
NextScheduledEvent = Schedule_Services('GetNextEvent', Reactor)
If Error_Services('NoError') then
NextEventScheduled = True$
NextEventHasSamePsn = Schedule_Services('NextEventIsSamePsn', Reactor)
NextEventIsBlock = Schedule_Services('NextEventIsBlock', Reactor)
end
Message_Box(@Window, Message, "Test Wafer Required", MSG_BTN_OK$ + MSG_ICON_EXCLAM$)
TWLogResult = Dialog_Box('NDW_LOG_TEST_WAFER_USAGE', @Window, RDSNo : @VM : '' : @VM : 'REACTOR' : @VM : Reactor)
WoMatRecord<WO_MAT_LAST_CASSETTE_TEST_WAFER_RAN$> = TWLogResult
If TWLogResult NE True$ then
ErrMsg = 'Unload blocked! You must run a test wafer before signing the unload'
If NextEventScheduled EQ False$ or NextEventHasSamePsn EQ False$ or NextEventIsBlock EQ True$ then
If WOMatRecord NE '' then
WoMatRecord<WO_MAT_LAST_CASSETTE_TEST_WAFER_ACK_REQ$> = True$
TestWaferRanSinceLoad = WoMatRecord<WO_MAT_LAST_CASSETTE_TEST_WAFER_RAN$>
If TestWaferRanSinceLoad NE True$ then
TestWaferRanSinceLoad = Rds_Services('TestWaferRanAfterLoad', RDSNo)
WoMatRecord<WO_MAT_LAST_CASSETTE_TEST_WAFER_RAN$> = TestWaferRanSinceLoad
If TestWaferRanSinceLoad NE True$ then
Message = ''
If NextEventScheduled EQ False$ or NextEventIsBlock EQ True$ then
Message = 'No material scheduled. Test wafer required.'
end else if NextEventHasSamePsn EQ False$ then
Message = 'Next work order is a NEW PSN number. Test wafer required.'
end
Message_Box(@Window, Message, "Test Wafer Required", MSG_BTN_OK$ + MSG_ICON_EXCLAM$)
TWLogResult = Dialog_Box('NDW_LOG_TEST_WAFER_USAGE', @Window, RDSNo : @VM : '' : @VM : 'REACTOR' : @VM : Reactor)
WoMatRecord<WO_MAT_LAST_CASSETTE_TEST_WAFER_RAN$> = TWLogResult
If TWLogResult NE True$ then
ErrMsg = 'Unload blocked! You must run a test wafer before signing the unload'
end
If ErrMsg NE '' then
Database_Services('WriteDataRow', 'WO_MAT', WoMatKey, WoMatRecord, True$, False$, False$)
If Error_Services('HasError') then
ErrMsg = Error_Services('GetMessage')
end
end
end
end
end else
ErrMsg = 'WO_MAT record for ':WOMatKey:' is null!'
end
end
end
end
end
Database_Services('WriteDataRow', 'WO_MAT', WoMatKey, WoMatRecord, True$, False$, False$)
end
end
end else
ErrMsg = Error_Services('GetMessage')
end
end else
ErrMsg = 'WO_MAT ':WOMatKey:' does not exist!'
end
end else
ErrMsg = 'Null WONo or null CassNo!'
end
end
If ErrMsg NE '' then
@ -463,6 +474,3 @@ Setup_OLE_Controls:
return

View File

@ -2063,7 +2063,12 @@ Service CreateReactModeChange(UserID, ReactNo, Mode, ModeSubCat, ModeText, Force
Begin Case
Case ( AbortAlarmOrderActive and (SelE10State _EQC 'Productive') )
ErrorMsg = "An ABORT/ALARM Checklist is active for this reactor and must be completed or overridden in order to change to a productive state."
Case ( (Mode _EQC 'WAITING_FOR_MAINTENANCE_UNSCHEDULED') and IndexC(ModeSubCat, 'ABORT/ALARM', 1) )
// Do not create an ABORT/ALARM NICA order yet as maintenance may determine the appropriate ABORT/ALARM sub mode to be different than
// the operator. This avoids creating a NICA order for the wrong flow.
CreateAbortAlarmOrder = False$
Case ( AbortAlarmFromIntrusiveMaintRequired and IndexC(ModeSubCat, 'ABORT/ALARM', 1) and (ModeSubCatFlowId NE '') and (ChecklistIds NE '') )
// INTRUSIVE_MAINT FIRST_PRODUCT_RUN_THICK or FIRST_PRODUCT_RUN_HGCV checklist started and
// ABORT/ALARM mode entered, so create an ABORT/ALARM order to contain product in reactor.
@ -2099,7 +2104,11 @@ Service CreateReactModeChange(UserID, ReactNo, Mode, ModeSubCat, ModeText, Force
If CreateAbortAlarmOrder then
Nica_Orders_Services('CreateNewOrder', 'REACTOR', ReactNo, 'ABORT_ALARM', ModeSubCatFlowId, ModeSubCatRespLvl, ChecklistIds, Intrusive)
RlComment = 'ABORT/ALARM initiated for flow ':ModeSubCatFlowId:'.'
If Error_Services('HasError') then
ErrorMsg = Error_Services('GetMessage')
end else
RlComment = 'ABORT/ALARM initiated for flow ':ModeSubCatFlowId:'.'
end
end
end
@ -2171,19 +2180,23 @@ Service CreateReactModeChange(UserID, ReactNo, Mode, ModeSubCat, ModeText, Force
EntryId = UserID
RLRec = ''
RLRec<reactor_log_start_date$> = CurDate
RLRec<reactor_log_start_time$> = CurTime
RLRec<reactor_log_reactor$> = ReactNo
if NewModeCategory EQ 'MAINTENANCE' then
RLRec<reactor_log_category$> = 'M' ;* for maintenance
RLRec<REACTOR_LOG_START_DATE$> = CurDate
RLRec<REACTOR_LOG_START_TIME$> = CurTime
RLRec<REACTOR_LOG_REACTOR$> = ReactNo
If NewModeCategory EQ 'MAINTENANCE' then
RLRec<REACTOR_LOG_CATEGORY$> = 'M' ;* for maintenance
end
RLRec<reactor_log_entry_id$> = UserID
RLRec<reactor_log_entry_date$> = CurDate
RLRec<reactor_log_react_util_id$> = NewRUKey
RLRec<reactor_log_react_prob_cat_id$> = ModeSubCatID
CurrWoNo = Xlate('CONFIG', 'WO_DAILY_SCHED':ReactNo, 'F2', 'X')
CurrWoNo = CurrWoNo[1, 'F ']
RLRec<REACTOR_LOG_ENTRY_ID$> = UserID
RLRec<REACTOR_LOG_ENTRY_DATE$> = CurDate
RLRec<REACTOR_LOG_REACT_UTIL_ID$> = NewRUKey
RLRec<REACTOR_LOG_REACT_PROB_CAT_ID$> = ModeSubCatID
If (RLComment NE '') then
RLRec<REACTOR_LOG_NOTES$> = RLComment
RLRec<REACTOR_LOG_NOTES_DTMS$> = CurDate + (CurTime / SECONDS_IN_DAY$)
RLRec<REACTOR_LOG_NOTES_USERS$> = UserID
end
CurrWoNo = Xlate('CONFIG', 'WO_DAILY_SCHED':ReactNo, 'F2', 'X')
CurrWoNo = CurrWoNo[1, 'F ']
If CurrWoNo NE '' then
CurrPSNo = Xlate('WO_LOG', CurrWoNo, 'PS_NO', 'X')
end else
@ -2292,7 +2305,6 @@ Service CreateReactModeChange(UserID, ReactNo, Mode, ModeSubCat, ModeText, Force
// Reopen previous react mode
Database_Services('WriteDataRow', 'REACT_MODE_NG', NGPrevModeKey, PrevModeRec)
end else
If RlComment NE '' then Reactor_Log_Services('AddComment', ReactNo, RlComment, UserID)
If SelE10State _EQC 'Productive' then
// Reset ABORT/ALARM flag
Open 'REACTOR' to hReactor then
@ -3562,6 +3574,53 @@ Service GetReactorDownLL(ReactNo)
end service
Service GetReactorsWithDownLLByDtm(DtmToCheck, ReactType)
ErrMsg = ''
SLLReactors = ''
If DtmToCheck NE '' then
AllReactors = Reactor_Services('GetReactorNumbers', ReactType)
If AllReactors NE '' then
for each ReactNo in AllReactors using @FM
PickPlaceFlag = XLATE('REACTOR', ReactNo, REACTOR_PICK_PLACE$, 'X')
If PickPlaceFlag then
Open 'DICT.REACT_LL' to DictReactLL then
SearchString = ''
SearchString := 'REACT_NO':@VM:ReactNo:@FM
ReactLLKeys = ''
Btree.Extract(SearchString, 'REACT_LL', DictReactLL, ReactLLKeys)
For each ReactLLKey in ReactLLKeys using @VM
ReactLLRec = Database_Services('ReadDataRow', 'REACT_LL', ReactLLKey, True$, 0, False$)
ReactLLStartDTM = Field(ReactLLKey, '*', 2)
ReactLLEndDTM = ReactLLRec<REACT_LL_STOP_DTM$>
ReactLLApplicable = false$
If ReactLLStartDTM LE DtmToCheck AND (ReactLLEndDTM EQ '' OR ReactLLEndDtm GT DtmToCheck) then
Locate ReactNo in SLLReactors using @VM setting iPos else
SLLReactors<1, -1> = ReactNo
end
end
Next ReactLLKey
end else
ErrMsg = 'Unable to open the REACT_LL dictionary.'
end
end
Next ReactNo
end else
ErrMsg = 'No Reactor IDs found!'
end
end else
ErrMsg = 'Datetime to check variable was null.'
end
If ErrMsg NE '' then
Error_Services('Add', ErrMsg)
end
Response = SLLReactors
end service
Service GetReactorLoadCountLimit(ReactNo)
@ -4361,3 +4420,4 @@ ClearCursors:
return

View File

@ -137,6 +137,16 @@ CreateHALItem:
RepJSON = Report_Services('GetOpenTestWaferLotWIPReportJson')
Case ReportID = 'OpenNCRReport'
RepJson = Report_Services('GetOpenNCRReportJson')
Case ReportID = 'SLLReport'
//Single Load Lock Report from Metrology Services
ReportStartDtm = Http_Services('GetQueryField', 'StartDate')
ReportEndDtm = Http_Services('GetQueryField', 'EndDate')
If ReportStartDtm NE '' AND ReportEndDtm NE '' then
RepJson = Report_Services('GetSLLReportJson', ReportStartDtm, ReportEndDtm)
end else
Error_Services('Add', 'Missing parameters for report.')
end
Case Otherwise$
Error_Services('Add', 'Unsupported report')
End Case
@ -233,3 +243,4 @@ API reports.GET
HTTP_Resource_Services('LoremIpsum')
end api

View File

@ -82,7 +82,7 @@ Declare function Set_Printer, Get_Printer, Msg, Get_Status, Printer_Select, ob
Declare function Schedule_Services, Error_Services, Location_Services, SRP_Array, Signature_Services, obj_RDS_Test
Declare function Epi_Part_Services, SRP_Math, Database_Services, SRP_JSON, Reactor_Services, SRP_Datetime
Declare function SRP_Array, Environment_Services, Logging_Services, Datetime, Select_Into, Wafer_Counter_Services
Declare function Lot_Services, Test_Run_Services, NCR_Services
Declare function Lot_Services, Test_Run_Services, NCR_Services, Date_Services
Equ TAB TO \09\
@ -2367,6 +2367,53 @@ Service GetOpenNCRReportJson()
Response = OpenNCRReportJson
end service
/* * * * * *
Called from Reporting Services
* * * * * */
Service GetSLLReportJson(FromDt, ToDt)
FromDt = IConv(FromDt, 'D')
ToDt = IConv(ToDt, 'D')
ErrorMessage = ''
SLLReportJson = ''
objSLLReportJson = ''
If FromDt NE '' OR ToDt NE '' then
If SRP_Json(objSLLReportJson, 'New', 'Array') then
For StartDt = FromDt to ToDt
ThisDate = Date_Services('ConvertDateTimeToISO8601', StartDt)
ThisDtASMDownLL = Reactor_Services('GetReactorsWithDownLLByDtm', StartDt + 1, 'ASM')
ThisDtASMPlusDownLL = Reactor_Services('GetReactorsWithDownLLByDtm', StartDt + 1, 'ASM+')
ThisDtHTRDownLL = Reactor_Services('GetReactorsWithDownLLByDtm', StartDt + 1, 'HTR')
ThisDtASMDownLLCount = DCount(ThisDtASMDownLL, @VM) + DCount(ThisDtASMPlusDownLL, @VM)
ThisDtHTRDownLLCount = DCount(ThisDtHTRDownLL, @VM)
objSLLDay = ''
If SRP_Json(objSLLDay, 'New', 'Object') then
SRP_Json(objSLLDay, 'SetValue', 'Date', ThisDate)
SRP_Json(objSLLDay, 'SetValue', 'ASM', ThisDtASMDownLLCount)
SRP_Json(objSLLDay, 'SetValue', 'HTR', ThisDtHTRDownLLCount)
SRP_Json(objSLLReportJson, 'Add', objSLLDay)
SRP_Json(objSLLDay, 'Release')
end
Next StartDt
SLLReportJson = SRP_Json(objSLLReportJson, 'Stringify', 'Fast')
SRP_Json(objSLLReportJson, 'Release')
end else
ErrorMessage = 'Error creating the root JSON for the report.'
end
end else
ErrorMessage = 'From Date or To Date was null.'
end
If ErrorMessage NE '' then
Error_Services('Add', ErrorMessage)
end
Response = SLLReportJson
end service
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Internal GoSubs
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -2388,3 +2435,4 @@ OipiPrintError:
return

View File

@ -1141,6 +1141,38 @@ Service OpenOIWizardReturnToFabInBrowser(RTFId)
end service
Service GetReturnedToFab(CassID)
If CassID NE '' then
RTFRecords = ''
ErrorMessage = ''
If CassId NE '' then
table = "RETURN_TO_FAB_LOTS"
Open "DICT ":table To @DICT Else
ErrorMessage = 'Error opening RETURN_TO_FAB_LOTS dictionary'
End
If ErrorMessage EQ '' then
srch_strng = "CASS_ID":@VM:CassId:@FM
option = ""
flag = ""
Btree.Extract(srch_strng, table, @DICT, RTFRecords, option, flag)
end
end else
ErrorMessage = 'Error getting return to fab record by cass. ID. Cassette ID was null'
end
end else
ErrorMessage = 'Missing CassID parameter.'
end
If ErrorMessage EQ '' then
If RTFRecords = '' then
Response = False$
end else
Response = True$
end
end else
Error_Services('Add', ErrorMessage)
end
end service
Service InitializeReturnToFabLotOperations(LotId)
ErrorMessage = ''

View File

@ -1142,50 +1142,60 @@ Service ProcessScanData(ScanID, ScanJSON)
CassNo = Xlate('RDS', RDSNo, 'RUN_ORDER_NUM', 'X')
WoMatKey = WO:'*':CassNo
WoMatRec = Database_Services('ReadDataRow', 'WO_MAT', WoMatKey)
LastCassInWoTestWaferAckReq = WoMatRec<WO_MAT_LAST_CASSETTE_TEST_WAFER_ACK_REQ$>
LastCassInWoTestWaferAcked = WoMatRec<WO_MAT_LAST_CASSETTE_TEST_WAFER_ACKED$>
LastCassInWoTestWaferReqMsg = ''
If LastCassInWoTestWaferAcked EQ False$ or LastCassInWoTestWaferAcked EQ '' then
LastCassInWo = WO_MAT_Services('CassetteIsLastInWo', WoMatKey)
If LastCassInWo then
NextEventScheduled = False$
NextEventHasSamePsn = True$
NextEventIsBlock = False$
NextScheduledEvent = Schedule_Services('GetNextEvent', ReactorNo)
If Error_Services('NoError') then
NextEventScheduled = True$
if Error_Services('NoError') then
If WoMatRec NE '' then
LastCassInWoTestWaferAckReq = WoMatRec<WO_MAT_LAST_CASSETTE_TEST_WAFER_ACK_REQ$>
LastCassInWoTestWaferAcked = WoMatRec<WO_MAT_LAST_CASSETTE_TEST_WAFER_ACKED$>
LastCassInWoTestWaferReqMsg = ''
If LastCassInWoTestWaferAcked EQ False$ or LastCassInWoTestWaferAcked EQ '' then
LastCassInWo = WO_MAT_Services('CassetteIsLastInWo', WoMatKey)
NextEventHasSamePsn = Schedule_Services('NextEventIsSamePsn', ReactorNo)
NextEventIsBlock = Schedule_Services('NextEventIsBlock', ReactorNo)
end
If NextEventScheduled EQ False$ or NextEventHasSamePsn EQ False$ or NextEventIsBlock EQ True$ then
LastCassInWoTestWaferAckReq = True$
WoMatRec<WO_MAT_LAST_CASSETTE_TEST_WAFER_ACK_REQ$> = LastCassInWoTestWaferAckReq
TestWaferRanSinceLoad = WoMatRec<WO_MAT_LAST_CASSETTE_TEST_WAFER_RAN$> or TestWaferLotIsValid EQ True$
If TestWaferLotIsValid NE True$ and TestWaferRanSinceLoad NE True$ then
TestWaferRanSinceLoad = Rds_Services('TestWaferRanAfterLoad', RDSNo)
If LastCassInWo then
NextEventScheduled = False$
NextEventHasSamePsn = True$
NextEventIsBlock = False$
If TestWaferRanSinceLoad NE True$ then
LastCassInWoTestWaferReqMsg = ''
If NextEventScheduled EQ False$ or NextEventIsBlock EQ True$ then
LastCassInWoTestWaferReqMsg = 'No material scheduled. Test wafer required.'
end else If NextEventHasSamePsn EQ False$ then
LastCassInWoTestWaferReqMsg = 'Next work order is a NEW PSN number. Test wafer required.'
NextScheduledEvent = Schedule_Services('GetNextEvent', ReactorNo)
If Error_Services('NoError') then
NextEventScheduled = True$
NextEventHasSamePsn = Schedule_Services('NextEventIsSamePsn', ReactorNo)
NextEventIsBlock = Schedule_Services('NextEventIsBlock', ReactorNo)
end
If NextEventScheduled EQ False$ or NextEventHasSamePsn EQ False$ or NextEventIsBlock EQ True$ then
LastCassInWoTestWaferAckReq = True$
WoMatRec<WO_MAT_LAST_CASSETTE_TEST_WAFER_ACK_REQ$> = LastCassInWoTestWaferAckReq
TestWaferRanSinceLoad = WoMatRec<WO_MAT_LAST_CASSETTE_TEST_WAFER_RAN$> or TestWaferLotIsValid EQ True$
If TestWaferLotIsValid NE True$ and TestWaferRanSinceLoad NE True$ then
TestWaferRanSinceLoad = Rds_Services('TestWaferRanAfterLoad', RDSNo)
If TestWaferRanSinceLoad NE True$ then
LastCassInWoTestWaferReqMsg = ''
If NextEventScheduled EQ False$ or NextEventIsBlock EQ True$ then
LastCassInWoTestWaferReqMsg = 'No material scheduled. Test wafer required.'
end else If NextEventHasSamePsn EQ False$ then
LastCassInWoTestWaferReqMsg = 'Next work order is a NEW PSN number. Test wafer required.'
end
Scan_Services('AddNotAcceptableReason', LastCassInWoTestWaferReqMsg)
end
end
Scan_Services('AddNotAcceptableReason', LastCassInWoTestWaferReqMsg)
WoMatRec<WO_MAT_LAST_CASSETTE_TEST_WAFER_RAN$> = TestWaferRanSinceLoad
Database_Services('WriteDataRow', 'WO_MAT', WoMatKey, WoMatRec, True$, False$, False$)
end
end
WoMatRec<WO_MAT_LAST_CASSETTE_TEST_WAFER_RAN$> = TestWaferRanSinceLoad
Database_Services('WriteDataRow', 'WO_MAT', WoMatKey, WoMatRec, True$, False$, False$)
end
end else
ErrorMessage = 'WO_MAT record was null.'
Error_Services('Add', ErrorMessage)
end
end else
ErrorMessage = 'Failure to read cassette record. ' : Error_Services('GetMessage')
Error_Services('Add', ErrorMessage)
end
end
end
@ -1487,6 +1497,7 @@ Service AcceptScan(ScanID, ScanJSON)
// Check if cassette field is populated. If so, then check the cassette's current status to
// determine what the next action will be (i.e. Pre-Epi+Load, Unload, etc.)
CassetteID = CassetteIDs<0, 1>
*if CassetteId EQ 1005860 then debug
TestWaferLots = ScansRow<SCANS.TW_LOT_ID$>
Begin Case
Case CassetteID NE ''
@ -1534,6 +1545,7 @@ Service AcceptScan(ScanID, ScanJSON)
Continue = False$
end
If Continue then
*if RDSNo EQ 1006721 then debug
PreStageSigned = QA_Services('SignPreEpiStage', RDSNo, Username, WaferQty, Reactor, 1)
If PreStageSigned EQ True$ then
LoadStageSigned = QA_Services('SignLoadStage', RDSNo, USername, WaferQty, LLSide, 1)
@ -2402,3 +2414,4 @@ ClearCursors:
return

View File

@ -182,27 +182,27 @@ Service ProcessProcedureQueue()
Loop
ReadNext RequestKeyID else EOF = True$
Until EOF
SendRequest = True$
Read RequestRec from hProcQueue, RequestKeyID then
InQueue = RequestRec<PROC_QUEUE.IN_QUEUE$>
SendRequest = True$
InQueue = RequestRec<PROC_QUEUE.IN_QUEUE$>
If InQueue then
QueuedDtm = RequestRec<PROC_QUEUE.QUEUED_DTM$>
If QueuedDtm GT SRP_Datetime('AddMinutes', Datetime(), -10) then
SendRequest = False$
end
end
end
If SendRequest then
TcpClientHandle = 0
If SRP_TcpClient(TcpClientHandle, 'CONNECT', ServerIP, ServerPort) then
RequestRec<PROC_QUEUE.IN_QUEUE$> = True$
RequestRec<PROC_QUEUE.QUEUED_DTM$> = Datetime()
Write RequestRec on hProcQueue, RequestKeyID then
Command = 'RUN SERVICE_SERVICES "ProcessRequest", ':Quote(RequestKeyID)
SRP_TcpClient(TcpClientHandle, 'SEND_SES', Command)
end
SRP_TcpClient(TcpClientHandle, 'CLOSE_SES')
end
If SendRequest then
TcpClientHandle = 0
If SRP_TcpClient(TcpClientHandle, 'CONNECT', ServerIP, ServerPort) then
RequestRec<PROC_QUEUE.IN_QUEUE$> = True$
RequestRec<PROC_QUEUE.QUEUED_DTM$> = Datetime()
Write RequestRec on hProcQueue, RequestKeyID then
Command = 'RUN SERVICE_SERVICES "ProcessRequest", ':Quote(RequestKeyID)
SRP_TcpClient(TcpClientHandle, 'SEND_SES', Command)
end
SRP_TcpClient(TcpClientHandle, 'CLOSE_SES')
end
end
end
Repeat
end
@ -279,20 +279,21 @@ Service ProcessRequest(RequestKeyID)
Database_Services('WriteDataRow', 'PROC_QUEUE2', RequestKeyId, RequestRow, True$, False$, False$)
end else
// Notify OI_SYSADMIN group
Recipients = ''
SentFrom = 'SYSTEM'
Subject = 'Background Procedure Queue Error'
Message = OConv(Datetime(), 'DT2/^H')
Message<2> = 'Error on server ':Server
Message<3> = 'Stored Procedure: ':Procedure
StatCodes = 'Parameters: ':Params
Message<4> = 'Error_Services error message: ':ErrorMessage
Message<5> = 'Get_Status error code: ':ErrCode
Recipients = ''
SentFrom = 'SYSTEM'
Subject = 'Background Procedure Queue Error'
Message = OConv(Datetime(), 'DT2/^H')
Message<2> = 'Error on server ':Server
Message<3> = 'Stored Procedure: ':Procedure
Message<4> = 'Error_Services error message: ':ErrorMessage
Message<5> = 'Get_Status error code: ':ErrCode
Message<6> = 'Record Dump:'
Message<7> = RequestRow
Swap @FM with \0D0A\ in Message
AttachWindow = ''
AttachKey = ''
SendToGroup = 'OI_SYSADMIN'
Parms = Recipients:@RM:SentFrom:@RM:Subject:@RM:Message:@RM:AttachWindow:@RM:AttachKey:@RM:SendToGroup
AttachWindow = ''
AttachKey = ''
SendToGroup = 'OI_SYSADMIN'
Parms = Recipients:@RM:SentFrom:@RM:Subject:@RM:Message:@RM:AttachWindow:@RM:AttachKey:@RM:SendToGroup
obj_Notes('Create',Parms)
// Move request to PROC_QUEUE_FAILED
RequestRow<PROC_QUEUE.NUM_ATTEMPTS$> = NumAttempts
@ -346,17 +347,25 @@ Service PostProcedure(ProcedureName, Params)
ErrorMsg = ''
If (ProcedureName NE '') then
RequestKeyID = RTI_CreateGUID()
RequestRow = ''
RequestRow<PROC_QUEUE.PROC_NAME$> = ProcedureName
RequestRow<PROC_QUEUE.PARAMS$> = Params
RequestRow<PROC_QUEUE.ENTRY_DTM$> = Datetime()
RequestRow<PROC_QUEUE.IN_QUEUE$> = False$
Database_Services('WriteDataRow', 'PROC_QUEUE2', RequestKeyID, RequestRow, True$, False$, False$)
If Error_Services('NoError') then
Response = RequestKeyId
ProcedureName = UCase(ProcedureName)
LSL2Key = '$':ProcedureName:'*LSL2'
FrameworksKey = '$':ProcedureName:'*FRAMEWORKS'
SysprogKey = '$':ProcedureName
If ( RowExists('SYSOBJ', LSL2Key) or RowExists('SYSOBJ', FrameworksKey) or RowExists('SYSOBJ', SysprogKey) ) then
RequestKeyID = RTI_CreateGUID()
RequestRow = ''
RequestRow<PROC_QUEUE.PROC_NAME$> = ProcedureName
RequestRow<PROC_QUEUE.PARAMS$> = Params
RequestRow<PROC_QUEUE.ENTRY_DTM$> = Datetime()
RequestRow<PROC_QUEUE.IN_QUEUE$> = False$
Database_Services('WriteDataRow', 'PROC_QUEUE2', RequestKeyID, RequestRow, True$, False$, False$)
If Error_Services('NoError') then
Response = RequestKeyId
end else
ErrorMsg = 'Error in ':Service:' service. Error message: ':Error_Services('GetMessage')
end
end else
ErrorMsg = 'Error in ':Service:' service. Error message: ':Error_Services('GetMessage')
ErrorMsg = 'Error in ':Service:' service. PROC_NAME ':Quote(ProcedureName):' does not exist.'
end
end else
ErrorMsg = 'Error in ':Service:' service. Null ProcedureName passed in.'

View File

@ -61,12 +61,12 @@ Equ COL$USER_ID to 8
Equ COL$TAGS to 9
Equ COL$TOOL_ID to 10
Declare function obj_Prod_Spec, RDS_Services, Error_Services, Signature_Services, Memory_Services, obj_RDS_Test
Declare function SRP_Array
Declare function Database_Services, obj_WO_Mat, Dialog_Box, MemberOf, Msg, QA_Services, Datetime, Supplement_Services
Declare function Environment_Services, GetTickCount
Declare function obj_Prod_Spec, RDS_Services, Error_Services, Signature_Services, Memory_Services, obj_RDS_Test
Declare function SRP_Array, Environment_Services, GetTickCount, QA_Services, Datetime, Supplement_Services
Declare function Database_Services, obj_WO_Mat, Dialog_Box, MemberOf, Msg, Logging_Services
Declare subroutine Error_Services, Popup, Memory_Services, SRP_Stopwatch, Set_Status, Database_Services, obj_WO_Mat
Declare subroutine Obj_Notes, Signature_Services, Obj_WO_Mat_Log, ErrMsg, Obj_Rds, Lot_Event_Services, Mona_Services
Declare subroutine Logging_Services
PSNKey = ServiceKeyID
ReactorKey = ServiceKeyID
@ -224,6 +224,8 @@ end service
Service CheckSigOrder(WOMatKey, CurrStage, UseCaching, RDSNo)
ErrorMsg = ''
StartTick = GetTickCount()
MetricName = 'CheckSigOrder'
@ -260,17 +262,15 @@ Service CheckSigOrder(WOMatKey, CurrStage, UseCaching, RDSNo)
Begin Case
Case ( Not(MemberOf(@User4, 'BYPASS') ) and ( (CurrStage EQ 'QA') or (CurrStage EQ 'MO_QA') ) and (PrevStageSig EQ @User4) )
ErrorMsg = 'FQA stage signature cannot match previous step ':PrevStage:' signature. ':WOMatKey:' (':Service:')'
Error_Services('Add', ErrorMsg)
Case PrevStageComp EQ False$
ErrorMsg = 'Previous step ':PrevStage:' is not signed. ':WOMatKey:' (':Service:')'
Error_Services('Add', ErrorMsg)
Case CurrStageComp EQ True$
// Allow user to re-sign. This may be necessary in certain cases such as when multiple surfscans
// have taken place and one still needs to be signed.
Response = True$
Case Error_Services('HasError') EQ True$
// Error message already in stack.
Null
ErrorMsg = Error_Services('GetMessage')
Case Otherwise$
// Ok
Response = True$
@ -282,6 +282,11 @@ Service CheckSigOrder(WOMatKey, CurrStage, UseCaching, RDSNo)
EndTick = GetTickCount()
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
If ErrorMsg NE '' then
Error_Services('Add', ErrorMsg)
end
End Service
@ -2844,6 +2849,14 @@ end service
Service UnsignFQAStage(RDSNo)
Machine = Environment_Services('GetServer')
Headers = 'Logging DTM' : @FM : 'Machine' : @FM : 'Log'
ColumnWidths = 20 : @FM : 15 : @FM : 300
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\Lot'
makeDirSuccess = Utility("MAKEDIR", LogPath)
LogFileName = 'R':RDSNo:'.csv'
objLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, ' ', Headers, ColumnWidths, False$, False$)
IsEPP = Rds_Services('IsEpiPro', RDSNo)
If IsEpp EQ False$ then
Database_Services('ActivateRecord', 'RDS', RDSNo)
@ -2888,8 +2901,11 @@ Service UnsignFQAStage(RDSNo)
{SUP_VER_SIG_DATE} = ''
{SUP_VER_SIG_TIME} = ''
Database_Services('WriteDataRow', 'RDS', RDSNo, @Record, True$, False$, False$)
** Create LOT_EVENT **
Lot_Event_Services('CreateLotEvent', RDSNo, Datetime(), 'UNSIGN_FQA', '', '', @USER4, True$, 'RDS')
LogData = ''
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS') ; // Logging DTM
LogData<2> = Machine
LogData<3> = 'FQA stage unsigned for RDS ':RDSNo:' by user ':@User4
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
end else
Error_Services('Add', 'Error accessing RDS.')
end
@ -2917,7 +2933,3 @@ GetMostRecentSig:
return

View File

@ -128,6 +128,12 @@ Service CreateSupplement(LotType=LOTTYPES, LotID, Stage=STAGES, SupplText, Entry
NewSupRec<SUPPLEMENTS_SUPPL_TEXT$> = SupplText
NewSupRec<SUPPLEMENTS_ENTRY_USER$> = EntryUser
NewSupRec<SUPPLEMENTS_ENTRY_DATETIME$> = Datetime()
If Stages NE False$ then
StageList = Stages<1>
Locate Stage in StageList using @VM setting StageIndex then
NewSupRec<SUPPLEMENTS_STAGE_INDEX$> = StageIndex
end
end
Database_Services('WriteDataRow', 'SUPPLEMENTS', SupplID, NewSupRec, True$, False$, False$)
If Error_Services('NoError') then
Response = SupplID
@ -305,49 +311,30 @@ Service GetSupplementsForLot(LotType=LOTTYPES, LotID, Stage=STAGES)
Response = False$
If ( (LotType NE '') and (LotID NE '') ) then
If (Stage EQ '') then
KeyList = ''
Query = ''
Query<1> = 'LOT_TYPE' : @VM : LotType
Query<2> = 'LOT_ID' : @VM : LotID : @FM
Flag = ''
Open 'DICT.SUPPLEMENTS' to hDict then
Btree.Extract(Query, 'SUPPLEMENTS', hDict, KeyList, 'E', Flag)
If (Flag EQ 0) then
If (KeyList NE '') then
SupplementList = ''
Stages = Supplement_Services('GetStagesForLot', LotType, LotID)
StageCount = Dcount(Stages<1>, @VM)
For I = 1 to StageCount
SupplementStage = Supplement_Services('GetSupplementsForLot', LotType, LotID, Stages<1,I>)
If SupplementStage NE False$ then SupplementList<-1> = SupplementStage
Next I
If SupplementList NE '' then Response = SupplementList
end
end else
Error_Services('Add', 'Error in ':Service:' service. Error calling Btree.Extract')
end
end else
Error_Services('Add', 'Error in ':Service:' service. Error opening SUPPLEMENTS dictionary.')
end
end else
StageSupplementList = ''
Query = ''
Query<1> = 'LOT_TYPE' : @VM : LotType
Query<2> = 'LOT_ID' : @VM : LotID
Query<3> = 'STAGE' : @VM : Stage : @FM
Flag = ''
Open 'DICT.SUPPLEMENTS' to hDict then
Btree.Extract(Query, 'SUPPLEMENTS', hDict, StageSupplementList, 'E', Flag)
If (Flag EQ 0) then
If StageSupplementList NE '' then Response = StageSupplementList
end else
Error_Services('Add', 'Error in ':Service:' service. Error calling Btree.Extract')
If Stage EQ '' then Stage = '#0'
StageSupplementList = ''
Query = ''
Query<1> = 'LOT_TYPE' : @VM : LotType
Query<2> = 'LOT_ID' : @VM : LotID
Query<3> = 'STAGE' : @VM : Stage : @FM
Flag = ''
Open 'DICT.SUPPLEMENTS' to hDict then
Btree.Extract(Query, 'SUPPLEMENTS', hDict, StageSupplementList, 'E', Flag)
If (Flag EQ 0) then
If StageSupplementList NE '' then
StageIndexes = Xlate('SUPPLEMENTS', StageSupplementList, 'STAGE_INDEX', 'X')
SortArray = StageIndexes:@FM:StageSupplementList
SortArray = SRP_Array('SortRows', SortArray, 'AR1', 'ARRAY', @FM, @VM)
SortedStageSupplementList = SortArray<2>
Convert @VM to @FM in SortedStageSupplementList
Response = SortedStageSupplementList
end
end else
Error_Services('Add', 'Error in ':Service:' service. Error opening SUPPLEMENTS dictionary.')
end
end
end else
Error_Services('Add', 'Error in ':Service:' service. Error calling Btree.Extract')
end
end else
Error_Services('Add', 'Error in ':Service:' service. Error opening SUPPLEMENTS dictionary.')
end
end else
Error_Services('Add', 'LotType or LotID was missing in the ' : Service : ' service.')
end
@ -683,6 +670,3 @@ Service SendNotifications(RDSList, EditEvent, Instructions, EntryUser)
end service

View File

@ -164,7 +164,7 @@ WRITE_RECORD:
MetrologyID = Field(Name, '*', 1)
RDSNo = Xlate('RDS_TEST', MetrologyID, RDS_TEST_RDS_NO$, 'X')
Service_Services('PostProcedure', 'RDS_Services', 'AllTWUseSigned':SD$:RDSNo)
Service_Services('PostProcedure', 'RDS_SERVICES', 'AllTWUseSigned':SD$:RDSNo)
end
return

View File

@ -39,7 +39,7 @@ Function Wafercounter_API(@API)
#pragma precomp SRP_PreCompiler
Declare function OI_Wizard_Services, Wafer_Counter_Services, Database_Services, Datetime, Wo_Mat_Services
Declare function Logging_Services, Environment_Services
Declare function Logging_Services, Environment_Services, Wo_Mat_Qa_Services, Return_To_Fab_Services
Declare subroutine Logging_Services
@ -127,7 +127,12 @@ API wafercounter.startnewwafercount.POST
CassNo = Field(CassId, '*', 3)
WoMatKey = WONo : '*' : CassNo
End Case
ReturnedToFab = Return_To_Fab_Services('GetReturnedToFab', CassID)
QAMetComplete = Wo_Mat_Qa_Services('GetQAMetComplete', WoMatKey)
ExpectedWfrMap = Wo_Mat_Services('GetWaferMap', WoMatKey)
If (ReturnedToFab EQ False$) AND (QAMetComplete EQ False$) then
Error_Services('Add', 'Wafer Counter Operation Not Allowed. QA Metrology Incomplete.')
end
ExpectedCassetteArray = ''
for i = 25 to 1 step -1
Slot = i
@ -376,3 +381,5 @@ API wafercounter.ID.GET
HTTP_Services('SetResponseStatus', ResponseCode, ErrorMessage)
end api

View File

@ -530,8 +530,8 @@ Service GetWaferCounterJSONTestData(WaferSize, ToolLocation, CassID)
If SRP_JSON(objJson, 'New', 'Object') then
SRP_JSON(objJson, 'SetValue', 'dateTimeFormatted', Datetime(), 'String')
SRP_JSON(objJson, 'SetValue', 'equipmentId', 'WC8INCH1', 'String')
SRP_JSON(objJson, 'SetValue', 'total', 25, 'Number')
SRP_JSON(objJson, 'SetValue', 'slotMap', '1111111111111111111111111', 'String')
SRP_JSON(objJson, 'SetValue', 'total', 24, 'Number')
SRP_JSON(objJson, 'SetValue', 'slotMap', '1111111110111111111111111', 'String')
Response = SRP_Json(objJson, 'Stringify', 'Styled')
SRP_JSON(objJSON, 'Release')
end
@ -744,4 +744,3 @@ return

View File

@ -53,9 +53,8 @@ $Insert MSG_EQUATES
$Insert DICT_EQUATES
$Insert WM_IN_EQUATES
Declare function Database_Services
Declare function PSN_Services, SRP_Rotate_Array, Datetime
Declare subroutine Database_Services, Set_Status, OBJ_WO_MAT_LOG
Declare function PSN_Services, SRP_Rotate_Array, Datetime, Database_Services, Environment_Services, Logging_Services
Declare subroutine Database_Services, Set_Status, obj_Wo_Mat_Log, Logging_Services, Extract_Si_Keys
GoToService
@ -121,7 +120,9 @@ Service AddComment(WMInNo, Comment)
End Service
Service SetVoidFlag(WMInKey, Username)
ErrorMessage = ''
If RowExists('WM_IN', WMInKey) then
WMInRec = Database_Services('ReadDataRow', 'WM_IN', WMInKey, True$, 0, False$)
@ -160,7 +161,210 @@ Service SetVoidFlag(WMInKey, Username)
If ErrorMessage NE '' then
Error_Services('Add', ErrorMessage)
end
end service
Service VerifyWoStepWMIKeyIndex(WMIKey)
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WM_IN'
LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS')
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' !WM_IN WO_STEP{WM_IN_KEY} Log.csv'
Headers = 'Logging DTM':@FM:'WMIKey':@FM:'WOStep':@FM:'Result'
objVerifyWMIKeyLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, COMMA$, Headers, '', False$, False$)
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
LogData = ''
LogData<1> = LoggingDtm
LogData<2> = WMIKey
LogData<4> = 'Begin ':Service
Logging_Services('AppendLog', objVerifyWMIKeyLog, LogData, @RM, @FM)
ErrorMsg = ''
If WMIKey NE '' then
If RowExists('WM_IN', WMIKey) then
WOStepKey = Field(WMIKey, '*', 1, 2)
If WOStepKey NE '' then
WOStepWMIKeys = Xlate('WO_STEP', WOStepKey, 'WM_IN_KEYS', 'X')
LogData<3> = WOStepKey
Logging_Services('AppendLog', objVerifyWMIKeyLog, LogData, @RM, @FM)
Locate WMIKey in WOStepWMIKeys using @VM setting vPos else
LogData<4> = 'WMIKey missing from WO_STEP record. Generating index transaction.'
Logging_Services('AppendLog', objVerifyWMIKeyLog, LogData, @RM, @FM)
// Add index transaction to update WM_IN_KEYS relational index (target WO_STEP table)
IndexTransactionRow = 'WO_STEP*WM_IN_KEYS*AR':@FM:WMIKey:@FM:"":@FM:WOStepKey:@FM
Open "!WM_IN" to BangTable then
Lock BangTable, 0 then
Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM
PendingTrans := IndexTransactionRow
Write PendingTrans on BangTable, 0 then
LogData<4> = 'Index transaction successfully added.'
Logging_Services('AppendLog', objVerifyWMIKeyLog, LogData, @RM, @FM)
end else
ErrorMsg = 'Unable to write index transaction to !WM_IN. ':WMIKey
end
Unlock BangTable, 0 else ErrorMsg = 'Unable to Open !WM_IN to add index transaction. ':WMIKey
end else
ErrorMsg = 'Unable to Lock !WM_IN to add index transaction. ':WMIKey
end
end else
ErrorMsg = 'Unable to Open !WM_IN to add index transaction. ':WMIKey
end
end
end else
LogData<4> = 'WO_STEP key for WM_IN ':WMIKey:' is null. Nothing to update.'
Logging_Services('AppendLog', objVerifyWMIKeyLog, LogData, @RM, @FM)
end
end
end
If ErrorMsg NE '' then
LogData<4> = ErrorMsg
Logging_Services('AppendLog', objVerifyWMIKeyLog, LogData, @RM, @FM)
end
LogData<4> = 'End ':Service
Logging_Services('AppendLog', objVerifyWMIKeyLog, LogData, @RM, @FM)
If ErrorMsg NE '' then Error_Services('Add', ErrorMsg)
end service
Service VerifyWOLogWMIKeyIndex(WMIKey)
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WM_IN'
LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS')
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' !WM_IN WM_IN{WO_NO} Log.csv'
Headers = 'Logging DTM':@FM:'WMIKey':@FM:'WOStep':@FM:'Result'
objVerifyWMIWoIndexLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, COMMA$, Headers, '', False$, False$)
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
LogData = ''
LogData<1> = LoggingDtm
LogData<2> = WMIKey
LogData<4> = 'Begin ':Service
Logging_Services('AppendLog', objVerifyWMIWoIndexLog, LogData, @RM, @FM)
ErrorMsg = ''
If WMIKey NE '' then
If RowExists('WM_IN', WMIKey) then
WONo = Field(WMIKey, '*', 1, 1)
If WONo NE '' then
WOLogRDSKeys = ''
Extract_Si_Keys('WM_IN', 'WO_NO', WONo, WOLogRDSKeys)
LogData<3> = WONo
Logging_Services('AppendLog', objVerifyWMIWoIndexLog, LogData, @RM, @FM)
Locate WMIKey in WOLogRDSKeys using @VM setting vPos else
LogData<4> = 'WMIKey missing from Btree index. Generating index transaction.'
Logging_Services('AppendLog', objVerifyWMIWoIndexLog, LogData, @RM, @FM)
// Add index transaction to update WO_NO btree index
IndexTransactionRow = 'WO_NO':@FM:WMIKey:@FM:"":@FM:WONo:@FM
Open "!WM_IN" to BangTable then
Lock BangTable, 0 then
Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM
PendingTrans := IndexTransactionRow
Write PendingTrans on BangTable, 0 then
LogData<4> = 'Index transaction successfully added.'
Logging_Services('AppendLog', objVerifyWMIWoIndexLog, LogData, @RM, @FM)
end else
ErrorMsg = 'Error in ':Service:' service. Unable to write index transaction to !WM_IN. ':WMIKey
end
Unlock BangTable, 0 else ErrorMsg = 'Error in ':Service:' service. Unable to Open !WM_IN to add index transaction. ':WMIKey
end else
ErrorMsg = 'Error in ':Service:' service. Unable to Lock !WM_IN to add index transaction. ':WMIKey
end
end else
ErrorMsg = 'Error in ':Service:' service. Unable to Open !WM_IN to add index transaction. ':WMIKey
end
end
end else
LogData<4> = 'WONo for WM_IN ':WMIKey:' is null. Nothing to update.'
Logging_Services('AppendLog', objVerifyWMIWoIndexLog, LogData, @RM, @FM)
end
end
end else
ErrorMsg = 'Error in ':Service:' service. Null WMIKey passed in.'
end
If ErrorMsg NE '' then
LogData<4> = ErrorMsg
Logging_Services('AppendLog', objVerifyWMIWoIndexLog, LogData, @RM, @FM)
end
LogData<4> = 'End ':Service
Logging_Services('AppendLog', objVerifyWMIWoIndexLog, LogData, @RM, @FM)
If ErrorMsg NE '' then Error_Services('Add', ErrorMsg)
end service
Service VerifyWOMatWMIKeyIndex(WMIKey)
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WM_IN'
LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS')
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' !WM_IN WO_MAT{WMI_KEY} Log.csv'
Headers = 'Logging DTM':@FM:'WMIKey':@FM:'WOMatKey':@FM:'Result'
objVerifyWoMatWmiKeyLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, COMMA$, Headers, '', False$, False$)
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
LogData = ''
LogData<1> = LoggingDtm
LogData<2> = WMIKey
LogData<4> = 'Begin ':Service
Logging_Services('AppendLog', objVerifyWoMatWmiKeyLog, LogData, @RM, @FM)
ErrorMsg = ''
If WMIKey NE '' then
If RowExists('WM_IN', WMIKey) then
WOMatKey = Field(WMIKey, '*', 1, 1):'*':Field(WMIKey, '*', 3, 1)
If WOMatKey NE '' then
WOMatWMIKey = Xlate('WO_MAT', WOMatKey, 'WMI_KEY', 'X')
LogData<3> = WOMatKey
Logging_Services('AppendLog', objVerifyWoMatWmiKeyLog, LogData, @RM, @FM)
If WOMatWMIKey EQ '' then
LogData<4> = 'WMIKey missing from WO_MAT record. Generating index transaction.'
Logging_Services('AppendLog', objVerifyWoMatWmiKeyLog, LogData, @RM, @FM)
// Add index transaction to update WMI_KEY relational index (target WO_MAT table)
IndexTransactionRow = 'WO_MAT*WMI_KEY*TOP':@FM:WMIKey:@FM:"":@FM:WOMatKey:@FM
Open "!WM_IN" to BangTable then
Lock BangTable, 0 then
Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM
PendingTrans := IndexTransactionRow
Write PendingTrans on BangTable, 0 then
LogData<4> = 'Index transaction successfully added.'
Logging_Services('AppendLog', objVerifyWoMatWmiKeyLog, LogData, @RM, @FM)
end else
ErrorMsg = 'Unable to write index transaction to !WM_IN. ':WMIKey
end
Unlock BangTable, 0 else ErrorMsg = 'Unable to Open !WM_IN to add index transaction. ':WMIKey
end else
ErrorMsg = 'Unable to Lock !WM_IN to add index transaction. ':WMIKey
end
end else
ErrorMsg = 'Unable to Open !WM_IN to add index transaction. ':WMIKey
end
end
end else
LogData<4> = 'WO_MAT key for WM_IN ':WMIKey:' is null. Nothing to update.'
Logging_Services('AppendLog', objVerifyWoMatWmiKeyLog, LogData, @RM, @FM)
end
end
end
If ErrorMsg NE '' then
LogData<4> = ErrorMsg
Logging_Services('AppendLog', objVerifyWoMatWmiKeyLog, LogData, @RM, @FM)
end
LogData<4> = 'End ':Service
Logging_Services('AppendLog', objVerifyWoMatWmiKeyLog, LogData, @RM, @FM)
If ErrorMsg NE '' then Error_Services('Add', ErrorMsg)
end service

View File

@ -59,8 +59,10 @@ $Insert COMPANY_EQUATES
$Insert RETURN_TO_FAB_LOTS_EQUATES
Declare function Database_Services, SRP_JSON, Error_Services, Clean_Insp_Services, WO_Mat_QA_Services
Declare function PSN_Services, SRP_Rotate_Array, Datetime, Return_To_Fab_Services
Declare function PSN_Services, SRP_Rotate_Array, Datetime, Return_To_Fab_Services, Environment_Services
Declare function Logging_Services
Declare subroutine Database_Services, SRP_JSON, Error_Services, Extract_Si_Keys, Set_Status, obj_wo_mat_log
Declare subroutine Logging_Services
GoToService
@ -436,8 +438,210 @@ Service SetVoidFlag(WMOutKey, Username)
If ErrorMessage NE '' then
Error_Services('Add', ErrorMessage)
end
end service
Service VerifyWoStepWMOKeyIndex(WMOKey)
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WM_OUT'
LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS')
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' !WM_OUT WO_STEP{WM_OUT_KEYS} Log.csv'
Headers = 'Logging DTM':@FM:'WMOKey':@FM:'WOStep':@FM:'Result'
objVerifyWMOKeyLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, COMMA$, Headers, '', False$, False$)
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
LogData = ''
LogData<1> = LoggingDtm
LogData<2> = WMOKey
LogData<4> = 'Begin ':Service
Logging_Services('AppendLog', objVerifyWMOKeyLog, LogData, @RM, @FM)
ErrorMsg = ''
If WMOKey NE '' then
If RowExists('WM_OUT', WMOKey) then
WOStepKey = Field(WMOKey, '*', 1, 2)
If WOStepKey NE '' then
WOStepWMOKeys = Xlate('WO_STEP', WOStepKey, 'WM_OUT_KEYS', 'X')
LogData<3> = WOStepKey
Logging_Services('AppendLog', objVerifyWMOKeyLog, LogData, @RM, @FM)
Locate WMOKey in WOStepWMOKeys using @VM setting vPos else
LogData<4> = 'WMOKey missing from WO_STEP record. Generating index transaction.'
Logging_Services('AppendLog', objVerifyWMOKeyLog, LogData, @RM, @FM)
// Add index transaction to update WM_OUT_KEYS relational index (target WO_STEP table)
IndexTransactionRow = 'WO_STEP*WM_OUT_KEYS*AR':@FM:WMOKey:@FM:"":@FM:WOStepKey:@FM
Open "!WM_OUT" to BangTable then
Lock BangTable, 0 then
Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM
PendingTrans := IndexTransactionRow
Write PendingTrans on BangTable, 0 then
LogData<4> = 'Index transaction successfully added.'
Logging_Services('AppendLog', objVerifyWMOKeyLog, LogData, @RM, @FM)
end else
ErrorMsg = 'Unable to write index transaction to !WM_OUT. ':WMOKey
end
Unlock BangTable, 0 else ErrorMsg = 'Unable to Open !WM_OUT to add index transaction. ':WMOKey
end else
ErrorMsg = 'Unable to Lock !WM_OUT to add index transaction. ':WMOKey
end
end else
ErrorMsg = 'Unable to Open !WM_OUT to add index transaction. ':WMOKey
end
end
end else
LogData<4> = 'WO_STEP key for WM_OUT ':WMOKey:' is null. Nothing to update.'
Logging_Services('AppendLog', objVerifyWMOKeyLog, LogData, @RM, @FM)
end
end
end
If ErrorMsg NE '' then
LogData<4> = ErrorMsg
Logging_Services('AppendLog', objVerifyWMOKeyLog, LogData, @RM, @FM)
end
LogData<4> = 'End ':Service
Logging_Services('AppendLog', objVerifyWMOKeyLog, LogData, @RM, @FM)
If ErrorMsg NE '' then Error_Services('Add', ErrorMsg)
end service
Service VerifyWOLogWMOKeyIndex(WMOKey)
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WM_OUT'
LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS')
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' !WM_OUT WM_OUT{WO_NO} Log.csv'
Headers = 'Logging DTM':@FM:'WMOKey':@FM:'WOStep':@FM:'Result'
objVerifyWMOWoIndexLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, COMMA$, Headers, '', False$, False$)
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
LogData = ''
LogData<1> = LoggingDtm
LogData<2> = WMOKey
LogData<4> = 'Begin ':Service
Logging_Services('AppendLog', objVerifyWMOWoIndexLog, LogData, @RM, @FM)
ErrorMsg = ''
If WMOKey NE '' then
If RowExists('WM_OUT', WMOKey) then
WONo = Field(WMOKey, '*', 1, 1)
If WONo NE '' then
WOLogRDSKeys = ''
Extract_Si_Keys('WM_OUT', 'WO_NO', WONo, WOLogRDSKeys)
LogData<3> = WONo
Logging_Services('AppendLog', objVerifyWMOWoIndexLog, LogData, @RM, @FM)
Locate WMOKey in WOLogRDSKeys using @VM setting vPos else
LogData<4> = 'WMOKey missing from Btree index. Generating index transaction.'
Logging_Services('AppendLog', objVerifyWMOWoIndexLog, LogData, @RM, @FM)
// Add index transaction to update WO_NO btree index
IndexTransactionRow = 'WO_NO':@FM:WMOKey:@FM:"":@FM:WONo:@FM
Open "!WM_OUT" to BangTable then
Lock BangTable, 0 then
Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM
PendingTrans := IndexTransactionRow
Write PendingTrans on BangTable, 0 then
LogData<4> = 'Index transaction successfully added.'
Logging_Services('AppendLog', objVerifyWMOWoIndexLog, LogData, @RM, @FM)
end else
ErrorMsg = 'Error in ':Service:' service. Unable to write index transaction to !WM_OUT. ':WMOKey
end
Unlock BangTable, 0 else ErrorMsg = 'Error in ':Service:' service. Unable to Open !WM_OUT to add index transaction. ':WMOKey
end else
ErrorMsg = 'Error in ':Service:' service. Unable to Lock !WM_OUT to add index transaction. ':WMOKey
end
end else
ErrorMsg = 'Error in ':Service:' service. Unable to Open !WM_OUT to add index transaction. ':WMOKey
end
end
end else
LogData<4> = 'WONo for WM_OUT ':WMOKey:' is null. Nothing to update.'
Logging_Services('AppendLog', objVerifyWMOWoIndexLog, LogData, @RM, @FM)
end
end
end else
ErrorMsg = 'Error in ':Service:' service. Null WMOKey passed in.'
end
If ErrorMsg NE '' then
LogData<4> = ErrorMsg
Logging_Services('AppendLog', objVerifyWMOWoIndexLog, LogData, @RM, @FM)
end
LogData<4> = 'End ':Service
Logging_Services('AppendLog', objVerifyWMOWoIndexLog, LogData, @RM, @FM)
If ErrorMsg NE '' then Error_Services('Add', ErrorMsg)
end service
Service VerifyWOMatWMOKeyIndex(WMOKey)
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WM_OUT'
LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS')
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' !WM_OUT WO_MAT{WMO_KEY} Log.csv'
Headers = 'Logging DTM':@FM:'WMOKey':@FM:'WOMatKey':@FM:'Result'
objVerifyWOMatWmoKeyLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, COMMA$, Headers, '', False$, False$)
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
LogData = ''
LogData<1> = LoggingDtm
LogData<2> = WMOKey
LogData<4> = 'Begin ':Service
Logging_Services('AppendLog', objVerifyWOMatWmoKeyLog, LogData, @RM, @FM)
ErrorMsg = ''
If WMOKey NE '' then
If RowExists('WM_OUT', WMOKey) then
WOMatKey = Field(WMOKey, '*', 1, 1):'*':Field(WMOKey, '*', 3, 1)
If WOMatKey NE '' then
WOMatWMOKey = Xlate('WO_MAT', WOMatKey, 'WMO_KEY', 'X')
LogData<3> = WOMatKey
Logging_Services('AppendLog', objVerifyWOMatWmoKeyLog, LogData, @RM, @FM)
If WOMatWMOKey EQ '' then
LogData<4> = 'WMOKey missing from WO_MAT record. Generating index transaction.'
Logging_Services('AppendLog', objVerifyWOMatWmoKeyLog, LogData, @RM, @FM)
// Add index transaction to update WMO_KEY relational index (target WO_MAT table)
IndexTransactionRow = 'WO_MAT*WMO_KEY*TOP':@FM:WMOKey:@FM:"":@FM:WOMatKey:@FM
Open "!WM_OUT" to BangTable then
Lock BangTable, 0 then
Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM
PendingTrans := IndexTransactionRow
Write PendingTrans on BangTable, 0 then
LogData<4> = 'Index transaction successfully added.'
Logging_Services('AppendLog', objVerifyWOMatWmoKeyLog, LogData, @RM, @FM)
end else
ErrorMsg = 'Unable to write index transaction to !WM_OUT. ':WMOKey
end
Unlock BangTable, 0 else ErrorMsg = 'Unable to Open !WM_OUT to add index transaction. ':WMOKey
end else
ErrorMsg = 'Unable to Lock !WM_OUT to add index transaction. ':WMOKey
end
end else
ErrorMsg = 'Unable to Open !WM_OUT to add index transaction. ':WMOKey
end
end
end else
LogData<4> = 'WO_MAT key for WM_OUT ':WMOKey:' is null. Nothing to update.'
Logging_Services('AppendLog', objVerifyWOMatWmoKeyLog, LogData, @RM, @FM)
end
end
end
If ErrorMsg NE '' then
LogData<4> = ErrorMsg
Logging_Services('AppendLog', objVerifyWOMatWmoKeyLog, LogData, @RM, @FM)
end
LogData<4> = 'End ':Service
Logging_Services('AppendLog', objVerifyWOMatWmoKeyLog, LogData, @RM, @FM)
If ErrorMsg NE '' then Error_Services('Add', ErrorMsg)
end service

View File

@ -50,6 +50,8 @@ $Insert VOIDED_LOT_EQUATES
$Insert IFX_EQUATES
$Insert CUST_EPI_PART_EQUATES
Equ MAX_NUM_CASS$ to 150
Declare subroutine Error_Services, Work_Order_Services, Memory_Services, RList, Database_Services, SRP_JSON
Declare subroutine Btree.Extract, Set_Status, obj_WO_Log, obj_Notes, Print_Wo_Mat_In_Labels, Print_Wo_Mat_Out_Labels
Declare subroutine Print_Wmi_Labels, Print_Wmo_Labels, ErrMsg, Print_Cass_Labels, Logging_Services, Service_Services
@ -59,7 +61,7 @@ Declare subroutine obj_WO_Mat, obj_Post_Log
Declare function SRP_Array, Work_Order_Services, Memory_Services, Database_Services, SRP_Sort_Array, SRP_JSON
Declare function Company_Services, obj_Prod_Spec, Schedule_Services, obj_WO_Log, obj_WO_Step, Memberof, Datetime
Declare function Environment_Services, Logging_Services, Hold_Services, Signature_Services, Lot_Services
Declare function SRP_Datetime, RTI_CreateGUID, RDS_Services
Declare function SRP_Datetime, RTI_CreateGUID, RDS_Services, UCase
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WO_LOG'
LogDate = Oconv(Date(), 'D4/')
@ -646,7 +648,6 @@ Service ReceiveCassette(WONo, ReceiveUser, LotNo, CassQty, SubPartNo, SubVendorC
WOMatKeys = SRP_Array('SortRows', WOMatKeys, 'AR2', 'LIST', @VM, '*')
If WOMatKeys NE '' then
WOMatKeys = SRP_Array('SortRows', WOMatKeys, 'AR2', 'LIST', @VM, '*')
LastCassNo = WOMatKeys[-1, 'B*']
end else
LastCassNo = 0
@ -1455,15 +1456,7 @@ Service CreateVoidedLotRecord(LotId, LegacyLotId, LegacyLotType, WoMatKey, UserI
if LegacyLotType NE '' then
if LegacyLotType EQ 'RDS' OR LegacyLotType EQ 'WM_IN' OR LegacyLotType EQ 'WM_OUT' then
LotId = Lot_Services('GetLotIdByLegacyLotIdAndType', LegacyLotId, LegacyLotType)
If Error_Services('NoError') then
If LotID EQ '' then
//No Lot ID was found, lets create one.
LotId = Lot_Services('CreateNewLot', 'RDS', '', '', '', '', '', UserId, '', LegacyLotId)
If Error_Services('HasError') then
ErrorMessage = Error_Services('GetMessage')
end
end
end else
If Error_Services('HasError') then
ErrorMessage = Error_Services('GetMessage')
end
end else
@ -1474,23 +1467,19 @@ Service CreateVoidedLotRecord(LotId, LegacyLotId, LegacyLotType, WoMatKey, UserI
end
end
If ErrorMessage NE '' then
If RowExists('LOT', LotId) then
NewVoidedLotId = RTI_CreateGUID()
NewVoidedLotRec = ''
NewVoidedLotRec<VOIDED_LOT_WORK_ORDER_LOG_ID$> = Field(WoMatKey, '*', 1)
NewVoidedLotRec<VOIDED_LOT_VOID_BY$> = UserId
NewVoidedLotRec<VOIDED_LOT_VOID_DTM$> = Datetime()
NewVoidedLotRec<VOIDED_LOT_ENTITY_TYPE$> = LegacyLotType
NewVoidedLotRec<VOIDED_LOT_LOT_ID$> = LotId
NewVoidedLotRec<VOIDED_LOT_LEGACY_LOT_ID$> = LegacyLotId
NewVoidedLotRec<VOIDED_LOT_WO_MAT_KEY$> = WoMatKey
Database_Services('WriteDataRow', 'VOIDED_LOT', NewVoidedLotId, NewVoidedLotRec)
If Error_Services('HasError') then
ErrorMessage = Error_Services('GetMessage')
end
end else
ErrorMessage = 'Unable to find lot record.'
If (ErrorMessage EQ '') then
NewVoidedLotId = RTI_CreateGUID()
NewVoidedLotRec = ''
NewVoidedLotRec<VOIDED_LOT_WORK_ORDER_LOG_ID$> = Field(WoMatKey, '*', 1)
NewVoidedLotRec<VOIDED_LOT_VOID_BY$> = UserId
NewVoidedLotRec<VOIDED_LOT_VOID_DTM$> = Datetime()
NewVoidedLotRec<VOIDED_LOT_ENTITY_TYPE$> = LegacyLotType
NewVoidedLotRec<VOIDED_LOT_LOT_ID$> = LotId
NewVoidedLotRec<VOIDED_LOT_LEGACY_LOT_ID$> = LegacyLotId
NewVoidedLotRec<VOIDED_LOT_WO_MAT_KEY$> = WoMatKey
Database_Services('WriteDataRow', 'VOIDED_LOT', NewVoidedLotId, NewVoidedLotRec)
If Error_Services('HasError') then
ErrorMessage = Error_Services('GetMessage')
end
end
end else
@ -1503,6 +1492,7 @@ Service CreateVoidedLotRecord(LotId, LegacyLotId, LegacyLotType, WoMatKey, UserI
end service
Service IsLotVoided(LotId)
//Todo: Move to Lot_Services
@ -1524,6 +1514,7 @@ Service IsLotVoided(LotId)
end service
Service SignVoidNonEpp(WOMatKeys, WONo, Username)
ErrorMessage = ''
@ -1544,9 +1535,14 @@ Service SignVoidNonEpp(WOMatKeys, WONo, Username)
if Error_Services('NoError') then
RDS_Services('DetachRDSFromWO', RDSNo)
If Error_Services('NoError') then
//Create a voided LOT record then record an event.
// Create a voided LOT record.
Work_Order_Services('CreateVoidedLotRecord', '', RDSNo, 'RDS', WoMatKey, Username)
Lot_Event_Services('CreateLotEvent', RDSNo, Datetime(), 'VOID', 'Lot voided by ' : Username, '', Username, True$, 'RDS')
LotId = Lot_Services('GetLotIdByLegacyLotIdAndType', RDSNo, 'RDS')
// Create a LOT_EVENT record if this lot is in the new LOT system.
If LotId NE '' then
Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'COMMENT', 'Lot voided by ' : Username, '', Username, True$, 'RDS')
If Error_Services('HasError') then ErrorMessage = Error_Services('GetMessage')
end
end else
ErrorMessage = Error_Services('GetMessage')
end
@ -1609,20 +1605,27 @@ Service SignVoidWMI(WMInKeys, WONo, Username)
If Not(IsOnHold) then
WM_In_Services('SetVoidFlag', WmInKey, Username)
If Error_Services('NoError') then
Lot_Event_Services('CreateLotEvent', WmInKey, DateTime(), 'VOID', 'Lot voided by ' : Username, '', Username, True$, 'WM_IN')
Work_Order_Services('CreateVoidedLotRecord', '', WmInKey, 'WM_IN', WoMatKey, Username)
if Error_Services('NoError') then
//Check if WMO is also voided. If it is, remove it from the WO_MAT_KEY field in WO_LOG, and void the WO_MAT record
WMOKey = WMInKey; //the paired WMO key is the same as the WMIKey
IsWMOVoided = Database_Services('ReadDataColumn', 'WM_OUT', WMOKey, WM_OUT_VOID$)
If IsWMOVoided then
Locate WoMatKey in WoLogRecord<WO_LOG_WO_MAT_KEY$> using @VM setting CassPos then
WoLogRecord<WO_LOG_WO_MAT_KEY$> = Delete(WOLogRecord<WO_LOG_WO_MAT_KEY$>, 1, CassPos, 0)
WO_Mat_Services('SetWoMatVoidFlag', WoMatKey, Username)
end else
ErrorMessage = 'Unable to locate WO_MAT key in WO_LOG record.'
If Error_Services('NoError') then
LotId = Lot_Services('GetLotIdByLegacyLotIdAndType', WmInKey, 'WM_IN')
// Create a LOT_EVENT record if this lot is in the new LOT system.
If LotId NE '' then
Lot_Event_Services('CreateLotEvent', WmInKey, DateTime(), 'COMMENT', 'Lot voided by ' : Username, '', Username, True$, 'WM_IN')
If Error_Services('HasError') then ErrorMessage = Error_Services('GetMessage')
end
If ErrorMessage EQ '' then
//Check if WMO is also voided. If it is, remove it from the WO_MAT_KEY field in WO_LOG, and void the WO_MAT record
WMOKey = WMInKey; //the paired WMO key is the same as the WMIKey
IsWMOVoided = Database_Services('ReadDataColumn', 'WM_OUT', WMOKey, WM_OUT_VOID$)
If IsWMOVoided then
Locate WoMatKey in WoLogRecord<WO_LOG_WO_MAT_KEY$> using @VM setting CassPos then
WoLogRecord<WO_LOG_WO_MAT_KEY$> = Delete(WOLogRecord<WO_LOG_WO_MAT_KEY$>, 1, CassPos, 0)
WO_Mat_Services('SetWoMatVoidFlag', WoMatKey, Username)
end else
ErrorMessage = 'Unable to locate WO_MAT key in WO_LOG record.'
end
end
end
end
end else
ErrorMessage = Error_Services('GetMessage')
end
@ -1682,7 +1685,7 @@ Service SignVoidWMO(WMOutKeys, WONo, Username)
ErrorMessage = ''
WOLogRecord = Database_Services('ReadDataRow', 'WO_LOG', WONo, True$, 0, False$)
if Error_Services('NoError') then
If Error_Services('NoError') then
for each WmOutKey in WMOutKeys using @VM
if WmOutKey NE '' then
WONo = Field(WmOutKey, '*', 1)
@ -1697,34 +1700,31 @@ Service SignVoidWMO(WMOutKeys, WONo, Username)
IsOnHold = Hold_Services('CheckForHold', WoMatKey)
If Not(IsOnHold) then
WM_Out_Services('SetVoidFlag', WmOutKey, Username)
If Error_Services('NoError') then
Work_Order_Services('CreateVoidedLotRecord', '', WmOutKey, 'WM_OUT', WoMatKey, Username)
If Error_Services('NoError') then
If Error_Services('NoError') then
Lot_Event_Services('CreateLotEvent', WmOutKey, DateTime(), 'VOID', 'Lot voided by ' : Username, '', Username, True$, 'WM_OUT')
Work_Order_Services('CreateVoidedLotRecord', '', WmOutKey, 'WM_OUT', WoMatKey, Username)
if Error_Services('NoError') then
//Check if WMI is also voided. If it is, remove it from the WO_MAT_KEY field in WO_LOG, and void the WO_MAT record
WMIKey = WmOutKey; //the paired WMO key is the same as the WMIKey
IsWMIVoided = Database_Services('ReadDataColumn', 'WM_IN', WMOKey, WM_IN_VOID$)
If IsWMIVoided then
Locate WoMatKey in WoLogRecord<WO_LOG_WO_MAT_KEY$> using @VM setting CassPos then
WoLogRecord<WO_LOG_WO_MAT_KEY$> = Delete(WOLogRecord<WO_LOG_WO_MAT_KEY$>, 1, CassPos, 0)
WO_Mat_Services('SetWoMatVoidFlag', WoMatKey, Username)
end else
ErrorMessage = 'Unable to locate WO_MAT key in WO_LOG record.'
end
end
end else
ErrorMessage = Error_Services('GetMessage')
LotId = Lot_Services('GetLotIdByLegacyLotIdAndType', WmOutKey, 'WM_OUT')
// Create a LOT_EVENT record if this lot is in the new LOT system.
If LotId NE '' then
Lot_Event_Services('CreateLotEvent', WmOutKey, DateTime(), 'COMMENT', 'Lot voided by ' : Username, '', Username, True$, 'WM_OUT')
If Error_Services('HasError') then ErrorMessage = Error_Services('GetMessage')
end
If ErrorMessage EQ '' then
//Check if WMI is also voided. If it is, remove it from the WO_MAT_KEY field in WO_LOG, and void the WO_MAT record
WMIKey = WmOutKey; //the paired WMO key is the same as the WMIKey
IsWMIVoided = Database_Services('ReadDataColumn', 'WM_IN', WMOKey, WM_IN_VOID$)
If IsWMIVoided then
Locate WoMatKey in WoLogRecord<WO_LOG_WO_MAT_KEY$> using @VM setting CassPos then
WoLogRecord<WO_LOG_WO_MAT_KEY$> = Delete(WOLogRecord<WO_LOG_WO_MAT_KEY$>, 1, CassPos, 0)
WO_Mat_Services('SetWoMatVoidFlag', WoMatKey, Username)
end else
ErrorMessage = 'Unable to locate WO_MAT key in WO_LOG record.'
end
end
end else
ErrorMessage = Error_Services('GetMessage')
end
end else
ErrorMessage = Error_Services('GetMessage')
end
end else
ErrorMessage = Error_Services('GetMessage')
end
@ -1892,20 +1892,22 @@ Service UpdateOpenWorkOrderStatuses()
end else
MonaResource = 'GRP_OPENINSIGHT_MES_OP_FE_DEV_SERVICE_MANAGER'
end
MonaStatus = 'ok'
Server = Environment_Services('GetServer')
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WO_LOG'
LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS')
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' Update Work Order Status Log.csv'
Headers = 'Logging DTM' : @FM : 'Work Order No' : @FM : 'Log'
objStatusLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$,',', Headers, '', False$, False$)
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WO_LOG'
LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS')
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' Update Work Order Status Log.csv'
Headers = 'Logging DTM':@FM:'Server':@FM:'WONo':@FM:'Result'
objVerifyWOMatKeysLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, COMMA$, Headers, '', False$, False$)
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
Server = Environment_Services('GetServer')
LogData = ''
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<2> = Server
LogData<3> = 'Begin ':Service
Logging_Services('AppendLog', objStatusLog, LogData, @RM, @FM)
LogData = ''
LogData<1> = LoggingDtm
LogData<2> = Server
LogData<4> = 'Begin ':Service
Logging_Services('AppendLog', objVerifyWOMatKeysLog, LogData, @RM, @FM)
ErrorMsg = ''
OpenWoLogKeys = ''
@ -1913,46 +1915,49 @@ Service UpdateOpenWorkOrderStatuses()
Extract_Si_Keys('WO_LOG', 'CLOSE_DATE', '', OpenWoLogKeys)
If Not(Get_Status(ErrCode)) then
If OpenWoLogKeys NE '' then
For each OpenWoLogKey in OpenWoLogKeys using @VM
Service_Services('PostProcedure', 'WORK_ORDER_SERVICES', 'UpdateWorkOrderStatus':SD$:OpenWoLogKey)
If Error_Services('NoError') then
OpenWoLogKeys = SRP_Array('SortSimpleList', OpenWoLogKeys, 'AscendingNumbers', @VM)
LastOpenWoUpdated = ''
ServiceKey = UCase(Service)
If RowExists('APP_INFO', ServiceKey) then
LastOpenWoUpdated = Database_Services('ReadDataRow', 'APP_INFO', ServiceKey)
end
If (LastOpenWoUpdated NE '') then
Locate LastOpenWoUpdated in OpenWoLogKeys using @VM setting vPos then
vPos += 1
end else
vPos = 1
end
end else
vPos = 1
end
NextOpenWoLogKey = OpenWoLogKeys<0, vPos>
Database_Services('WriteDataRow', 'APP_INFO', ServiceKey, NextOpenWoLogKey, True$, False$, False$)
If NextOpenWoLogKey NE '' then
Work_Order_Services('UpdateWorkOrderStatus', NextOpenWoLogKey)
If Error_Services('HasError') then
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<2> = Server
LogData<3> = 'Successfully posted UpdateWorkOrderStatus procedure to PROC_QUEUE for WO_LOG ':OpenWOLogKey:'.'
Logging_Services('AppendLog', objStatusLog, LogData, @RM, @FM)
end else
ErrorMsg = 'Error posting UpdateWorkOrderStatus procedure to PROC_QUEUE for WO_LOG ':OpenWOLogKey:'.'
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<2> = Server
LogData<3> = ErrorMsg
Logging_Services('AppendLog', objStatusLog, LogData, @RM, @FM)
end
Next OpenWoLogKey
ErrorMsg = 'Error calling UpdateWorkOrderStatus for WO_LOG ':NextOpenWoLogKey:'. ':Error_Services('GetMessage')
LogData<4> = ErrorMsg
Logging_Services('AppendLog', objVerifyWOMatKeysLog, LogData, @RM, @FM)
MonaStatus = 'critical'
end
end
end else
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<2> = Server
LogData<3> = 'No open work orders to update.'
Logging_Services('AppendLog', objStatusLog, LogData, @RM, @FM)
LogData<4> = 'No open work orders to update.'
Logging_Services('AppendLog', objVerifyWOMatKeysLog, LogData, @RM, @FM)
end
end else
MonaStatus = 'critical'
ErrorMsg = 'Error calling Extract_Si_Keys. Error code: ':ErrCode:'.'
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<2> = Server
LogData<3> = ErrorMsg
Logging_Services('AppendLog', objStatusLog, LogData, @RM, @FM)
LogData<4> = ErrorMsg
Logging_Services('AppendLog', objVerifyWOMatKeysLog, LogData, @RM, @FM)
end
LogData = ''
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<2> = Server
LogData<3> = 'End ':Service
Logging_Services('AppendLog', objStatusLog, LogData, @RM, @FM)
If ErrorMsg EQ '' then
MonaStatus = 'ok'
end else
MonaStatus = 'critical'
end
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<4> = 'End ':Service
Logging_Services('AppendLog', objVerifyWOMatKeysLog, LogData, @RM, @FM)
Mona_Services('PostStatus', MonaResource, StatusName, MonaStatus)
@ -2062,6 +2067,252 @@ Service UpdateWorkOrderStatus(WOLogId)
end service
Service UpdateOpenWorkOrderData()
hSysLists = Database_Services('GetTableHandle', 'SYSLISTS')
Lock hSysLists, ServiceKeyID then
StatusName = Service
IsProd = Environment_Services('IsProd')
If IsProd then
MonaResource = 'GRP_OPENINSIGHT_MES_OP_FE_SERVICE_MANAGER'
end else
MonaResource = 'GRP_OPENINSIGHT_MES_OP_FE_DEV_SERVICE_MANAGER'
end
MonaStatus = 'ok'
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WO_LOG'
LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS')
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' Update Work Order Data Log.csv'
Headers = 'Logging DTM':@FM:'Server':@FM:'WONo':@FM:'Result'
objVerifyWOMatKeysLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, COMMA$, Headers, '', False$, False$)
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
Server = Environment_Services('GetServer')
LogData = ''
LogData<1> = LoggingDtm
LogData<2> = Server
LogData<4> = 'Begin ':Service
Logging_Services('AppendLog', objVerifyWOMatKeysLog, LogData, @RM, @FM)
ErrorMsg = ''
OpenWoLogKeys = ''
ErrCode = ''
Extract_Si_Keys('WO_LOG', 'CLOSE_DATE', '', OpenWoLogKeys)
If Not(Get_Status(ErrCode)) then
If OpenWoLogKeys NE '' then
OpenWoLogKeys = SRP_Array('SortSimpleList', OpenWoLogKeys, 'AscendingNumbers', @VM)
LastOpenWoUpdated = ''
ServiceKey = UCase(Service)
If RowExists('APP_INFO', ServiceKey) then
LastOpenWoUpdated = Database_Services('ReadDataRow', 'APP_INFO', ServiceKey)
end
If (LastOpenWoUpdated NE '') then
Locate LastOpenWoUpdated in OpenWoLogKeys using @VM setting vPos then
vPos += 1
end else
vPos = 1
end
end else
vPos = 1
end
NextOpenWoLogKey = OpenWoLogKeys<0, vPos>
Database_Services('WriteDataRow', 'APP_INFO', ServiceKey, NextOpenWoLogKey, True$, False$, False$)
If NextOpenWoLogKey NE '' then
Work_Order_Services('UpdateWorkOrderData', NextOpenWoLogKey)
If Error_Services('HasError') then
LogData<1> = OConv(Datetime(), 'DT/^S')
ErrorMsg = 'Error calling UpdateWorkOrderData for WO_LOG ':NextOpenWoLogKey:'. ':Error_Services('GetMessage')
LogData<4> = ErrorMsg
Logging_Services('AppendLog', objVerifyWOMatKeysLog, LogData, @RM, @FM)
MonaStatus = 'critical'
end
end
end else
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<4> = 'No open work orders to update.'
Logging_Services('AppendLog', objVerifyWOMatKeysLog, LogData, @RM, @FM)
end
end else
MonaStatus = 'critical'
ErrorMsg = 'Error calling Extract_Si_Keys. Error code: ':ErrCode:'.'
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<4> = ErrorMsg
Logging_Services('AppendLog', objVerifyWOMatKeysLog, LogData, @RM, @FM)
end
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<4> = 'End ':Service
Logging_Services('AppendLog', objVerifyWOMatKeysLog, LogData, @RM, @FM)
Mona_Services('PostStatus', MonaResource, StatusName, MonaStatus)
Unlock hSysLists, ServiceKeyID else Null
end
end service
Service UpdateWorkOrderData(WONo)
hSysLists = Database_Services('GetTableHandle', 'SYSLISTS')
Lock hSysLists, ServiceKeyID:'*':WONo then
StatusName = Service
IsProd = Environment_Services('IsProd')
If IsProd then
MonaResource = 'GRP_OPENINSIGHT_MES_OP_FE_SERVICE_MANAGER'
end else
MonaResource = 'GRP_OPENINSIGHT_MES_OP_FE_DEV_SERVICE_MANAGER'
end
MonaStatus = 'ok'
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WO_MAT'
LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS')
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : '-' : WONo : ' WO_MAT WO_LOG{WO_MAT_KEY} Log.csv'
Headers = 'Logging DTM':@FM:'Server':@FM:'WONo':@FM:'Result'
objVerifyWOMatKeysLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, COMMA$, Headers, '', False$, False$)
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
Server = Environment_Services('GetServer')
LogData = ''
LogData<1> = LoggingDtm
LogData<2> = Server
LogData<3> = WONo
LogData<4> = 'Begin ':Service
Logging_Services('AppendLog', objVerifyWOMatKeysLog, LogData, @RM, @FM)
Done = False$
ErrorMsg = ''
OpenWoLogKeys = ''
ErrCode = ''
EpiPro = (Xlate('WO_LOG', WONo, 'PS_REACTOR_TYPE', 'X') _EQC 'EPP')
OrigWOLogWOMatKeys = Database_Services('ReadDataColumn', 'WO_LOG', WONo, WO_LOG_WO_MAT_KEY$, True$, 0)
If Error_Services('NoError') then
NewWOLogWOMatKeys = ''
For CassNo = 1 to MAX_NUM_CASS$
WOMatKey = WONo:'*':CassNo
If RowExists('WO_MAT', WOMatKey) then
If EpiPro then
WMIKey = Xlate('WO_MAT', WOMatKey, 'WMI_KEY', 'X')
If (WMIKey EQ '') then
If RowExists('WM_IN', WONo:'*1*':CassNo) then
WMIKey = WONo:'*1*':CassNo
WM_In_Services('VerifyWOMatWMIKeyIndex', WMIKey)
end
end
If (WMIKey NE '') then
WM_In_Services('VerifyWoStepWMIKeyIndex', WMIKey)
WM_In_Services('VerifyWOLogWMIKeyIndex', WMIKey)
end
WMOKey = Xlate('WO_MAT', WOMatKey, 'WMO_KEY', 'X')
If (WMOKey EQ '') then
If RowExists('WM_OUT', WONo:'*1*':CassNo) then
WMOKey = WONo:'*1*':CassNo
WM_Out_Services('VerifyWOMatWMOKeyIndex', WMOKey)
end
end
If (WMOKey NE '') then
WM_Out_Services('VerifyWoStepWMOKeyIndex', WMOKey)
WM_Out_Services('VerifyWOLogWMOKeyIndex', WMOKey)
end
end
RDSNo = Xlate('WO_MAT', WOMatKey, 'RDS_NO', 'X')
If (RDSNo NE '') then
If (DCount(RDSNo, @VM) GT 1) then
NewRDSNo = ''
NumRDS = 0
For each RDSKey in RDSNo using @VM setting vPos
If RowExists('RDS', RDSKey) then
NumRDS += 1
NewRDSNo = RDSKey
RDS_Services('VerifyWOLogRDSKeyIndex', RDSNo)
RDS_Services('VerifyWOMatRDSNoIndex', RDSNo)
RDS_Services('VerifyWOStepRDSKeyIndex', RDSNo)
end
Next RDSKey
If (NumRDS EQ 1) then
Transaction_Services('PostWriteFieldTransaction', 'WO_MAT', WOMatKey, WO_MAT_RDS_NO$, NewRDSNo)
end else
MonaStatus = 'critical'
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<4> = 'Multiple RDS records associated with WO_MAT ':WOMatKey:'.'
Logging_Services('AppendLog', objVerifyWOMatKeysLog, LogData, @RM, @FM)
end
end else
RDS_Services('VerifyWOLogRDSKeyIndex', RDSNo)
RDS_Services('VerifyWOMatRDSNoIndex', RDSNo)
RDS_Services('VerifyWOStepRDSKeyIndex', RDSNo)
end
end else
If Not(EpiPro) then
Query = 'SELECT RDS WITH WO EQ ':WONo:' AND WITH CASS_NO EQ ':CassNo
RList(Query, TARGET_ACTIVELIST$, '', '', '')
ErrCode = ''
If Not(Get_Status(ErrCode)) then
ReadNext RDSNo then
RDS_Services('VerifyWOLogRDSKeyIndex', RDSNo)
RDS_Services('VerifyWOMatRDSNoIndex', RDSNo)
RDS_Services('VerifyWOStepRDSKeyIndex', RDSNo)
end else
MonaStatus = 'critical'
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<4> = 'No RDS found for WO_MAT ':WOMatKey:'.'
Logging_Services('AppendLog', objVerifyWOMatKeysLog, LogData, @RM, @FM)
end
end else
MonaStatus = 'critical'
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<4> = 'Error calling RList to find RDSNo associated with WO_MAT ':WOMatKey:'. Error code: ':ErrCode
Logging_Services('AppendLog', objVerifyWOMatKeysLog, LogData, @RM, @FM)
end
end
end
Voided = Xlate('WO_MAT', WOMatKey, 'VOID', 'X')
If Not(Voided) then NewWOLogWOMatKeys<0, -1> = WOMatKey
end else
Done = True$
end
Until Done
Next CassNo
NewWOLogWOMatKeys = SRP_Array('SortRows', NewWOLogWOMatKeys, 'AR2', 'LIST', @VM, '*')
If OrigWOLogWOMatKeys NE NewWOLogWOMatKeys then
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<4> = 'WOMatKeys column out of date. Posting transaction to update WO_MAT_KEY column.'
Logging_Services('AppendLog', objVerifyWOMatKeysLog, LogData, @RM, @FM)
Transaction_Services('PostWriteFieldTransaction', 'WO_LOG', WONo, WO_LOG_WO_MAT_KEY$, NewWOLogWOMatKeys)
If Error_Services('HasError') then ErrorMsg = Error_Services('GetMessage')
end else
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<4> = 'WOMatKeys column accurate. Nothing to update.'
Logging_Services('AppendLog', objVerifyWOMatKeysLog, LogData, @RM, @FM)
end
end else
ErrorMsg = 'Error in ':Service:' service. ':Error_Services('GetMessage')
end
If ErrorMsg NE '' then
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<4> = ErrorMsg
Logging_Services('AppendLog', objVerifyWOMatKeysLog, LogData, @RM, @FM)
MonaStatus = 'critical'
end
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<2> = Server
LogData<4> = 'End ':Service
Logging_Services('AppendLog', objVerifyWOMatKeysLog, LogData, @RM, @FM)
Mona_Services('PostStatus', MonaResource, StatusName, MonaStatus)
Unlock hSysLists, ServiceKeyID:'*':WONo else Null
end
end service
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Internal GoSubs
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -2074,4 +2325,3 @@ ClearCursors:
return

View File

@ -285,16 +285,15 @@ WRITE_RECORD_PRE:
end else
CriticalFieldName = 'Error determining field name'
end
Record<CriticalField> = OrigRecord<CriticalField>
Recipients = ''
SentFrom = 'SYSTEM'
Subject = 'WO_MAT_ACTIONS - Critical Field Erase Attempt'
Subject = 'WO_MAT_ACTIONS - Critical Field Erased'
Message = OConv(Datetime(), 'DT2/^H')
Message<2> = 'Computer: ':@Station
Message<3> = 'User: ':@User4
Message<4> = 'WO_MAT key: ':Name
NoteMessage = 'Readonly field ':CriticalField:' (':CriticalFieldName:') restored.'
NoteMessage = 'Readonly field ':CriticalField:' (':CriticalFieldName:') erased. Value erased ':Quote(OrigRecord<CriticalField>)
Message<5> = NoteMessage
Message<6> = 'Call Stack:':CRLF$:RetStack()
Swap @FM with \0D0A\ in Message
@ -869,7 +868,7 @@ WRITE_RECORD:
// This should catch cases where the entire cassette is "peeled off", NCR'ed, or used for destructive testing.
Service_Services('PostProcedure', 'SCHEDULE_SERVICES', 'MarkCassProcessed':SD$:WONo:SD$:CassNo:SD$:Datetime())
end
return

View File

@ -58,7 +58,7 @@ $Insert PRS_STAGE_EQUATES
$Insert PROD_VER_EQUATES
$Insert QA_MET_EQUATES ;* Used in GetQAMet data structure return variable
Declare function Database_Services, SRP_JSON, Error_Services, obj_Prod_Spec
Declare function Database_Services, SRP_JSON, Error_Services, obj_Prod_Spec, Wo_Mat_Qa_Services
Declare subroutine Database_Services, SRP_JSON, Error_Services
GoToService
@ -419,3 +419,80 @@ Service AllWafersWereTested(WoMatQAKey, StageToInspect)
end service
Service GetQAMetComplete(WOMatKey)
If WOMatKey NE '' then
If Rowexists('WO_MAT_QA', WOMatKey) then
Response = ''
QAMetRec = Database_Services('ReadDataRow', 'WO_MAT_QA', WOMatKey, '', True$, 0, False$)
Stages = QAMetRec<WO_MAT_QA_STAGE$>
Results = QAMetRec<WO_MAT_QA_RESULT$>
StageCount = Count(Stages, @VM)
For I = 1 to StageCount
If Results<1,I> EQ '' then
Response = False$
end
Until Response EQ False$
Next I
If Response = '' then
Response = Wo_Mat_Qa_Services('GetMUWaferQAComplete', WOMatKey)
end
end else
Response = True$
end
end else
Error_Services('Add', 'Missing WOMatKey parameter.')
end
end service
Service GetMUWaferQAComplete(WOMatKey)
If WOMatKey NE '' then
Response = True$
WOMatRec = Database_Services('ReadDataRow', 'WO_MAT', WoMatKey, True$, 0, False$)
If Error_Services('NoError') then
MUBoxes = ''
MUBoxesResults = ''
MUWafers = WOMatRec<WO_MAT_SLOT_MOVED_FROM$>
Counter = 0
If Count(MUWafers, @VM) GT 0 then
for each BoxNumber in MUWafers using @VM setting OrigIndex
if BoxNumber NE '' then
MUCassId = FIELD(BoxNumber,'.',1,2)
Locate MUCassId in MUBoxesResults using @VM setting BoxIndex then
MUThkResult = WOMatRec<WO_MAT_MU_WAFER_THK_RESULT$, OrigIndex>
If MUThkResult NE '' then
MUBoxesResults<BoxIndex, 2> = True$
end
end else
Counter += 1
MUBoxesResults<Counter> = MUCassID
MUThkResult = WOMatRec<WO_MAT_MU_WAFER_THK_RESULT$, OrigIndex>
If MUThkResult NE '' then
MUBoxesResults<Counter, 2> = True$
end
end
end
Next BoxNumber
for each Box in MUBoxesResults using @FM
if Box<1,2> EQ '' then
Response = False$
end
Until Response = False$
Next Box
end
end else
Error_Services('Add', 'Failed to open WO_MAT record.')
end
end else
Error_Services('Add', 'Missing WOMatKey parameter.')
end
end service

View File

@ -1,4 +1,50 @@
Compile function WO_MAT_Services(@Service, @Params)
/***********************************************************************************************************************
Name : WO_MAT_Services
Description : Handler program for all WO_MAT services.
Notes : Application errors should be logged using the Error Services module. There are a few methodological
assumptions built into way errors are managed which are important to understand in order to properly
work with Error Services:
- The term 'top' refers to the originating procedure of a call stack and the term 'bottom' refers to
the last routine (or the current routine) within a call stack. Within the OpenInsight Debugger
this will appear backwards since the originating procedure always appears at the bottom of the
list and the current routine appears at the top of the list. We are using this orientation because
it is common to refer to the process of calling other procedures as 'drilling down'.
- The reason for defining the orientation of the call stack is because Error_Services allows for
multiple error conditions to be appended to an original error. In most cases this will happen when
a procedure at the bottom of the stack generates an error condition and then returns to its
calling procedure. This higher level procedure can optionally add more information relevant to
itself. This continues as the call stack 'bubbles' its way back to the top to where the
originating procedure is waiting.
- Native OpenInsight commands that handle errors (e.g., Set_Status, Set_FSError, Set_EventStatus)
preserve their error state until explicitly cleared. This can hinder the normal execution of code
since subsequent procedures (usually SSPs) will fail if a pre-existing error condition exists.
Our philosophy is that error conditions should automatically be cleared before a new procedure
is executed to avoid this problem. However, the nature of Basic+ does not make this easy to
automate for any given stored procedure. Therefore, if a stored procedure wants to conform to our
philosophy then it should include a call into the 'Clear' service request at the top of the
program. Alternatively this can be done through a common insert (see SERVICE_SETUP for example.)
- Service modules will use the SERVICE_SETUP insert and therefore automatically clear out any
error conditions that were set before.
Parameters :
Service [in] -- Name of the service being requested
Param1-10 [in/out] -- Additional request parameter holders
Response [out] -- Response to be sent back to the Controller (MCP) or requesting procedure
Metadata :
History : (Date, Initials, Notes)
05/14/18 djs Added VerifyWOLogWOMatKeyColumn service.
***********************************************************************************************************************/
#pragma precomp SRP_PreCompiler
$insert LOGICAL
@ -12,6 +58,7 @@ Declare function Database_Services, Error_Services, SRP_Json, SRP_Com, Environ
Declare function Datetime, Rds_Services, GetTickCount, SRP_Array
Declare subroutine Error_Services, SRP_Json, SRP_Com, Wo_Mat_Services, Database_Services, Logging_Services
Declare subroutine obj_wo_mat_log, Set_Status, Rds_Services, Signature_Services, Mona_Services, Btree.Extract
Declare subroutine Transaction_Services
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WO_Mat\InvActionsSyncUp'
LogDate = Oconv(Date(), 'D4/')
@ -562,6 +609,7 @@ Service GetWOMatKeys(WONo)
If RowExists('WO_LOG', WONo) then
Open 'DICT.WO_MAT' to hDict then
Query = 'WO_NO':@VM:WONo:@FM
Query := 'CURR_STATUS':@VM:'#VOID':@FM
WOMatKeys = ''
Flag = ''
ErrCode = ''
@ -584,3 +632,68 @@ Service GetWOMatKeys(WONo)
If ErrorMsg NE '' then Error_Services('Add', ErrorMsg)
end service
Service VerifyWOLogWOMatKeyColumn(WOMatKey)
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WO_MAT'
LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS')
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' WO_MAT WO_LOG{WO_MAT_KEY} Log.csv'
Headers = 'Logging DTM':@FM:'WOMatKey':@FM:'Result'
objVerifyWOMatKeysLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, COMMA$, Headers, '', False$, False$)
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
LogData = ''
LogData<1> = LoggingDtm
LogData<2> = WOMatKey
LogData<3> = 'Begin ':Service
Logging_Services('AppendLog', objVerifyWOMatKeysLog, LogData, @RM, @FM)
ErrorMsg = ''
If WOMatKey NE '' then
If RowExists('WO_MAT', WOMatKey) then
WONo = Field(WOMatKey, '*', 1, 1)
If WONo NE '' then
If RowExists('WO_LOG', WONo) then
WOLogWOMatKeys = Database_Services('ReadDataColumn', 'WO_LOG', WONo, WO_LOG_WO_MAT_KEY$, True$, 0)
If Error_Services('NoError') then
Locate WOMatKey in WOLogWOMatKeys using @VM setting vPos then
LogData<3> = 'WOMatKey found in WO_LOG record. Nothing to update.'
Logging_Services('AppendLog', objVerifyWOMatKeysLog, LogData, @RM, @FM)
end else
LogData<3> = 'WOMatKey not found in WO_LOG record. Posting transaction to update column.'
Logging_Services('AppendLog', objVerifyWOMatKeysLog, LogData, @RM, @FM)
WOLogWOMatKeys<0, -1> = WOMatKey
WOLogWOMatKeys = SRP_Array('SortRows', WOLogWOMatKeys, 'AR2', 'LIST', @VM, '*')
Transaction_Services('PostWriteFieldTransaction', 'WO_LOG', WONo, WO_LOG_WO_MAT_KEY$, WOLogWOMatKeys)
end
end else
ErrorMsg = 'Error in ':Service:' service. ':Error_Services('GetMessage')
end
end else
ErrorMsg = 'Error in ':Service:' service. WO_LOG ':WONo:' does not exist.'
end
end else
ErrorMsg = 'Error in ':Service:' service. WO_NO is null.'
end
end else
ErrorMsg = 'Error in ':Service:' service. WO_MAT ':WOMatKey:' does not exist.'
end
end else
ErrorMsg = 'Error in ':Service:' service. Null WOMatKey passed into service.'
end
LogData<3> = 'End ':Service
Logging_Services('AppendLog', objVerifyWOMatKeysLog, LogData, @RM, @FM)
If ErrorMsg NE '' then
LogData<3> = ErrorMsg
Logging_Services('AppendLog', objVerifyWOMatKeysLog, LogData, @RM, @FM)
end
If ErrorMsg NE '' then Error_Services('Add', ErrorMsg)
end service

View File

@ -19,5 +19,7 @@ compile insert LOT_EVENT_EQUATES
equ LOT_EVENT_EVENT_OPERATION_ID$ to 10
equ LOT_EVENT_EVENT_OPERATOR_ID$ to 11
equ LOT_EVENT_SEQUENCE$ to 12
equ LOT_EVENT_CHRON_ID$ to 13
#endif

View File

@ -1,20 +1,20 @@
compile insert SUPPLEMENTS_EQUATES
/*----------------------------------------
Author : Table Create Insert Routine
Written : 20/03/2024
Description : Insert for Table SUPPLEMENTS
----------------------------------------*/
Equ SUPPLEMENTS_SUPPL_ID$ To 0
Equ SUPPLEMENTS_LOT_TYPE$ To 1
Equ SUPPLEMENTS_LOT_ID$ To 2
Equ SUPPLEMENTS_STAGE$ To 3
Equ SUPPLEMENTS_SUPPL_TEXT$ To 4
Equ SUPPLEMENTS_SUPPL_ACK$ To 5
Equ SUPPLEMENTS_ACK_USER$ To 6
Equ SUPPLEMENTS_ACK_DTM$ To 7
Equ SUPPLEMENTS_ENTRY_USER$ To 8
Equ SUPPLEMENTS_ENTRY_DATETIME$ To 9
compile insert SUPPLEMENTS_EQUATES
/*----------------------------------------
Author : Table Create Insert Routine
Written : 20/03/2024
Description : Insert for Table SUPPLEMENTS
----------------------------------------*/
Equ SUPPLEMENTS_SUPPL_ID$ To 0
Equ SUPPLEMENTS_LOT_TYPE$ To 1
Equ SUPPLEMENTS_LOT_ID$ To 2
Equ SUPPLEMENTS_STAGE$ To 3
Equ SUPPLEMENTS_SUPPL_TEXT$ To 4
Equ SUPPLEMENTS_SUPPL_ACK$ To 5
Equ SUPPLEMENTS_ACK_USER$ To 6
Equ SUPPLEMENTS_ACK_DTM$ To 7
Equ SUPPLEMENTS_ENTRY_USER$ To 8
Equ SUPPLEMENTS_ENTRY_DATETIME$ To 9
Equ SUPPLEMENTS_STAGE_INDEX$ To 10