Compare commits
32 Commits
3e0991f681
...
master
Author | SHA1 | Date | |
---|---|---|---|
52b3b20b4e | |||
3d786a7916 | |||
1b94adb0d1 | |||
315abcde86 | |||
05e0fb3eda | |||
cbb52c469b | |||
712cec903a | |||
6e829bd06a | |||
8604a83966 | |||
52504272f9 | |||
b485de10ef | |||
261e13ceac | |||
ad6ed9c002 | |||
beaac0d38a | |||
a2f61d11c9 | |||
acd7949e85 | |||
128bf2ef8d | |||
705237545f | |||
baa9af3e1a | |||
2fa474880d | |||
399f568b15 | |||
99d6abc3f2 | |||
a2c467e9cb | |||
af279541ae | |||
2036ed3289 | |||
edd09af821 | |||
febe660fcf | |||
245f832445 | |||
f07e4476a7 | |||
12f354dcaa | |||
d2f98a342d | |||
b83a3fb57b |
@ -46,52 +46,53 @@
|
||||
"<1,37>": "6MACTRONIX #3",
|
||||
"<1,38>": "6MACTRONIX #4",
|
||||
"<1,39>": "8INLESS",
|
||||
"<1,40>": "8INLESS2",
|
||||
"<1,41>": "BAGGER1",
|
||||
"<1,42>": "BAGGER2",
|
||||
"<1,43>": "BAGGER3",
|
||||
"<1,44>": "BAGGER4",
|
||||
"<1,45>": "6INFF01",
|
||||
"<1,46>": "6INFF02",
|
||||
"<1,47>": "6INFF03",
|
||||
"<1,48>": "6INFF04",
|
||||
"<1,49>": "6INFF05",
|
||||
"<1,50>": "6INFF06",
|
||||
"<1,51>": "6INFF07",
|
||||
"<1,52>": "6INFF08",
|
||||
"<1,53>": "6INFF09",
|
||||
"<1,54>": "6INFF10",
|
||||
"<1,55>": "8INNF01",
|
||||
"<1,56>": "8INNF02",
|
||||
"<1,57>": "8INNF03",
|
||||
"<1,58>": "8INNF04",
|
||||
"<1,59>": "8INNF05",
|
||||
"<1,60>": "8INFF01",
|
||||
"<1,61>": "8INFF02",
|
||||
"<1,62>": "8INFF03",
|
||||
"<1,63>": "8INFF04",
|
||||
"<1,64>": "MACTRONIX #1",
|
||||
"<1,65>": "MACTRONIX #2 ",
|
||||
"<1,66>": "MACTRONIX #3",
|
||||
"<1,67>": "MACTRONIX #4",
|
||||
"<1,68>": "MACTRONIX #5",
|
||||
"<1,69>": "MACTRONIX #6",
|
||||
"<1,70>": "MACTRONIX #7",
|
||||
"<1,71>": "TALL_PITCH1",
|
||||
"<1,72>": "TALL_PITCH2",
|
||||
"<1,73>": "TALL_PITCH3",
|
||||
"<1,74>": "TALL_PITCH4",
|
||||
"<1,75>": "WC6INCH1",
|
||||
"<1,76>": "WC6INCH2",
|
||||
"<1,77>": "WC6INCH3",
|
||||
"<1,78>": "WC6INCH4",
|
||||
"<1,79>": "WC8INCH1",
|
||||
"<1,80>": "WC8INCH2",
|
||||
"<1,81>": "WC8INCH3",
|
||||
"<1,82>": "ELLP01",
|
||||
"<1,83>": "LEAKCHK01",
|
||||
"<1,84>": "LEAKCHK02",
|
||||
"<1,85>": "TBI #1"
|
||||
"<1,40>": "BAGGER1",
|
||||
"<1,41>": "BAGGER2",
|
||||
"<1,42>": "BAGGER3",
|
||||
"<1,43>": "BAGGER4",
|
||||
"<1,44>": "PACK1",
|
||||
"<1,45>": "PACK2",
|
||||
"<1,46>": "6INFF01",
|
||||
"<1,47>": "6INFF02",
|
||||
"<1,48>": "6INFF03",
|
||||
"<1,49>": "6INFF04",
|
||||
"<1,50>": "6INFF05",
|
||||
"<1,51>": "6INFF06",
|
||||
"<1,52>": "6INFF07",
|
||||
"<1,53>": "6INFF08",
|
||||
"<1,54>": "6INFF09",
|
||||
"<1,55>": "6INFF10",
|
||||
"<1,56>": "8INNF01",
|
||||
"<1,57>": "8INNF02",
|
||||
"<1,58>": "8INNF03",
|
||||
"<1,59>": "8INNF04",
|
||||
"<1,60>": "8INNF05",
|
||||
"<1,61>": "8INFF01",
|
||||
"<1,62>": "8INFF02",
|
||||
"<1,63>": "8INFF03",
|
||||
"<1,64>": "8INFF04",
|
||||
"<1,65>": "MACTRONIX #1",
|
||||
"<1,66>": "MACTRONIX #2 ",
|
||||
"<1,67>": "MACTRONIX #3",
|
||||
"<1,68>": "MACTRONIX #4",
|
||||
"<1,69>": "MACTRONIX #5",
|
||||
"<1,70>": "MACTRONIX #6",
|
||||
"<1,71>": "MACTRONIX #7",
|
||||
"<1,72>": "TALL_PITCH1",
|
||||
"<1,73>": "TALL_PITCH2",
|
||||
"<1,74>": "TALL_PITCH3",
|
||||
"<1,75>": "TALL_PITCH4",
|
||||
"<1,76>": "WC6INCH1",
|
||||
"<1,77>": "WC6INCH2",
|
||||
"<1,78>": "WC6INCH3",
|
||||
"<1,79>": "WC6INCH4",
|
||||
"<1,80>": "WC8INCH1",
|
||||
"<1,81>": "WC8INCH2",
|
||||
"<1,82>": "WC8INCH3",
|
||||
"<1,83>": "ELLP01",
|
||||
"<1,84>": "LEAKCHK01",
|
||||
"<1,85>": "LEAKCHK02",
|
||||
"<1,86>": "TBI #1"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -17,15 +17,15 @@
|
||||
"<1,4>": "",
|
||||
"<1,5>": "0",
|
||||
"<1,6>": "0",
|
||||
"<1,7>": "-2083",
|
||||
"<1,8>": "-1097",
|
||||
"<1,7>": "-1184",
|
||||
"<1,8>": "-761",
|
||||
"<1,9>": "OI Wizard",
|
||||
"<1,10>": {
|
||||
"<1,10,1>": "0x84CF0000",
|
||||
"<1,10,2>": "0x100"
|
||||
},
|
||||
"<1,11>": {
|
||||
"<1,11,1>": "0x8000",
|
||||
"<1,11,1>": "0xC000",
|
||||
"<1,11,2>": "0x80000000"
|
||||
},
|
||||
"<1,12>": "",
|
||||
@ -165,7 +165,7 @@
|
||||
"<1,62,1>": "0",
|
||||
"<1,62,2>": "",
|
||||
"<1,62,3>": "",
|
||||
"<1,62,4>": "0",
|
||||
"<1,62,4>": "1",
|
||||
"<1,62,5>": "0",
|
||||
"<1,62,6>": "0",
|
||||
"<1,62,7>": "",
|
||||
@ -227,10 +227,10 @@
|
||||
"<1,2>": "",
|
||||
"<1,3>": "WEBVIEW",
|
||||
"<1,4>": "WEB_OI_WIZARD",
|
||||
"<1,5>": "12",
|
||||
"<1,6>": "12",
|
||||
"<1,7>": "2060",
|
||||
"<1,8>": "1076",
|
||||
"<1,5>": "9",
|
||||
"<1,6>": "8",
|
||||
"<1,7>": "1167",
|
||||
"<1,8>": "745",
|
||||
"<1,9>": "",
|
||||
"<1,10>": {
|
||||
"<1,10,1>": "0x56000000",
|
||||
|
@ -43,6 +43,10 @@
|
||||
"<8,3>": {
|
||||
"<8,3,1>": "Update RDS Layer Parameters",
|
||||
"<8,3,2>": "UPDATE_RDS_LAYER"
|
||||
},
|
||||
"<8,4>": {
|
||||
"<8,4,1>": "Update RDS Test Specs",
|
||||
"<8,4,2>": "UPDATE_RDS_TEST"
|
||||
}
|
||||
},
|
||||
"<9>": {
|
||||
|
@ -41,16 +41,8 @@
|
||||
"<8,2,2>": "High Thruput"
|
||||
},
|
||||
"<8,3>": {
|
||||
"<8,3,1>": "K2K",
|
||||
"<8,3,2>": "Kit 2000"
|
||||
},
|
||||
"<8,4>": {
|
||||
"<8,4,1>": "EPP",
|
||||
"<8,4,2>": " EpiPro"
|
||||
},
|
||||
"<8,5>": {
|
||||
"<8,5,1>": "STD",
|
||||
"<8,5,2>": "Standard"
|
||||
"<8,3,1>": "EPP",
|
||||
"<8,3,2>": " EpiPro"
|
||||
}
|
||||
},
|
||||
"<9>": {
|
||||
|
@ -9,7 +9,7 @@
|
||||
"<2>": "-2",
|
||||
"<3>": "-1",
|
||||
"<4>": "-1",
|
||||
"<5>": "16777215",
|
||||
"<5>": "-2",
|
||||
"<6>": {
|
||||
"<6,1>": {
|
||||
"<6,1,1>": "Tahoma",
|
||||
@ -43,7 +43,8 @@
|
||||
"<8,9>": "G5+",
|
||||
"<8,10>": "Char",
|
||||
"<8,11>": "Leakcheck",
|
||||
"<8,12>": "Scrubber"
|
||||
"<8,12>": "Scrubber",
|
||||
"<8,13>": "Packer"
|
||||
},
|
||||
"<9>": {
|
||||
"<9,1>": {
|
||||
@ -80,7 +81,17 @@
|
||||
"<32>": "0",
|
||||
"<33>": "1",
|
||||
"<34>": "16777215",
|
||||
"<35>": "16777215"
|
||||
"<35>": "16777215",
|
||||
"<36>": "",
|
||||
"<37>": "",
|
||||
"<38>": "",
|
||||
"<39>": "",
|
||||
"<40>": "-2",
|
||||
"<41>": "1000",
|
||||
"<42>": "",
|
||||
"<43>": "",
|
||||
"<44>": "",
|
||||
"<45>": ""
|
||||
}
|
||||
}
|
||||
}
|
240
LSL2/STPROC/ARCHIVE_ACTIONS.txt
Normal file
240
LSL2/STPROC/ARCHIVE_ACTIONS.txt
Normal file
@ -0,0 +1,240 @@
|
||||
Function ARCHIVE_Actions(Action, CalcColName, FSList, Handle, Name, FMC, Record, Status, OrigRecord, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from Infineon.
|
||||
|
||||
Name : RDS_Actions
|
||||
|
||||
Description : Handles calculated columns and MFS calls for the current table.
|
||||
|
||||
Notes : This function uses @ID, @RECORD, and @DICT to make sure {ColumnName} references work correctly.
|
||||
If called from outside of a calculated column these will need to be set and restored.
|
||||
|
||||
Parameters :
|
||||
Action [in] -- Name of the action to be taken
|
||||
CalcColName [in] -- Name of the calculated column that needs to be processed. Normally this should only be
|
||||
populated when the CalcField action is being used.
|
||||
FSList [in] -- The list of MFSs and the BFS name for the current file or volume. This is an @SVM
|
||||
delimited array, with the current MFS name as the first value in the array, and the BFS
|
||||
name as the last value. Normally set by a calling MFS.
|
||||
Handle [in] -- The file handle of the file or media map being accessed. Note, this does contain the
|
||||
entire handle structure that the Basic+ Open statement would provide. Normally set by a
|
||||
calling MFS.
|
||||
Name [in] -- The name (key) of the record or file being accessed. Normally set by a calling MFS.
|
||||
FMC [in] -- Various functions. Normally set by a calling MFS.
|
||||
Record [in] -- The entire record (for record-oriented functions) or a newly-created handle (for
|
||||
"get handle" functions). Normally set by a calling MFS.
|
||||
Status [in/out] -- Indicator of the success or failure of an action. Normally set by the calling MFS but
|
||||
for some actions can be set by the action handler to indicate failure.
|
||||
OrigRecord [in] -- Original content of the record being processed by the current action. This is
|
||||
automatically being assigned by the WRITE_RECORD and DELETE_RECORD actions within
|
||||
BASE_MFS.
|
||||
Param1-10 [in/out] -- Additional request parameter holders
|
||||
ActionFlow [out] -- Used to control the action chain (see the ACTION_SETUP insert for more information.)
|
||||
Can also be used to return a special value, such as the results of the CalcField
|
||||
method.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
04/10/18 dmb Original programmer.
|
||||
10/04/18 djs Added a trigger within the WRITE_RECORD event, which fires when the reactor number has
|
||||
changed. When this occurs the related RDS_LAYER records for this RDS record are populated
|
||||
with the most recent associated TOOL_PARMS record. (related by PSN and Reactor)
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$Insert FILE.SYSTEM.EQUATES
|
||||
$Insert ACTION_SETUP
|
||||
$Insert RLIST_EQUATES
|
||||
$Insert APP_INSERTS
|
||||
$Insert IFX_EQUATES
|
||||
$Insert ARCHIVE_EQUATES
|
||||
|
||||
Equ COMMA$ to ','
|
||||
|
||||
Declare function Error_Services, Database_Services, obj_RDS_Test, Logging_Services, Environment_Services
|
||||
Declare function Tool_Parms_Services, Signature_Services, obj_WO_Mat_QA, Datetime, Override_Services
|
||||
Declare function Rds_Services, SRP_DateTime, SRP_Math, obj_WO_Mat, Lot_Services, SRP_Array
|
||||
Declare function Lot_Event_Services, GetTickCount, Work_Order_Services, Archive_Services
|
||||
Declare subroutine Error_Services, Database_Services, Logging_Services, Service_Services, obj_WO_React
|
||||
Declare Subroutine Mona_Services
|
||||
|
||||
If KeyID then GoSub Initialize_System_Variables
|
||||
|
||||
Begin Case
|
||||
|
||||
Case Action _EQC 'CalculateColumn' ; GoSub CalculateColumn
|
||||
Case Action _EQC 'READ_RECORD_PRE' ; GoSub READ_RECORD_PRE
|
||||
Case Action _EQC 'READ_RECORD' ; GoSub READ_RECORD
|
||||
Case Action _EQC 'READONLY_RECORD_PRE' ; GoSub READONLY_RECORD_PRE
|
||||
Case Action _EQC 'READONLY_RECORD' ; GoSub READONLY_RECORD
|
||||
Case Action _EQC 'WRITE_RECORD_PRE' ; GoSub WRITE_RECORD_PRE
|
||||
Case Action _EQC 'WRITE_RECORD' ; GoSub WRITE_RECORD
|
||||
Case Action _EQC 'DELETE_RECORD_PRE' ; GoSub DELETE_RECORD_PRE
|
||||
Case Action _EQC 'DELETE_RECORD' ; GoSub DELETE_RECORD
|
||||
Case Otherwise$ ; Status = 'Invalid Action'
|
||||
|
||||
End Case
|
||||
|
||||
If KeyID then GoSub Restore_System_Variables
|
||||
|
||||
If Assigned(ActionFlow) else ActionFlow = ACTION_CONTINUE$
|
||||
|
||||
Return ActionFlow
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Calculated Columns
|
||||
//
|
||||
// The typical structure of a calculated column will look like this:
|
||||
//
|
||||
// Declare function Database_Services
|
||||
//
|
||||
// @ANS = Database_Services('CalculateColumn')
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
CalculateColumn:
|
||||
|
||||
// Make sure the ActionFlow return variable is cleared in case nothing is calculated.
|
||||
ActionFlow = ''
|
||||
|
||||
return
|
||||
|
||||
// ----- MFS calls -----------------------------------------------------------------------------------------------------
|
||||
|
||||
READ_RECORD_PRE:
|
||||
// In order to stop a record from being read in this action these lines of code must be used:
|
||||
//
|
||||
// OrigFileError = 100 : @FM : KeyID
|
||||
// Status = 0
|
||||
// Record = ''
|
||||
// ActionFlow = ACTION_STOP$
|
||||
|
||||
* This code prevents an anomaly where an @SVM appears when the value is read
|
||||
* and causes an error when copying the record to SQL.
|
||||
|
||||
return
|
||||
|
||||
READ_RECORD:
|
||||
|
||||
// In order to stop a record from being read in this action these lines of code must be used:
|
||||
//
|
||||
// OrigFileError = 100 : @FM : KeyID
|
||||
// Status = 0
|
||||
// Record = ''
|
||||
|
||||
return
|
||||
|
||||
|
||||
READONLY_RECORD_PRE:
|
||||
// In order to stop a record from being read in this action these lines of code must be used:
|
||||
//
|
||||
// OrigFileError = 100 : @FM : KeyID
|
||||
// Status = 0
|
||||
// Record = ''
|
||||
// ActionFlow = ACTION_STOP$
|
||||
return
|
||||
|
||||
|
||||
READONLY_RECORD:
|
||||
// In order to stop a record from being read in this action these lines of code must be used:
|
||||
//
|
||||
// OrigFileError = 100 : @FM : KeyID
|
||||
// Status = 0
|
||||
// Record = ''
|
||||
|
||||
return
|
||||
|
||||
WRITE_RECORD_PRE:
|
||||
|
||||
|
||||
return
|
||||
|
||||
|
||||
WRITE_RECORD:
|
||||
|
||||
return
|
||||
|
||||
|
||||
DELETE_RECORD_PRE:
|
||||
|
||||
ActionFlow = ACTION_STOP$
|
||||
|
||||
return
|
||||
|
||||
|
||||
DELETE_RECORD:
|
||||
|
||||
ActionFlow = ACTION_STOP$
|
||||
|
||||
return
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Internal GoSubs
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClearCursors:
|
||||
For counter = 0 to 8
|
||||
ClearSelect counter
|
||||
Next counter
|
||||
return
|
||||
|
||||
|
||||
Initialize_System_Variables:
|
||||
|
||||
// Save these for restoration later
|
||||
SaveDict = @DICT
|
||||
SaveID = @ID
|
||||
SaveRecord = @RECORD
|
||||
OrigFileError = @FILE.ERROR
|
||||
|
||||
// Now make sure @DICT, ID, and @RECORD are populated
|
||||
CurrentDictName = ''
|
||||
If @DICT then
|
||||
DictHandle = @DICT<1, 2>
|
||||
Locate DictHandle in @TABLES(5) Using @FM Setting fPos then
|
||||
CurrentDictName = Field(@TABLES(0), @FM, fPos, 1)
|
||||
end
|
||||
end
|
||||
|
||||
If CurrentDictName NE DictName then
|
||||
Open DictName to @DICT else Status = 'Unable to initialize @DICT'
|
||||
end
|
||||
|
||||
@ID = KeyID
|
||||
If Record else
|
||||
// Record might not have been passed in. Read the record from the database table just to make sure.
|
||||
@FILE.ERROR = ''
|
||||
Open TableName to hTable then
|
||||
FullFSList = hTable[1, 'F' : @VM]
|
||||
BFS = FullFSList[-1, 'B' : @SVM]
|
||||
LastHandle = hTable[-1, 'B' : \0D\]
|
||||
FileHandle = \0D\ : LastHandle[1, @VM]
|
||||
|
||||
Call @BFS(READO.RECORD, BFS, FileHandle, KeyID, FMC, Record, ReadOStatus)
|
||||
end
|
||||
end
|
||||
@RECORD = Record
|
||||
|
||||
return
|
||||
|
||||
|
||||
Restore_System_Variables:
|
||||
|
||||
Transfer SaveDict to @DICT
|
||||
Transfer SaveID to @ID
|
||||
Transfer SaveRecord to @RECORD
|
||||
@FILE.ERROR = OrigFileError
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
238
LSL2/STPROC/ARCHIVE_API.txt
Normal file
238
LSL2/STPROC/ARCHIVE_API.txt
Normal file
@ -0,0 +1,238 @@
|
||||
Function Archive_API(@API)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : Archive_API
|
||||
|
||||
Description : API logic for the Archive resource.
|
||||
|
||||
Notes : All web APIs should include the API_SETUP insert. This will provide several useful variables:
|
||||
|
||||
HTTPMethod - The HTTP Method (Verb) submitted by the client (e.g., GET, POST, etc.)
|
||||
APIURL - The URL for the API entry point (e.g., api.mysite.com/v1).
|
||||
FullEndpointURL - The URL submitted by the client, including query params.
|
||||
FullEndpointURLNoQuery - The URL submitted by the client, excluding query params.
|
||||
EndpointSegment - The URL endpoint segment.
|
||||
ParentURL - The URL path preceeding the current endpoint.
|
||||
CurrentAPI - The name of this stored procedure.
|
||||
|
||||
Parameters :
|
||||
API [in] -- Web API to process. Format is [APIPattern].[HTTPMethod]:
|
||||
- APIPattern must follow this structure Archive[.ID.[<Property>]]
|
||||
- HTTPMethod can be any valid HTTP method, e.g., GET, POST, PUT, DELETE, etc.
|
||||
Examples:
|
||||
- Archive.POST
|
||||
- Archive.ID.PUT
|
||||
- Archive.ID.firstName.GET
|
||||
Response [out] -- Response to be sent back to the Controller (HTTP_MCP) or requesting procedure. Web API
|
||||
services do not rely upon anything being returned in the response. This is what the
|
||||
various services like SetResponseBody and SetResponseStatus services are for. A response
|
||||
value is only helpful if the developers want to use it for debug purposes.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
10/10/25 xxx Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert API_SETUP
|
||||
$insert HTTP_INSERTS
|
||||
$insert SRPJSONX
|
||||
|
||||
Declare Function OI_WIZARD_SERVICES, ARCHIVE_SERVICES, Date_Services
|
||||
|
||||
GoToAPI else
|
||||
// The specific resource endpoint doesn't have a API handler yet.
|
||||
HTTP_Services('SetResponseStatus', 204, 'This is a valid endpoint but a web API handler has not yet been created.')
|
||||
end
|
||||
|
||||
Return Response OR ''
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Endpoint Handlers
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
API archive.HEAD
|
||||
API archive.GET
|
||||
|
||||
OIWizardID = ''
|
||||
Cookies = HTTP_Services('GetHTTPCookie')
|
||||
For each Cookie in Cookies using ';'
|
||||
Key = Field(Cookie, '=', 1)
|
||||
If Key EQ 'sessionID' then
|
||||
OIWizardID = Field(Cookie, '=', 2)
|
||||
end
|
||||
Next Cookie
|
||||
|
||||
ValidSession = OI_Wizard_Services('ValidateSession', OIWizardID)
|
||||
|
||||
If ValidSession then
|
||||
ArchiveIds = Archive_Services('GetAllArchiveIDs')
|
||||
ArchiveListJson = ''
|
||||
GoSub GenerateArchiveListJson
|
||||
HTTP_Services('SetResponseHeaderField', 'Content-Location', FullEndpointURL)
|
||||
HTTP_Services('SetResponseBody', ArchiveListJson, False$, 'application/hal+json')
|
||||
If Assigned(Message) then
|
||||
HTTP_Services('SetResponseStatus', 201, Message)
|
||||
end else
|
||||
HTTP_Services('SetResponseStatus', 201)
|
||||
end
|
||||
end else
|
||||
HTTP_Services('SetResponseStatus', 401, 'Invalid session. Reauthentication required.')
|
||||
end
|
||||
|
||||
end api
|
||||
|
||||
|
||||
API archive.getarchive.HEAD
|
||||
API archive.getarchive.GET
|
||||
|
||||
OIWizardID = ''
|
||||
Cookies = HTTP_Services('GetHTTPCookie')
|
||||
For each Cookie in Cookies using ';'
|
||||
Key = Field(Cookie, '=', 1)
|
||||
If Key EQ 'sessionID' then
|
||||
OIWizardID = Field(Cookie, '=', 2)
|
||||
end
|
||||
Next Cookie
|
||||
|
||||
ValidSession = OI_Wizard_Services('ValidateSession', OIWizardID)
|
||||
|
||||
If ValidSession then
|
||||
ArchiveId = Http_Services('GetQueryField', 'ArchiveId')
|
||||
ArchiveJson = Archive_Services('ConvertArchiveRecordToJson', ArchiveId)
|
||||
HTTP_Services('SetResponseHeaderField', 'Content-Location', FullEndpointURL)
|
||||
HTTP_Services('SetResponseBody', ArchiveJson, False$, 'application/hal+json')
|
||||
If Assigned(Message) then
|
||||
HTTP_Services('SetResponseStatus', 201, Message)
|
||||
end else
|
||||
HTTP_Services('SetResponseStatus', 201)
|
||||
end
|
||||
end else
|
||||
HTTP_Services('SetResponseStatus', 401, 'Invalid session. Reauthentication required.')
|
||||
end
|
||||
|
||||
|
||||
end api
|
||||
|
||||
|
||||
API archive.findarchivebyrecord.HEAD
|
||||
API archive.findarchivebyrecord.GET
|
||||
|
||||
OIWizardID = ''
|
||||
Cookies = HTTP_Services('GetHTTPCookie')
|
||||
For each Cookie in Cookies using ';'
|
||||
Key = Field(Cookie, '=', 1)
|
||||
If Key EQ 'sessionID' then
|
||||
OIWizardID = Field(Cookie, '=', 2)
|
||||
end
|
||||
Next Cookie
|
||||
|
||||
ValidSession = OI_Wizard_Services('ValidateSession', OIWizardID)
|
||||
|
||||
If ValidSession then
|
||||
|
||||
Table = Http_Services('GetQueryField', 'Table')
|
||||
RecordId = Http_Services('GetQueryField', 'RecordId')
|
||||
ArchiveIds = Archive_Services('GetArchiveIDsByRecord', RecordId, Table)
|
||||
|
||||
SRP_JsonX_Begin('JSON', '{')
|
||||
SRP_JsonX('ArchiveRecords','[')
|
||||
for each ArchiveId in ArchiveIds using @FM
|
||||
ThisArchiveJson = Archive_Services('ConvertArchiveRecordToJson', ArchiveId)
|
||||
SRP_JsonX(ThisArchiveJson)
|
||||
Next ArchiveId
|
||||
SRP_JsonX(']')
|
||||
ArchiveJson = SRP_JsonX_End('Pretty')
|
||||
HTTP_Services('SetResponseHeaderField', 'Content-Location', FullEndpointURL)
|
||||
HTTP_Services('SetResponseBody', ArchiveJson, False$, 'application/hal+json')
|
||||
If Assigned(Message) then
|
||||
HTTP_Services('SetResponseStatus', 201, Message)
|
||||
end else
|
||||
HTTP_Services('SetResponseStatus', 201)
|
||||
end
|
||||
end else
|
||||
HTTP_Services('SetResponseStatus', 401, 'Invalid session. Reauthentication required.')
|
||||
end
|
||||
|
||||
end api
|
||||
|
||||
|
||||
API archive.findarchivebymetadata.HEAD
|
||||
API archive.findarchivebymetadata.GET
|
||||
|
||||
OIWizardID = ''
|
||||
Cookies = HTTP_Services('GetHTTPCookie')
|
||||
For each Cookie in Cookies using ';'
|
||||
Key = Field(Cookie, '=', 1)
|
||||
If Key EQ 'sessionID' then
|
||||
OIWizardID = Field(Cookie, '=', 2)
|
||||
end
|
||||
Next Cookie
|
||||
|
||||
ValidSession = OI_Wizard_Services('ValidateSession', OIWizardID)
|
||||
|
||||
If ValidSession then
|
||||
MetaDataType = Http_Services('GetQueryField', 'MetaDataType')
|
||||
SearchValues = Http_Services('GetQueryField', 'SearchValue')
|
||||
ArchiveIds = Archive_Services('GetArchiveIDsByMetaData', MetaDataType, SearchValues)
|
||||
|
||||
SRP_JsonX_Begin('JSON', '{')
|
||||
SRP_JsonX('ArchiveRecords','[')
|
||||
for each ArchiveId in ArchiveIds using @FM
|
||||
ThisArchiveJson = Archive_Services('ConvertArchiveRecordToJson', ArchiveId)
|
||||
SRP_JsonX(ThisArchiveJson)
|
||||
Next ArchiveId
|
||||
SRP_JsonX(']')
|
||||
ArchiveJson = SRP_JsonX_End('Pretty')
|
||||
HTTP_Services('SetResponseHeaderField', 'Content-Location', FullEndpointURL)
|
||||
HTTP_Services('SetResponseBody', ArchiveJson, False$, 'application/hal+json')
|
||||
If Assigned(Message) then
|
||||
HTTP_Services('SetResponseStatus', 201, Message)
|
||||
end else
|
||||
HTTP_Services('SetResponseStatus', 201)
|
||||
end
|
||||
end else
|
||||
HTTP_Services('SetResponseStatus', 401, 'Invalid session. Reauthentication required.')
|
||||
end
|
||||
|
||||
end api
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Internal GoSubs
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
GenerateArchiveListJson:
|
||||
|
||||
If Assigned(ArchiveListJson) AND Assigned(ArchiveIds) then
|
||||
SRP_JsonX_Begin('JSON', '{')
|
||||
SRP_JsonX('Archives', '[')
|
||||
for each ArchiveId in ArchiveIds using @FM
|
||||
ArchiveType = Field(ArchiveId, '*', 1)
|
||||
ArchiveParent = Field(ArchiveId, '*', 2)
|
||||
CreationDtm = Date_Services('ConvertDateTimeToISO8601', XLATE('ARCHIVE', ArchiveId, ARCHIVE_ARCHIVE_CREATION_DTM$, 'X'))
|
||||
RecordCount = DCOUNT(XLATE('ARCHIVE', ArchiveId, ARCHIVE_CHILD_RECORD$, 'X'), @VM)
|
||||
SRP_JsonX('{')
|
||||
SRP_JsonX('ArchiveId', ArchiveId, 'String')
|
||||
SRP_JsonX('ArchiveType', ArchiveType, 'String')
|
||||
SRP_JsonX('ArchiveParent', ArchiveParent, 'String')
|
||||
SRP_JsonX('CreationDtm', CreationDtm, 'String')
|
||||
SRP_JsonX('RecordCount', RecordCount)
|
||||
SRP_JsonX('}')
|
||||
Next ArchiveId
|
||||
SRP_JsonX(']')
|
||||
ArchiveListJson = SRP_JsonX_End('Pretty')
|
||||
end
|
||||
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -211,7 +211,7 @@ Service SendReminders()
|
||||
CalDueRecipients = Xlate('NOTIFICATION', 'CALIB_DUE_NOTIFY', NOTIFICATION_USER_ID$, 'X')
|
||||
|
||||
CheckDt = OConv(Date() + 15, 'D4/')
|
||||
SelectSent = 'SELECT CALIB_LIST WITH NEXT_CAL_DT < ':QUOTE(CheckDt):' BY NEXT_CAL_DT'
|
||||
SelectSent = 'SELECT CALIB_LIST WITH NEXT_CAL_DT < ':QUOTE(CheckDt):' AND WITH EQ_LOC NE "Out of Service" BY NEXT_CAL_DT'
|
||||
RList(SelectSent,TARGET_ACTIVELIST$,'','','')
|
||||
|
||||
NoteText = ''
|
||||
|
@ -695,9 +695,15 @@ PerformQuery:
|
||||
end
|
||||
end
|
||||
|
||||
If ErrorMsg EQ '' then
|
||||
WOKeys = SRP_Array('SortSimpleList', WOKeys, 'DescendingNumbers', @VM)
|
||||
End_Dialog(@WINDOW,WOKeys)
|
||||
If ErrorMsg EQ '' then
|
||||
If WOKeys NE '' then
|
||||
WOKeys = SRP_Array('SortSimpleList', WOKeys, 'DescendingNumbers', @VM)
|
||||
End_Dialog(@WINDOW,WOKeys)
|
||||
end else
|
||||
Def = ''
|
||||
Def<MICON$> = '*'
|
||||
Msg(@Window, Def, 'OK', '', 'Query Results':@FM:'No work orders found')
|
||||
end
|
||||
end else
|
||||
Msg(@Window, '', 'OK', '', 'Process Error':@FM:ErrorMsg)
|
||||
end
|
||||
|
@ -973,6 +973,7 @@ end service
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service WriteDataColumn(TableName, KeyID, ColumnNo, Value, IgnoreSelfLock, IgnoreMFSRoutines, IgnoreAllLocks)
|
||||
|
||||
ErrorMsg = ''
|
||||
If TableName NE '' AND KeyID NE '' AND ColumnNo NE '' then
|
||||
|
||||
If ( Num(ColumnNo) and (ColumnNo GT 0) ) then
|
||||
@ -1009,7 +1010,13 @@ Service WriteDataColumn(TableName, KeyID, ColumnNo, Value, IgnoreSelfLock, Ignor
|
||||
end
|
||||
end
|
||||
If IgnoreAllLocks EQ False$ then
|
||||
If Error_Services('HasError') then
|
||||
ErrorMsg = Error_Services('GetMessage')
|
||||
end
|
||||
Database_Services('ReleaseKeyIDLock', TableName, KeyID)
|
||||
If ErrorMsg NE '' then
|
||||
Error_Services('Add', ErrorMsg)
|
||||
end
|
||||
end
|
||||
end else
|
||||
Error_Services('Add', 'Unable to lock ' : KeyID : ' for the ' : TableName : ' table in the ' : Service : ' service.')
|
||||
@ -1109,4 +1116,3 @@ end service
|
||||
// Internal GoSubs
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
133
LSL2/STPROC/DEARCHIVE_API.txt
Normal file
133
LSL2/STPROC/DEARCHIVE_API.txt
Normal file
@ -0,0 +1,133 @@
|
||||
Function Dearchive_API(@API)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : Dearchive_API
|
||||
|
||||
Description : API logic for the Dearchive resource.
|
||||
|
||||
Notes : All web APIs should include the API_SETUP insert. This will provide several useful variables:
|
||||
|
||||
HTTPMethod - The HTTP Method (Verb) submitted by the client (e.g., GET, POST, etc.)
|
||||
APIURL - The URL for the API entry point (e.g., api.mysite.com/v1).
|
||||
FullEndpointURL - The URL submitted by the client, including query params.
|
||||
FullEndpointURLNoQuery - The URL submitted by the client, excluding query params.
|
||||
EndpointSegment - The URL endpoint segment.
|
||||
ParentURL - The URL path preceeding the current endpoint.
|
||||
CurrentAPI - The name of this stored procedure.
|
||||
|
||||
Parameters :
|
||||
API [in] -- Web API to process. Format is [APIPattern].[HTTPMethod]:
|
||||
- APIPattern must follow this structure Dearchive[.ID.[<Property>]]
|
||||
- HTTPMethod can be any valid HTTP method, e.g., GET, POST, PUT, DELETE, etc.
|
||||
Examples:
|
||||
- Dearchive.POST
|
||||
- Dearchive.ID.PUT
|
||||
- Dearchive.ID.firstName.GET
|
||||
Response [out] -- Response to be sent back to the Controller (HTTP_MCP) or requesting procedure. Web API
|
||||
services do not rely upon anything being returned in the response. This is what the
|
||||
various services like SetResponseBody and SetResponseStatus services are for. A response
|
||||
value is only helpful if the developers want to use it for debug purposes.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
10/14/25 xxx Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert API_SETUP
|
||||
$insert HTTP_INSERTS
|
||||
$Insert IFX_EQUATES
|
||||
|
||||
Declare subroutine Service_Services, Logging_Services
|
||||
Declare function OI_Wizard_Services, Logging_Services, Environment_Services
|
||||
|
||||
GoToAPI else
|
||||
// The specific resource endpoint doesn't have a API handler yet.
|
||||
HTTP_Services('SetResponseStatus', 204, 'This is a valid endpoint but a web API handler has not yet been created.')
|
||||
end
|
||||
|
||||
Return Response OR ''
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Endpoint Handlers
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
API dearchive.ID.POST
|
||||
|
||||
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\Archive\DeArchiving'
|
||||
LogDate = Oconv(Date(), 'D4/')
|
||||
LogTime = Oconv(Time(), 'MTS')
|
||||
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' ArchiveService.csv'
|
||||
Headers = 'Logging DTM' : @FM : 'Message'
|
||||
objLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, Comma$, Headers, '', False$, False$)
|
||||
LoggingDTM = LogDate : ' ' : LogTime
|
||||
|
||||
ErrorMsg = ''
|
||||
OIWizardID = ''
|
||||
Cookies = HTTP_Services('GetHTTPCookie')
|
||||
For each Cookie in Cookies using ';'
|
||||
Key = Field(Cookie, '=', 1)
|
||||
If Key EQ 'sessionID' then
|
||||
OIWizardID = Field(Cookie, '=', 2)
|
||||
end
|
||||
Next Cookie
|
||||
|
||||
ValidSession = OI_Wizard_Services('ValidateSession', OIWizardID)
|
||||
|
||||
If ValidSession then
|
||||
ArchiveId = EndpointSegment
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM;
|
||||
LogData<2> = ArchiveId
|
||||
LogData<3> = 'Attempting to add de-archival to the process queue.'
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
swap '__' with '*' in ArchiveId
|
||||
If RowExists('ARCHIVE', ArchiveId) then
|
||||
Service_Services('PostProcedure', 'ARCHIVE_SERVICES', 'DeArchiveDataFromTxt':SD$:ArchiveId)
|
||||
If Error_Services('NoError') then
|
||||
Message = 'Successfully queued data for de-archive.'
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM;
|
||||
LogData<2> = ArchiveId
|
||||
LogData<3> = Message
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
end else
|
||||
ErrorMsg = 'Error queueing de-archiving.'
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM;
|
||||
LogData<2> = ArchiveId
|
||||
LogData<3> = ErrorMsg
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Archive record not found in database.'
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM;
|
||||
LogData<2> = ArchiveId
|
||||
LogData<3> = ErrorMsg
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
end
|
||||
|
||||
If ErrorMsg NE '' then
|
||||
HTTP_Services('SetResponseStatus', 500, ErrorMsg)
|
||||
end else
|
||||
HTTP_Services('SetResponseHeaderField', 'Content-Location', FullEndpointURL)
|
||||
If Assigned(Message) then
|
||||
HTTP_Services('SetResponseStatus', 201, Message)
|
||||
end else
|
||||
HTTP_Services('SetResponseStatus', 201)
|
||||
end
|
||||
end
|
||||
|
||||
end else
|
||||
HTTP_Services('SetResponseStatus', 500, 'Invalid session. Reauthentication required.')
|
||||
end
|
||||
|
||||
end api
|
@ -72,23 +72,24 @@ Options BOOLEAN = True$, False$
|
||||
// Therefore, this will be removed before returning to the caller.
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service GetServer()
|
||||
|
||||
|
||||
NumFields = DCount(@Station, '_')
|
||||
Server = Field(@Station, '_', 1, NumFields - 1)
|
||||
|
||||
|
||||
Response = Server
|
||||
|
||||
|
||||
end service
|
||||
|
||||
|
||||
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 "mestsa024ec" and Machine _NEC "MESTST1010" and Machine _NEC "MESTST1009" then
|
||||
IsProd = True$
|
||||
end
|
||||
Response = 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 "mestsa024ec" and Machine _NEC "MESTST1010" and Machine _NEC "MESTST1009" then
|
||||
IsProd = True$
|
||||
end
|
||||
Response = IsProd
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -98,12 +99,12 @@ end service
|
||||
// Returns the application's root path. If this is a server, the shared folder will be included.
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service GetApplicationRootPath()
|
||||
|
||||
|
||||
RootIP = Environment_Services('GetApplicationRootIP')
|
||||
ApplicationRootPath = RootIP : '\Apps'
|
||||
|
||||
|
||||
Response = ApplicationRootPath
|
||||
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -113,17 +114,17 @@ end service
|
||||
// Returns the application's root IP.
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service GetApplicationRootIP()
|
||||
|
||||
|
||||
Machine = Environment_Services('GetServer')
|
||||
|
||||
|
||||
Begin Case
|
||||
Case Machine EQ 'MESSA005' ; ApplicationRootIP = '\\messa005.infineon.com'
|
||||
Case Machine EQ 'MESSA005' ; ApplicationRootIP = '\\messa005.infineon.com'
|
||||
Case Machine EQ 'MESTSA01EC' ; ApplicationRootIP = '\\10.95.140.13'
|
||||
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 'MESTSA024EC' ; ApplicationRootIP = '\\10.95.140.66'
|
||||
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 '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'
|
||||
@ -131,9 +132,9 @@ Service GetApplicationRootIP()
|
||||
Case Machine EQ 'MESTST1010' ; ApplicationRootIP = '\\10.95.140.13'
|
||||
Case Otherwise$ ; ApplicationRootIP = '\\10.95.140.14'
|
||||
End Case
|
||||
|
||||
|
||||
Response = ApplicationRootIP
|
||||
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -143,10 +144,10 @@ end service
|
||||
// Returns the FTP root path. This is where the scripts and FTP transfer files will be located.
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service GetFTPRootPath()
|
||||
|
||||
|
||||
Machine = Environment_Services('GetServer')
|
||||
RootPath = Environment_Services('GetLocalRootPath')
|
||||
|
||||
|
||||
Begin Case
|
||||
Case Machine EQ 'MESIRWAP001' ; FTPRootPath = RootPath
|
||||
Case Machine EQ 'MESSA005' ; FTPRootPath = RootPath : '\FTP'
|
||||
@ -155,9 +156,9 @@ Service GetFTPRootPath()
|
||||
Case Machine EQ 'MESST6502' ; FTPRootPath = RootPath : '\FTP'
|
||||
Case Otherwise$ ; FTPRootPath = RootPath : '\FTP'
|
||||
End Case
|
||||
|
||||
|
||||
Response = FTPRootPath
|
||||
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -167,10 +168,10 @@ end service
|
||||
// Returns the Reports root path. This is where various reports will be located.
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service GetReportsRootPath()
|
||||
|
||||
|
||||
RootPath = Environment_Services('GetLocalRootPath')
|
||||
Response = RootPath : '\OIReports'
|
||||
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -180,10 +181,10 @@ end service
|
||||
// Returns the user data root path. This is where various reports will be located.
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service GetUserDataRootPath()
|
||||
|
||||
|
||||
UserDataRootPath = '\\messdv002.na.infineon.com'
|
||||
Response = UserDataRootPath
|
||||
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -193,10 +194,10 @@ end service
|
||||
// Returns the user data production path. This is where various reports will be located.
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service GetUserDataProductionPath()
|
||||
|
||||
|
||||
ProductionPath = Environment_Services('GetUserDataRootPath') : '\IT'
|
||||
Response = ProductionPath
|
||||
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -206,17 +207,17 @@ end service
|
||||
// Returns the SPC data path.
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service GetSpcFilesharePath()
|
||||
|
||||
IsProd = Environment_Services("IsProd")
|
||||
|
||||
If IsProd EQ True$ then
|
||||
Response = '\\mesfs.infineon.com\EC_SPC_Si_Import\TXT'
|
||||
end else
|
||||
Path = Environment_Services('GetApplicationRootPath'):'\SPC_Data'
|
||||
MakeDirSuccess = Utility("MAKEDIR", Path)
|
||||
Response = Path
|
||||
end
|
||||
|
||||
|
||||
IsProd = Environment_Services("IsProd")
|
||||
|
||||
If IsProd EQ True$ then
|
||||
Response = '\\mesfs.infineon.com\EC_SPC_Si_Import\TXT'
|
||||
end else
|
||||
Path = Environment_Services('GetApplicationRootPath'):'\SPC_Data'
|
||||
MakeDirSuccess = Utility("MAKEDIR", Path)
|
||||
Response = Path
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -226,17 +227,17 @@ end service
|
||||
// Returns the SPC data path.
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service GetSPCDataPath()
|
||||
|
||||
IsProd = Environment_Services("IsProd")
|
||||
|
||||
If IsProd EQ True$ then
|
||||
Response = '\\messa04ec.infineon.com\OI_SPC_Data_Transfer'
|
||||
end else
|
||||
Path = Environment_Services('GetApplicationRootPath'):'\SPC_Data'
|
||||
MakeDirSuccess = Utility("MAKEDIR", Path)
|
||||
Response = Path
|
||||
end
|
||||
|
||||
|
||||
IsProd = Environment_Services("IsProd")
|
||||
|
||||
If IsProd EQ True$ then
|
||||
Response = '\\messa04ec.infineon.com\OI_SPC_Data_Transfer'
|
||||
end else
|
||||
Path = Environment_Services('GetApplicationRootPath'):'\SPC_Data'
|
||||
MakeDirSuccess = Utility("MAKEDIR", Path)
|
||||
Response = Path
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -246,10 +247,10 @@ end service
|
||||
// Returns the Metrology Viewer URL.
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service GetMetrologyViewerURL()
|
||||
|
||||
|
||||
ProductionPath = 'http://messa010ec.infineon.com/'
|
||||
Response = ProductionPath
|
||||
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -259,10 +260,10 @@ end service
|
||||
// Returns the wafer map production path.
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service GetWaferMapProductionPath()
|
||||
|
||||
|
||||
ProductionPath = '\\mesfs.infineon.com\EC_Metrology_Si\MetrologyAttachments\TencorRunData_'
|
||||
Response = ProductionPath
|
||||
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -275,7 +276,28 @@ Service GetMetrologyProductionPath()
|
||||
|
||||
ProductionPath = 'messqlec1.infineon.com\PROD1,53959'
|
||||
Response = ProductionPath
|
||||
|
||||
end service
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
// GetOIWizardBaseUrl
|
||||
//
|
||||
// Returns the OIWizardBaseUrl.
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service GetOIWizardBaseUrl()
|
||||
|
||||
Machine = Environment_Services('GetServer')
|
||||
Begin Case
|
||||
Case ( (Machine _EQC 'MESTSA01EC') or (Machine _EQC 'MESTST1009') or (Machine _EQC 'MESTST1010') )
|
||||
Response = 'https://mestsa008.infineon.com:50186/'
|
||||
// Uncomment this case and add your hostname if testing locally.
|
||||
//Case ( (Machine EQ 'ISCN5CG2430JV1') or (Machine _EQC 'MESTSA09EC') )
|
||||
// Response = 'http://localhost:12009/'
|
||||
Case Otherwise$
|
||||
Response = 'https://messa014.infineon.com:50184/'
|
||||
End Case
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -285,11 +307,11 @@ end service
|
||||
// Returns the Control Plan production path.
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service GetControlPlanProductionPath()
|
||||
|
||||
|
||||
ProductionPath = 'iqsdms1'
|
||||
|
||||
|
||||
Response = ProductionPath
|
||||
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -299,11 +321,11 @@ end service
|
||||
// Returns the Wafer Track data production path.
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service GetWaferTrackProductionPath()
|
||||
|
||||
|
||||
ProductionPath = 'IQSDMS1'
|
||||
|
||||
|
||||
Response = ProductionPath
|
||||
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -313,29 +335,29 @@ end service
|
||||
// Returns the local root path. This is where the scripts and FTP transfer files will be located.
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service GetLocalRootPath()
|
||||
|
||||
|
||||
Machine = Environment_Services('GetServer')
|
||||
|
||||
|
||||
Begin Case
|
||||
Case Machine EQ 'MESIRWAP001' ; LocalRootPath = 'C:'
|
||||
Case Machine EQ 'MESSA005' ; LocalRootPath = 'D:'
|
||||
Case Machine EQ 'MESSA012' ; LocalRootPath = 'D:'
|
||||
Case Machine EQ 'MESSA01EC' ; LocalRootPath = 'D:'
|
||||
Case Machine EQ 'MESTSA01EC' ; LocalRootPath = 'D:'
|
||||
Case Machine EQ 'MESTSA09EC' ; LocalRootPath = 'D:'
|
||||
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 'MESTSA09EC' ; LocalRootPath = 'D:'
|
||||
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.
|
||||
Case Machine EQ 'MESTST1007' ; LocalRootPath = 'C:' ; // This is a map to the user's actual C drive.
|
||||
Case Otherwise$ ; LocalRootPath = 'C:'
|
||||
End Case
|
||||
|
||||
|
||||
Response = LocalRootPath
|
||||
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -345,12 +367,12 @@ end service
|
||||
// Returns the method that label programs should use for printing (i.e., OIPI or DirectPrint).
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service GetLabelPrintMethod()
|
||||
|
||||
|
||||
LabelPrintMethod = Database_Services('ReadDataRow', 'APP_INFO', 'LABEL_PRINT_METHOD')<1>
|
||||
Locate LabelPrintMethod in 'OIPI,DirectPrint' using ',' setting cPos else LabelPrintMethod = 'OIPI'
|
||||
|
||||
|
||||
Response = LabelPrintMethod
|
||||
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -374,7 +396,7 @@ end service
|
||||
// Returns printer server UNC path.
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service GetPrintServerPath()
|
||||
|
||||
|
||||
ServerPath = '\\messp1002.na.infineon.com\'
|
||||
Response = ServerPath
|
||||
|
||||
@ -402,10 +424,10 @@ end service
|
||||
// accessing the database.
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service SetServerCanary()
|
||||
|
||||
|
||||
hSysLists = Database_Services('GetTableHandle', 'SYSLISTS')
|
||||
Lock hSysLists, ServiceKeyID then
|
||||
|
||||
|
||||
DateTimeStamp = Oconv(Date(), 'D4/') : ' - ' : Oconv(Time(), 'MTHS')
|
||||
Database_Services('WriteDataRow', 'APP_INFO', 'CANARY', DateTimeStamp, True$, False$, True$)
|
||||
If Error_Services('NoError') then
|
||||
@ -421,7 +443,7 @@ Service SetServerCanary()
|
||||
Message<7> = 'TEXT'
|
||||
Message<8> = 'Error in ' : Service : ' service. Message: ' : Error
|
||||
Message<9> = ''
|
||||
|
||||
|
||||
Config = ''
|
||||
Config<1> = SendUsing_Port$
|
||||
Config<3> = 25
|
||||
@ -432,10 +454,10 @@ Service SetServerCanary()
|
||||
Config<8> = False$
|
||||
Result = SRP_Send_Mail(Message, Config)
|
||||
end
|
||||
|
||||
|
||||
Unlock hSysLists, ServiceKeyID else Null
|
||||
end
|
||||
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -443,12 +465,12 @@ Service GetSAPPath()
|
||||
|
||||
Machine = Environment_Services('GetServer')
|
||||
Environment = 'QA'
|
||||
|
||||
|
||||
Begin Case
|
||||
Case Machine EQ 'MESSA005' ; Environment = 'PRD'
|
||||
Case Machine EQ 'MESSA01EC' ; Environment = 'PRD'
|
||||
End Case
|
||||
|
||||
|
||||
Response = Environment
|
||||
|
||||
end service
|
||||
@ -456,25 +478,25 @@ end service
|
||||
|
||||
Service GetSQLScrapeConnectionString()
|
||||
|
||||
Machine = Environment_Services('GetServer')
|
||||
Begin Case
|
||||
Case Machine = 'MESSA01EC'
|
||||
// PROD SQL Servers
|
||||
ConnectionString = 'Provider=MSOLEDBSQL.1;Password=0okm9ijn;Persist Security Info=True;User ID=srpadmin;Initial Catalog=LSL2SQL;Data Source=MESSQLEC1.infineon.com\PROD1,53959;Initial File Name="";Trust Server Certificate=True;Server SPN="";Authentication="";Access Token=""'
|
||||
Case ( (Machine = 'MESTSA01EC') or (Machine = 'MESTSA09EC') or (Machine = 'MESTSA010EC') or (Machine = 'MESTSA011EC') or (Machine = 'MESTSA012EC') )
|
||||
// DEV SQL Servers
|
||||
Machine = Environment_Services('GetServer')
|
||||
Begin Case
|
||||
Case Machine = 'MESSA01EC'
|
||||
// PROD SQL Servers
|
||||
ConnectionString = 'Provider=MSOLEDBSQL.1;Password=0okm9ijn;Persist Security Info=True;User ID=srpadmin;Initial Catalog=LSL2SQL;Data Source=MESSQLEC1.infineon.com\PROD1,53959;Initial File Name="";Trust Server Certificate=True;Server SPN="";Authentication="";Access Token=""'
|
||||
Case ( (Machine = 'MESTSA01EC') or (Machine = 'MESTSA09EC') or (Machine = 'MESTSA010EC') or (Machine = 'MESTSA011EC') or (Machine = 'MESTSA012EC') )
|
||||
// DEV SQL Servers
|
||||
ConnectionString = 'Provider=MSOLEDBSQL.1;Password=Fisql2023!;Persist Security Info=True;User ID=fisql;Initial Catalog=LSL2SQL;Data Source=10.95.140.27\TEST1,50572;Initial File Name="";Trust Server Certificate=True;Server SPN="";Authentication="";Access Token=""'
|
||||
Case Otherwise$
|
||||
// Default to DEV SQL Servers just in case
|
||||
ConnectionString = 'Provider=MSOLEDBSQL.1;Password=Fisql2023!;Persist Security Info=True;User ID=fisql;Initial Catalog=LSL2SQL;Data Source=10.95.140.27\TEST1,50572;Initial File Name="";Trust Server Certificate=True;Server SPN="";Authentication="";Access Token=""'
|
||||
End Case
|
||||
Response = ConnectionString
|
||||
|
||||
Case Otherwise$
|
||||
// Default to DEV SQL Servers just in case
|
||||
ConnectionString = 'Provider=MSOLEDBSQL.1;Password=Fisql2023!;Persist Security Info=True;User ID=fisql;Initial Catalog=LSL2SQL;Data Source=10.95.140.27\TEST1,50572;Initial File Name="";Trust Server Certificate=True;Server SPN="";Authentication="";Access Token=""'
|
||||
End Case
|
||||
Response = ConnectionString
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service GetUserDesktopPath()
|
||||
|
||||
|
||||
Response = ''
|
||||
UserRootPath = ''
|
||||
UserName = RTI_GetNetworkUserName()
|
||||
@ -492,94 +514,115 @@ end service
|
||||
|
||||
|
||||
Service GetTempPath()
|
||||
|
||||
TempDirectory = Str(\00\, 1024)
|
||||
GetTempPath(Len(TempDirectory), TempDirectory)
|
||||
Convert \00\ to '' in TempDirectory
|
||||
Response = TempDirectory
|
||||
|
||||
|
||||
TempDirectory = Str(\00\, 1024)
|
||||
GetTempPath(Len(TempDirectory), TempDirectory)
|
||||
Convert \00\ to '' in TempDirectory
|
||||
Response = TempDirectory
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service GetMonaResource()
|
||||
|
||||
If Environment_Services("IsProd") then
|
||||
Response = "OPENINSIGHT_MES_OP_FE"
|
||||
end else
|
||||
Response = "OPENINSIGHT_MES_OP_FE_DEV"
|
||||
end
|
||||
|
||||
|
||||
If Environment_Services("IsProd") then
|
||||
Response = "OPENINSIGHT_MES_OP_FE"
|
||||
end else
|
||||
Response = "OPENINSIGHT_MES_OP_FE_DEV"
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service GetMonInBufferedWorkerApiUrl()
|
||||
|
||||
If Environment_Services("IsProd") then
|
||||
Response = "https://messa014.infineon.com:7851"
|
||||
end else
|
||||
Response = "https://mestsa008.infineon.com:7851"
|
||||
end
|
||||
|
||||
|
||||
If Environment_Services("IsProd") then
|
||||
Response = "https://messa014.infineon.com:7851"
|
||||
end else
|
||||
Response = "https://mestsa008.infineon.com:7851"
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service GetProveInApiUrl()
|
||||
|
||||
If Environment_Services("IsProd") then
|
||||
Response = "https://messa014.infineon.com:8851"
|
||||
end else
|
||||
Response = "https://mestsa008.infineon.com:8851"
|
||||
end
|
||||
|
||||
|
||||
If Environment_Services("IsProd") then
|
||||
Response = "https://messa014.infineon.com:8851"
|
||||
end else
|
||||
Response = "https://mestsa008.infineon.com:8851"
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service GetIfxEmailServer()
|
||||
|
||||
Response = 'smtp.intra.infineon.com'
|
||||
|
||||
|
||||
Response = 'smtp.intra.infineon.com'
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service GetEnvironmentVariable(VariableName)
|
||||
|
||||
If VariableName NE '' then
|
||||
VarLength = GetEnvironmentVariable(VariableName, "", 0) + 1
|
||||
VarValue = space(VarLength+1)
|
||||
VarLength = GetEnvironmentVariable(VariableName, VarValue, VarLength)
|
||||
VarValue = VarValue[1, VarLength]
|
||||
Response = VarValue
|
||||
end else
|
||||
Error_Services('Add', 'Error in service ':Service:'. Null VariableName passed in')
|
||||
end
|
||||
|
||||
|
||||
If VariableName NE '' then
|
||||
VarLength = GetEnvironmentVariable(VariableName, "", 0) + 1
|
||||
VarValue = space(VarLength+1)
|
||||
VarLength = GetEnvironmentVariable(VariableName, VarValue, VarLength)
|
||||
VarValue = VarValue[1, VarLength]
|
||||
Response = VarValue
|
||||
end else
|
||||
Error_Services('Add', 'Error in service ':Service:'. Null VariableName passed in')
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service GetServiceManagerPort()
|
||||
|
||||
|
||||
FilePath = Drive():'\SRPEngineServer.ini'
|
||||
OSRead IniFile from FilePath then
|
||||
CharIndex = Index(IniFile, 'Port', 1)
|
||||
Line = IniFile[CharIndex, 'F':CRLF$]
|
||||
Response = Trim(Line[-1, 'B='])
|
||||
end
|
||||
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service GetScrapeServerPort()
|
||||
|
||||
|
||||
FilePath = Drive():'\SRPEngineServerScrape.ini'
|
||||
OSRead IniFile from FilePath then
|
||||
CharIndex = Index(IniFile, 'Port', 1)
|
||||
Line = IniFile[CharIndex, 'F':CRLF$]
|
||||
Response = Trim(Line[-1, 'B='])
|
||||
end
|
||||
|
||||
|
||||
end service
|
||||
|
||||
Service GetTextDataBackupRootDir()
|
||||
|
||||
Machine = Environment_Services('GetServer')
|
||||
DataBackupDir = ''
|
||||
|
||||
Begin Case
|
||||
Case Machine = 'MESSA01EC'
|
||||
// PROD SQL Servers
|
||||
DataBackupDir = '\\MESFS.INFINEON.COM\MES_OpenInsight_Backups\DataBackups\'
|
||||
Case ( (Machine = 'MESTSA01EC') or (Machine = 'MESTSA09EC') or (Machine = 'MESTSA010EC') or (Machine = 'MESTSA011EC') or (Machine = 'MESTSA012EC') )
|
||||
// DEV SQL Servers
|
||||
DataBackupDir = 'd:\MES_OpenInsight_Backups\DataBackups\'
|
||||
Case Otherwise$
|
||||
// Default to DEV SQL Servers just in case
|
||||
DataBackupDir = 'd:\MES_OpenInsight_Backups\DataBackups\'
|
||||
End Case
|
||||
Response = DataBackupDir
|
||||
|
||||
end service
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Internal GoSubs
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
@ -425,6 +425,38 @@ Service PrintReactorLabel(ReactNo, LoadLockSide=LOAD_LOCK_SIDE)
|
||||
end service
|
||||
|
||||
|
||||
Service GetReactorLabelZPL(ReactNo, LoadLockSide=LOAD_LOCK_SIDE)
|
||||
|
||||
If ( (ReactNo NE '') and (LoadLockSide NE '') ) then
|
||||
BaseZpl = '^XA^MD30^PR1^LH10,10^FO35,5^BY2^B3N,,80,N^FD10SR{ReactNo}.{LoadLockSidePrefix}^FS^FO10,105^A045,90^FB400,1,,C^FDR{ReactNo} {LoadLockSide}^FS^XZ'
|
||||
Convert 'R' to '' in ReactNo
|
||||
If LoadLockSide _EQC 'Both' then
|
||||
LoadLockSidePrefix = 'L'
|
||||
ZplLeft = BaseZpl
|
||||
Swap '{ReactNo}' with ReactNo in ZplLeft
|
||||
Swap '{LoadLockSidePrefix}' with LoadLockSidePrefix in ZplLeft
|
||||
Swap '{LoadLockSide}' with 'Left' in ZplLeft
|
||||
ZplRight = BaseZpl
|
||||
LoadLockSidePrefix = 'R'
|
||||
Swap '{ReactNo}' with ReactNo in ZplRight
|
||||
Swap '{LoadLockSidePrefix}' with LoadLockSidePrefix in ZplRight
|
||||
Swap '{LoadLockSide}' with 'Right' in ZplRight
|
||||
Zpl = ZplLeft:ZplRight
|
||||
end else
|
||||
LoadLockSidePrefix = LoadLockSide[1, 1]
|
||||
Zpl = BaseZpl
|
||||
Swap '{ReactNo}' with ReactNo in Zpl
|
||||
Swap '{LoadLockSidePrefix}' with LoadLockSidePrefix in Zpl
|
||||
Swap '{LoadLockSide}' with LoadLockSide in Zpl
|
||||
end
|
||||
Response = Zpl
|
||||
end else
|
||||
Error_Services('Add', 'Error in ':Service:' service. Null ReactNo or LoadLockSide passed in.')
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service GetReturnToFabLabelZPL(RTFId)
|
||||
|
||||
ZPLStringLabel = ''
|
||||
@ -460,5 +492,3 @@ Service GetReturnToFabLabelZPL(RTFId)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
|
||||
|
@ -326,7 +326,7 @@ Service CreateNewLot(LotType, ProdName, LotQty, VendorPartNo, VendorLotNo, Vendo
|
||||
Lot_Services('OpenLot', CreatedLotNumber)
|
||||
if Error_Services('NoError') then
|
||||
// Move lot in
|
||||
Lot_Services('MoveInLot', CreatedLotNumber, Username)
|
||||
Lot_Services('StartLot', CreatedLotNumber, 'SYSTEM')
|
||||
if Error_Services('NoError') then
|
||||
If PrinterID NE 'WEB' then
|
||||
// If PrinterID is set to WEB this means the request comes from OI_Wizard and the client is going to handle printing.
|
||||
@ -792,6 +792,33 @@ Service IsLotMovedIn(LotId)
|
||||
|
||||
end service
|
||||
|
||||
Service IsLastOperation(LotId, LotOperationId)
|
||||
|
||||
ErrorMsg = ''
|
||||
Response = False$
|
||||
|
||||
If LotId NE '' then
|
||||
If LotOperationId NE '' then
|
||||
AllOpsInSeq = Lot_Services('GetLotOperationSequence', LotId)
|
||||
if Error_Services('NoError') then
|
||||
LastLotOperation = AllOpsInSeq[-1, "B":@FM]
|
||||
If LotOperationId EQ LastLotOperation then Response = True$
|
||||
end else
|
||||
ErrorMsg = Error_Services('GetMessage')
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'LotOperationId was null.'
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'LotId was null.'
|
||||
end
|
||||
|
||||
If ErrorMsg NE '' then
|
||||
Error_Services('Add', ErrorMsg)
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service IsOperationCompleted(LotOperationId)
|
||||
|
||||
@ -819,8 +846,14 @@ Service StartLot(LotId, Operator)
|
||||
If RowExists('LOT', LotId) then
|
||||
Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'LOT_START', 'Lot started.', '', Operator)
|
||||
If Error_Services('NoError') then
|
||||
Lot_Services('MoveInLot', LotId, Operator)
|
||||
If Error_Services('HasError') then ErrorMessage = Error_Services('GetMessage')
|
||||
CurrOperation = Lot_Services('GetLotCurrOperationName', LotId)
|
||||
Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'ARRIVAL', 'Lot arrived at operation ' : CurrOperation : '.', '', Operator)
|
||||
if Error_Services('NoError') then
|
||||
Lot_Services('MoveInLot', LotId, Operator)
|
||||
If Error_Services('HasError') then ErrorMessage = Error_Services('GetMessage')
|
||||
end else
|
||||
ErrorMessage = Error_Services('GetMessage')
|
||||
end
|
||||
end else
|
||||
ErrorMessage = Error_Services('GetMessage')
|
||||
end
|
||||
@ -958,12 +991,7 @@ Service MoveInLot(LotID, Operator)
|
||||
CurrOperation = XLATE('LOT_OPERATION', ThisLotCurrOperationID, LOT_OPERATION_OPERATION_ID$, 'X')
|
||||
If Error_Services('NoError') then
|
||||
Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'MOVE_IN', 'Lot moved into operation ' : CurrOperation : '.', '', Operator)
|
||||
If Error_Services('NoError') then
|
||||
Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'ARRIVAL', 'Lot arrived at operation ' : CurrOperation : '.', '', Operator)
|
||||
If Error_Services('HasError') then ErrorMessage = Error_Services('GetMessage')
|
||||
end else
|
||||
ErrorMessage = Error_Services('GetMessage')
|
||||
end
|
||||
If Error_Services('HasError') then ErrorMessage = Error_Services('GetMessage')
|
||||
end else
|
||||
ErrorMessage = 'Error in Move In process for Lot id ' : LotId : '. ' : Error_Services('GetMessage')
|
||||
end
|
||||
@ -1018,6 +1046,7 @@ Service MoveOutLot(LotID, Operator)
|
||||
WaferQty = ThisLotRec<LOT_WAFER_QTY$>
|
||||
If Error_Services('NoError') then
|
||||
ThisLotCurrOperationID = Lot_Services('GetLotCurrOperationId', LotId)
|
||||
ThisLotCurrOperationName = XLATE('LOT_OPERATION', ThisLotCurrOperationID, LOT_OPERATION_OPERATION_ID$, 'X')
|
||||
If ThisLotCurrOperationID NE '' then
|
||||
If Lot_Services('IsLotMovedIn', LotId) then
|
||||
ThisLotCurrOperationRec = Database_Services('ReadDataRow', 'LOT_OPERATION', ThisLotCurrOperationID)
|
||||
@ -1029,7 +1058,23 @@ Service MoveOutLot(LotID, Operator)
|
||||
LotType = XLATE('LOT', LotId, LOT_TYPE$, 'X')
|
||||
CurrOperation = XLATE('LOT_OPERATION', ThisLotCurrOperationID, LOT_OPERATION_OPERATION_ID$, 'X')
|
||||
If Error_Services('NoError') then
|
||||
Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'MOVE_OUT', 'Lot moved out of operation ' : CurrOperation : '.', '', Operator)
|
||||
IsLastLotOp = Lot_Services('IsLastOperation', LotId, ThisLotCurrOperationID)
|
||||
if Error_Services('NoError') then
|
||||
Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'MOVE_OUT', 'Lot moved out of operation ' : ThisLotCurrOperationName : '.', '', Operator)
|
||||
If Error_Services('NoError') then
|
||||
If Not(IsLastLotOp) then
|
||||
NewCurrOperation = Lot_Services('GetLotCurrOperationName', LotId)
|
||||
Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'ARRIVAL', 'Lot arrived at operation ' : NewCurrOperation : '.', '', Operator)
|
||||
end else
|
||||
Lot_Services('CloseLot', LotId)
|
||||
if Error_Services('HasError') then
|
||||
ErrorMessage = Error_Services('GetMessage')
|
||||
end
|
||||
end
|
||||
end
|
||||
end else
|
||||
ErrorMessage = Error_Services('GetMessage')
|
||||
end
|
||||
end else
|
||||
ErrorMessage = 'Error in Move In process for Lot id ' : LotId : '. ' : Error_Services('GetMessage')
|
||||
end
|
||||
@ -1229,9 +1274,7 @@ Service OpenLot(LotId)
|
||||
LotRec = Database_Services('ReadDataRow', 'LOT', LotId, True$, 0, False$)
|
||||
LotRec<LOT_OPEN$> = True$
|
||||
Database_Services('WriteDataRow', 'LOT', LotId, LotRec, True$, False$, False$)
|
||||
If Error_Services('NoError') then
|
||||
Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'LOT_START', 'Lot created.', '', 'SYSTEM')
|
||||
end else
|
||||
If Error_Services('HasError') then
|
||||
ErrorMessage = 'Error setting lot ' : LotId : ' to open.' : Error_Services('GetMessage')
|
||||
end
|
||||
end else
|
||||
@ -1272,51 +1315,39 @@ Service CloseLot(LotId)
|
||||
end service
|
||||
|
||||
|
||||
Service AutoCloseTestWaferLot(LotId, CloseUserId)
|
||||
|
||||
Service AutoCloseLot(LotId, CloseUserId)
|
||||
|
||||
AutoCloseTime = Datetime()
|
||||
ErrorMessage = ''
|
||||
If MemberOf(CloseUserId, 'LEAD') OR MemberOf(CloseUserId, 'SUPERVISOR') OR CloseUserId EQ 'SYSTEM' then
|
||||
LotOperations = Lot_Services('GetLotOperationSequence', LotId)
|
||||
for LotOperationIndex = 1 to DCount(LotOperations, @FM)
|
||||
Until ErrorMessage NE ''
|
||||
ThisLotOperationId = LotOperations<LotOperationIndex>
|
||||
ThisOperationCompleted = Lot_Services('IsOperationCompleted', ThisLotOperationId)
|
||||
If Error_Services('NoError') then
|
||||
if Not(ThisOperationCompleted) then
|
||||
ThisLotOperationRec = Database_Services('ReadDataRow', 'LOT_OPERATION', ThisLotOperationId)
|
||||
if Error_Services('NoError') then
|
||||
CurrLotQty = Database_Services('ReadDataColumn', 'LOT', LotId, LOT_WAFER_QTY$, True$, 0, False$)
|
||||
If ThisLotOperationRec<LOT_OPERATION_DATETIME_IN$> EQ '' then
|
||||
ThisLotOperationRec<LOT_OPERATION_DATETIME_IN$> = AutoCloseTime
|
||||
end
|
||||
If ThisLotOperationRec<LOT_OPERATION_DATETIME_OUT$> EQ '' then
|
||||
ThisLotOperationRec<LOT_OPERATION_DATETIME_OUT$> = AutoCloseTime
|
||||
end
|
||||
if ThisLotOperationRec<LOT_OPERATION_OPERATOR_IN_ID$> EQ '' then
|
||||
ThisLotOperationRec<LOT_OPERATION_OPERATOR_IN_ID$> = CloseUserId
|
||||
end
|
||||
if ThisLotOperationRec<LOT_OPERATION_OPERATOR_OUT_ID$> EQ '' then
|
||||
ThisLotOperationRec<LOT_OPERATION_OPERATOR_OUT_ID$> = CloseUserId
|
||||
end
|
||||
if ThisLotOperationRec<LOT_OPERATION_DATETIME_START$> EQ '' then
|
||||
ThisLotOperationRec<LOT_OPERATION_DATETIME_START$> = AutoCloseTime
|
||||
end
|
||||
if ThisLotOperationRec<LOT_OPERATION_DATETIME_STOP$> EQ '' then
|
||||
ThisLotOperationRec<LOT_OPERATION_DATETIME_STOP$> = AutoCloseTime
|
||||
end
|
||||
If ThisLotOperationRec<LOT_OPERATION_WAFER_IN_QTY$> EQ '' then
|
||||
ThisLotOperationRec<LOT_OPERATION_WAFER_IN_QTY$> = CurrLotQty
|
||||
end
|
||||
If ThisLotOperationRec<LOT_OPERATION_WAFER_OUT_QTY$> EQ '' then
|
||||
ThisLotOperationRec<LOT_OPERATION_WAFER_OUT_QTY$> = CurrLotQty
|
||||
end
|
||||
Database_Services('WriteDataRow', 'LOT_OPERATION', ThisLotOperationId, ThisLotOperationRec, True$, False$, False$)
|
||||
If Error_Services('HasError') then
|
||||
ErrorMessage = Error_Services('GetMessage')
|
||||
end
|
||||
end else
|
||||
ErrorMessage = Error_Services('GetMessage')
|
||||
end
|
||||
MovedIn = Lot_Services('IsLotMovedIn', LotId)
|
||||
If MovedIn then
|
||||
Lot_Services('MoveOutLot', LotId, CloseUserId)
|
||||
If Error_Services('HasError') then
|
||||
ErrorMessage = Error_Services('GetMessage')
|
||||
end else
|
||||
ErrorMessage = Error_Services('GetMessage')
|
||||
end
|
||||
end else
|
||||
Lot_Services('MoveInLot', LotId, CloseUserId)
|
||||
If Error_Services('NoError') then
|
||||
If Lot_Services('IsLastOperation', LotId, ThisLotOperationId) then
|
||||
Lot_Services('MoveOutLot', LotId, CloseUserId)
|
||||
If Error_Services('HasError') then
|
||||
ErrorMessage = Error_Services('GetMessage')
|
||||
end
|
||||
end
|
||||
end else
|
||||
ErrorMessage = Error_Services('GetMessage')
|
||||
end
|
||||
end
|
||||
end
|
||||
end else
|
||||
ErrorMessage = Error_Services('GetMessage')
|
||||
@ -1326,31 +1357,12 @@ Service AutoCloseTestWaferLot(LotId, CloseUserId)
|
||||
ErrorMessage = CloseUserId : ' does not have permission to close this lot.'
|
||||
end
|
||||
If ErrorMessage EQ '' then
|
||||
// Close Lot as there were no validation failures.
|
||||
Lot_Services('CloseLot', LotId)
|
||||
If Error_Services('NoError') then
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = LotId
|
||||
LogData<3> = CloseUserId
|
||||
LogData<4> = 'Successfully marked lot as closed.'
|
||||
Logging_Services('AppendLog', objLotClosureLog, LogData, @RM, @FM, False$)
|
||||
end else
|
||||
ErrorMessage = Error_Services('GetMessage')
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = LotId
|
||||
LogData<3> = CloseUserId
|
||||
LogData<4> = 'Error marking lot as closed.' : ErrorMessage
|
||||
Logging_Services('AppendLog', objLotClosureLog, LogData, @RM, @FM, False$)
|
||||
// Send a message to FI
|
||||
Recipients = Xlate('NOTIFICATION', 'FI_SUPPORT', NOTIFICATION_USER_ID$, 'X')
|
||||
SentFrom = 'SYSTEM'
|
||||
Subject = 'TEST WAFER LOT AUTO-CLOSURE FAILURE'
|
||||
Message = 'Error in ' : service : ' with lot id ' : LotId : ' attempting to set CLOSE flag on lot. ' : ErrorMessage
|
||||
Obj_Notes('Create',Recipients:@RM:SentFrom:@RM:Subject:@RM:Message)
|
||||
Error_Services('Add', 'Error in ' : service : ' with lot ' : LotId : ':' : ErrorMessage)
|
||||
end
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = LotId
|
||||
LogData<3> = CloseUserId
|
||||
LogData<4> = 'Successfully marked lot as closed.'
|
||||
Logging_Services('AppendLog', objLotClosureLog, LogData, @RM, @FM, False$)
|
||||
end else
|
||||
ErrorMessage = 'Error in ' : service : ' with lot ' : LotId : ':' : ErrorMessage
|
||||
LogData = ''
|
||||
@ -1413,7 +1425,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' : SD$ : LotId : SD$ : 'SYSTEM'
|
||||
ServiceParms = 'AutoCloseLot' : SD$ : LotId : SD$ : 'SYSTEM'
|
||||
Service_Services('PostProcedure', 'LOT_SERVICES', ServiceParms)
|
||||
If Error_Services('HasError') then
|
||||
Recipients = Xlate('NOTIFICATION', 'FI_SUPPORT', NOTIFICATION_USER_ID$, 'X')
|
||||
@ -1619,3 +1631,4 @@ end service
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
@ -82,12 +82,15 @@ $Insert NOTIFICATION_EQUATES
|
||||
$Insert RLIST_EQUATES
|
||||
$Insert WM_OUT_EQUATES
|
||||
$Insert IQS_VIOL_DATA_EQUATES
|
||||
$Insert FEATURE_FLAGS_EQUATES
|
||||
|
||||
Common /MetrologyServices/ MachineType@, LegacyLotId@
|
||||
|
||||
Equ RETRY_ATTEMPTS$ TO 3
|
||||
Equ MINUTES_UNTIL_RETRY$ TO 3
|
||||
|
||||
Equ IMPORT_VALIDATION_IDX$ TO 99
|
||||
|
||||
Equ ORP$THICK_READS TO 1
|
||||
Equ ORP$SHEET_RHO_READS TO 2
|
||||
Equ ORP$HGCV1_READS TO 3
|
||||
@ -338,6 +341,7 @@ Service GetHgCV(Handle)
|
||||
Result<5> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].PSN'); // PSN
|
||||
Result<8> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].Wafer'); // LayerZonePair
|
||||
Result<11> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].Date'); // Timestamp
|
||||
Result<IMPORT_VALIDATION_IDX$> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].IndexOf'); // Validation
|
||||
END
|
||||
ForOffset = (RecordIndex - 1) * FieldPositionIncrement;
|
||||
Result<FieldPosition + ForOffset> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].Site'); // Position
|
||||
@ -404,6 +408,7 @@ end service
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service ImportMetrologyFiles(Machine=MACHINE_TYPES)
|
||||
|
||||
ErrMsg = ''
|
||||
If Machine NE '' then
|
||||
hSysLists = Database_Services('GetTableHandle', 'SYSLISTS')
|
||||
Lock hSysLists, ServiceKeyID:'*':Machine then
|
||||
@ -430,10 +435,10 @@ Service ImportMetrologyFiles(Machine=MACHINE_TYPES)
|
||||
Case Machine _EQC 'SRP'
|
||||
DataPath = Environment_Services('GetApplicationRootPath') : '\Metrology\MET08ANLYSDIFAAST230\Source\MET08ANLYSDIFAAST230\'
|
||||
Case Otherwise$
|
||||
Error_Services('Add', 'Error in ':Service:' service. Unsupported Machine "':Machine:'" passed into service')
|
||||
ErrMsg = 'Error in ':Service:' service. Unsupported Machine "':Machine:'" passed into service'
|
||||
End Case
|
||||
|
||||
If Error_Services('NoError') then
|
||||
If Error_Services('NoError') and ErrMsg EQ '' then
|
||||
SearchPattern = '*.pdsf';
|
||||
InitDir DataPath:SearchPattern
|
||||
FileList = DirList()
|
||||
@ -525,23 +530,28 @@ Service ImportMetrologyFiles(Machine=MACHINE_TYPES)
|
||||
*************************
|
||||
* Import metrology data *
|
||||
*************************
|
||||
|
||||
IF RunData NE '' then
|
||||
Metrology_Services('ImportMetrologyRunData', Machine, DataPath, FileName, RunData)
|
||||
AllowImport = Metrology_Services('AllowImport', RunData)
|
||||
If AllowImport EQ True$ then
|
||||
Metrology_Services('ImportMetrologyRunData', Machine, DataPath, FileName, RunData)
|
||||
end else
|
||||
ErrMsg = 'Import validation failed'
|
||||
Metrology_Services('LogResults', PSN, Machine, 'UID002', Service : ' : ' : ErrMsg);
|
||||
end
|
||||
END ELSE
|
||||
Error_Services('Add', 'RunData argument was missing')
|
||||
Metrology_Services('LogResults', '', '', 'UID001', Service : ' : ' : Error_Services('GetMessage'))
|
||||
ErrMsg = 'RunData argument was missing'
|
||||
Metrology_Services('LogResults', '', '', 'UID001', Service : ' : ' : ErrMsg)
|
||||
END
|
||||
|
||||
If Error_Services('NoError') then
|
||||
Continue = True$
|
||||
If Error_Services('NoError') and ErrMsg EQ '' then
|
||||
Continue = True$
|
||||
end else
|
||||
ErrorMessage = Error_Services('GetMessage')
|
||||
FQAError = IndexC(ErrorMessage, 'FQA has already been signed', 1)
|
||||
If ( Index(ErrorMessage, 'UID002', 1) and (ImportAttempts LE RETRY_ATTEMPTS$) and Not(FQAError) ) then
|
||||
Continue = False$
|
||||
If ErrMsg EQ '' then ErrMsg = Error_Services('GetMessage')
|
||||
FQAError = IndexC(ErrMsg, 'FQA has already been signed', 1)
|
||||
If ( Index(ErrMsg, 'UID002', 1) and (ImportAttempts LE RETRY_ATTEMPTS$) and Not(FQAError) ) then
|
||||
Continue = False$
|
||||
end else
|
||||
Continue = True$
|
||||
Continue = True$
|
||||
end
|
||||
end
|
||||
|
||||
@ -561,10 +571,9 @@ Service ImportMetrologyFiles(Machine=MACHINE_TYPES)
|
||||
Metrology_Services('LogResults', '', Machine, 'UID001', 'Delete : ' : FileName : ', Size : ' : FileSize : ', Error : ' : ErrCode)
|
||||
end
|
||||
END else
|
||||
|
||||
ErrorMessage = Error_Services('GetMessage')
|
||||
If ErrMsg EQ '' then ErrMsg = Error_Services('GetMessage')
|
||||
MetrologyLog = Database_Services('ReadDataRow', 'SYSLISTS', UCase(Machine):'_METROLOGY_LOG')
|
||||
MetrologyLog := ErrorMessage : @FM
|
||||
MetrologyLog := ErrMsg : @FM
|
||||
Database_Services('WriteDataRow', 'SYSLISTS', UCase(Machine):'_METROLOGY_LOG', MetrologyLog, True$)
|
||||
end
|
||||
|
||||
@ -577,13 +586,16 @@ Service ImportMetrologyFiles(Machine=MACHINE_TYPES)
|
||||
NEXT FileLoopIndex
|
||||
|
||||
end else
|
||||
Metrology_Services('LogResults', '', '', 'UID001', Error_Services('GetMessage'))
|
||||
If ErrMsg EQ '' then ErrMsg = Error_Services('GetMessage')
|
||||
Metrology_Services('LogResults', '', '', 'UID001', ErrMsg)
|
||||
end
|
||||
Unlock hSysLists, ServiceKeyID:'*':Machine else Null
|
||||
end
|
||||
end else
|
||||
Metrology_Services('LogResults', '', '', 'UID001', 'Null Machine passed into service')
|
||||
end
|
||||
|
||||
If ErrMsg NE '' then Error_Services('Add', ErrMsg)
|
||||
|
||||
end service
|
||||
|
||||
@ -3203,6 +3215,13 @@ Service ScanNumDataPointsMatchesRdsTestSpecThickMPattern(RdsNo, RecipeLayer, Sca
|
||||
Response = MatchFound
|
||||
end service
|
||||
|
||||
Service AllowImport(RunData)
|
||||
MetrologyImportValidationFeatureFlag = Xlate('FEATURE_FLAGS', 'METROLOGY_IMPORT_VALIDATION', FEATURE_FLAGS.ENABLED$, 'X')
|
||||
FeatureDisabled = MetrologyImportValidationFeatureFlag NE True$
|
||||
ImportValidated = RunData<IMPORT_VALIDATION_IDX$> EQ '' or RunData<IMPORT_VALIDATION_IDX$> EQ 1
|
||||
Response = FeatureDisabled or ImportValidated
|
||||
end service
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Internal GoSubs
|
||||
@ -3646,3 +3665,5 @@ LoadRunDataToDatabase:
|
||||
end
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
@ -273,7 +273,8 @@ WRITE_RECORD:
|
||||
Next RDSNo
|
||||
|
||||
If (OrgQty NE NewQty) then
|
||||
Service_Services('PostProcedure', 'WORK_ORDER_SERVICES', 'UpdateScrappedQty':SD$:WorkOrderNo)
|
||||
ScrapAdj = NewQty - OrgQty
|
||||
Work_Order_Services('AdjustScrappedQty', WorkOrderNo, ScrapAdj)
|
||||
end
|
||||
|
||||
// On the write of the record, read then write associated WM_IN and WM_OUT records to trigger the WM_MFS.
|
||||
@ -294,44 +295,41 @@ WRITE_RECORD:
|
||||
Database_Services('WriteDataRow', 'WM_OUT', WMOKey, WMORec, True$, True$, False$)
|
||||
end
|
||||
|
||||
SAPTestFlag = Xlate('APP_INFO', 'SAP_TEST_FLAG', 1, 'X')
|
||||
If SAPTestFlag then
|
||||
// If NCR created after cassette has received a batch number, then inform SAP of new quantities
|
||||
SAPBatchNo = Xlate('WO_MAT', WOMatKey, 'SAP_BATCH_NO', 'X')
|
||||
IF SAPBatchNo NE '' THEN
|
||||
|
||||
IF (ReactorType = 'EPP') OR (ReactorType = 'EpiPro') THEN
|
||||
WMOutKey = Xlate('WO_MAT', WOMatKey, 'WMO_KEY', 'X')
|
||||
CassStatus = Xlate('WM_OUT', WMOutKey, 'CURR_STATUS', 'X')
|
||||
|
||||
END ELSE
|
||||
// Non-EpiPro
|
||||
RDSNo = Xlate('WO_MAT', WoMatKey, 'RDS_NO', 'X')
|
||||
CassStatus = Xlate('RDS', RDSNo, 'CURR_STATUS', 'X')
|
||||
END
|
||||
|
||||
// Add SAP transaction
|
||||
IF OrigRecord = '' THEN
|
||||
TransQty = NewQty
|
||||
END ELSE
|
||||
TransQty = NewQty - OrgQty
|
||||
END
|
||||
IF TransQty NE 0 THEN
|
||||
obj_SAP('AddTransaction','SCRAP_IN':@RM:WorkOrderNo:@RM:CassNo:@RM:TransQty)
|
||||
|
||||
If TransQty LT 0 then
|
||||
// Log negative SAP scrap transaction to capture metrics to submit for SAP change request
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = @User4
|
||||
LogData<3> = Name
|
||||
LogData<4> = SAPBatchNo
|
||||
LogData<5> = TransQty
|
||||
Logging_Services('AppendLog', objSAPLog, LogData, @RM, @FM)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
// If NCR created after cassette has received a batch number, then inform SAP of new quantities
|
||||
SAPBatchNo = Xlate('WO_MAT', WOMatKey, 'SAP_BATCH_NO', 'X')
|
||||
IF SAPBatchNo NE '' THEN
|
||||
|
||||
IF (ReactorType = 'EPP') OR (ReactorType = 'EpiPro') THEN
|
||||
WMOutKey = Xlate('WO_MAT', WOMatKey, 'WMO_KEY', 'X')
|
||||
CassStatus = Xlate('WM_OUT', WMOutKey, 'CURR_STATUS', 'X')
|
||||
|
||||
END ELSE
|
||||
// Non-EpiPro
|
||||
RDSNo = Xlate('WO_MAT', WoMatKey, 'RDS_NO', 'X')
|
||||
CassStatus = Xlate('RDS', RDSNo, 'CURR_STATUS', 'X')
|
||||
END
|
||||
|
||||
// Add SAP transaction
|
||||
IF OrigRecord = '' THEN
|
||||
TransQty = NewQty
|
||||
END ELSE
|
||||
TransQty = NewQty - OrgQty
|
||||
END
|
||||
IF TransQty NE 0 THEN
|
||||
obj_SAP('AddTransaction','SCRAP_IN':@RM:WorkOrderNo:@RM:CassNo:@RM:TransQty)
|
||||
|
||||
If TransQty LT 0 then
|
||||
// Log negative SAP scrap transaction to capture metrics to submit for SAP change request
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = @User4
|
||||
LogData<3> = Name
|
||||
LogData<4> = SAPBatchNo
|
||||
LogData<5> = TransQty
|
||||
Logging_Services('AppendLog', objSAPLog, LogData, @RM, @FM)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
OrigStatus = OrigRecord<NCR_STATUS$>
|
||||
NewStatus = Record<NCR_STATUS$>
|
||||
@ -666,6 +664,7 @@ WRITE_RECORD:
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return
|
||||
|
||||
DELETE_RECORD_PRE:
|
||||
@ -746,11 +745,13 @@ DELETE_RECORD:
|
||||
Pass_To_SQL('WRITE', 'RDS', RDSNo)
|
||||
Next RDSNo
|
||||
|
||||
Service_Services('PostProcedure', 'WORK_ORDER_SERVICES', 'UpdateScrappedQty':SD$:WorkOrderNo)
|
||||
OrgQty = Sum(obj_NCR('RejQty',NCRNo:@RM:OrigRecord))
|
||||
NewQty = 0
|
||||
AdjustQty = NewQty - OrgQty
|
||||
Work_Order_Services('AdjustScrappedQty', WorkOrderNo, AdjustQty)
|
||||
|
||||
return
|
||||
|
||||
|
||||
// ----- Internal Methods ----------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
@ -1,587 +0,0 @@
|
||||
Function NDW_Main_Events_Dev(CtrlEntId, Event, @PARAMS)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from Infineon.
|
||||
|
||||
Name : NDW_Main_Events
|
||||
|
||||
Description : This function acts as a commuter module for all events related to this window.
|
||||
|
||||
Notes : Commuter Modules are automatically called from the Promoted_Events function which is called by the
|
||||
application-specific promoted event handler. This makes it possible to add QuickEvents that need to
|
||||
execute Basic+ logic without having use the Form Designer to make the association, although this is
|
||||
limited to the events which are currently promoted.
|
||||
|
||||
If the form needs to call the commuter module directly then the QuickEvent parameters should be
|
||||
formatted like this:
|
||||
|
||||
'@SELF','@EVENT',['@PARAM1','@PARAMx']
|
||||
|
||||
Parameters :
|
||||
CtrlEntId [in] -- The fully qualified name of the control calling the promoted event
|
||||
Event [in] -- The event being executed. See the Notes section regarding "PRE" events
|
||||
Param1-15 [in] -- Additional event parameter holders
|
||||
EventFlow [out] -- Set to 1 or 0 so the calling event knows whether or not to chain forward. See comments in
|
||||
EVENT_SETUP insert
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
05/08/18 dmb Created initial commuter module.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
#Window NDW_MAIN
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert EVENT_SETUP
|
||||
$insert MSG_EQUATES
|
||||
$insert ENVIRON_CONSTANTS
|
||||
$insert NOTIFICATION_EQUATES
|
||||
$insert REACT_MODE_EQU
|
||||
$insert REACT_UTIL_EQU
|
||||
$insert TOOL_EQUATES
|
||||
$insert RLIST_EQUATES
|
||||
|
||||
Equ WIDTH$ to 3
|
||||
Equ HEIGHT$ to 4
|
||||
|
||||
Declare function GetCommandLine, MemberOf, obj_Install, obj_Notes_Sent, FindWindow, ShowWindow, Next_Key
|
||||
Declare function Environment_Services, Reactor_Services, Database_Services, obj_Tool, Messaging_Services, SRP_JSON
|
||||
Declare subroutine Set_Env, obj_Appwindow, Get_BMP_Info, obj_Login, obj_Calib_List, End_Window, Start_Window, Next_Key
|
||||
Declare subroutine Database_Services, obj_React_Status, Obj_React_Mode, obj_Tool_Log, RList, Messaging_Services, RTP27
|
||||
|
||||
SubclassInfo = Form_Services('FindSubclassControl')
|
||||
Subclass = SubclassInfo<1>
|
||||
|
||||
// Update the arguments so that the OpenInsight OLE event will treate the ActiveX event as a native event handler.
|
||||
If Event EQ 'OLE' then
|
||||
Transfer Event to OIEvent
|
||||
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
|
||||
end
|
||||
|
||||
GoToEvent Event for CtrlEntID
|
||||
|
||||
Return EventFlow else EVENT_CONTINUE$
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Events
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Event WINDOW.CREATE(CreateParam)
|
||||
|
||||
GoSub Setup_OLE_Controls
|
||||
|
||||
Server = Environment_Services('GetServer')
|
||||
Command = GetCommandLine()
|
||||
Command = Trim(Command)
|
||||
Convert ' ' to @FM in Command
|
||||
Convert @Lower_Case to @Upper_Case in Command
|
||||
NumArguments = DCount(Command, @FM)
|
||||
Done = False$
|
||||
For ArgCnt = 1 to NumArguments
|
||||
Argument = Command<ArgCnt>
|
||||
If Argument[1, 3] EQ '/UN' then
|
||||
@USER4 = Argument[-1, 'B=']
|
||||
Done = True$
|
||||
end
|
||||
Until Done
|
||||
Next ArgCnt
|
||||
|
||||
|
||||
IF @USER4 = 'INDEXER' THEN
|
||||
void = Start_Window( 'IDXSVR', '', '', '', '' )
|
||||
Post_Event(@Window, 'CLOSE')
|
||||
RETURN 0
|
||||
END
|
||||
|
||||
IF @USER4 = 'VISION' THEN
|
||||
void = Start_Window( 'VISION_COMM', @WINDOW, '', '', '' )
|
||||
RETURN 0
|
||||
END
|
||||
|
||||
IF @USER4 = 'ADCSVR' THEN
|
||||
* void = Start_Window( 'ADCSVR', @window, '', '', '' )
|
||||
void = Start_Window( 'SERVICE_MANAGER', '', '', '', '' )
|
||||
Post_Event(@Window, 'CLOSE')
|
||||
RETURN 0
|
||||
END
|
||||
|
||||
IF @USER4 = 'SAP' THEN
|
||||
void = Start_Window( 'DIALOG_SAP_COMM', '', '', '', '')
|
||||
Post_Event(@Window, 'CLOSE')
|
||||
RETURN 0
|
||||
END
|
||||
|
||||
Start_Window('NDW_MESSAGING_PROCESSOR', @Window)
|
||||
|
||||
@USER4 = @USERNAME
|
||||
|
||||
AccessLevel = Dialog_Box('LOGON', @Window)
|
||||
If (AccessLevel EQ -1) OR (AccessLevel EQ '') then
|
||||
Set_Property(@Window, '@CLOSE', 1)
|
||||
end
|
||||
If AccessLevel GE 0 then
|
||||
|
||||
IF MemberOf(@USER4, 'OI_ADMIN') OR @USER4 = 'MIS' THEN
|
||||
Set_Env(ENV_DEBUGGER_ENABLED$, 1, 1)
|
||||
Set_Env(ENV_DEBUGGER_INTERCEPT_PROC$,'',1)
|
||||
|
||||
* This section added 9/17/2014 JCH for FTPQueueing for manual batch transmits
|
||||
|
||||
OPEN 'FTP_QUEUE' TO FTPQueue THEN
|
||||
SELECT FTPQueue
|
||||
|
||||
RecCnt = 0
|
||||
Done = 0
|
||||
LOOP
|
||||
READNEXT QueueKey ELSE Done = 1
|
||||
UNTIL Done
|
||||
RecCnt += 1
|
||||
REPEAT
|
||||
|
||||
Set_Property(@Window : '.PUB_SHIP_DATA_QUEUE','DEFPROP',RecCnt:' in Ship Data Queue')
|
||||
Set_Property(@Window : '.PUB_SHIP_DATA_QUEUE','VISIBLE',1)
|
||||
END
|
||||
|
||||
END ELSE
|
||||
|
||||
Set_Env(ENV_DEBUGGER_ENABLED$, 2, 1)
|
||||
Set_Env(ENV_DEBUGGER_INTERCEPT_PROC$,'EPI_USER_DEBUG',1)
|
||||
|
||||
Set_Property(@Window : '.PUB_SHIP_DATA_QUEUE','VISIBLE',0)
|
||||
END
|
||||
|
||||
|
||||
IF MemberOf(@USER4,'EMAIL_PDF_QUEUE') THEN
|
||||
|
||||
* This section added 7/31/2015 JCH for Shipment eMail Queueing for manual batch transmits
|
||||
|
||||
OPEN 'SHIP_EMAIL_QUEUE' TO Ship_eMailQueue THEN
|
||||
SELECT Ship_eMailQueue
|
||||
|
||||
RecCnt = 0
|
||||
Done = 0
|
||||
LOOP
|
||||
READNEXT QueueKey ELSE Done = 1
|
||||
UNTIL Done
|
||||
RecCnt += 1
|
||||
REPEAT
|
||||
|
||||
Set_Property(@Window : '.PUB_SHIP_DOC_QUEUE','DEFPROP',RecCnt:' in Ship Doc Queue')
|
||||
Set_Property(@Window : '.PUB_SHIP_DOC_QUEUE','VISIBLE',1)
|
||||
END
|
||||
|
||||
END
|
||||
|
||||
GraphicPath = obj_Install('Get_Prop','ColorBMP')
|
||||
|
||||
IF GraphicPath NE '' THEN
|
||||
Set_Property(@WINDOW:'.BITMAP_2','BITMAP',GraphicPath)
|
||||
Get_BMP_Info(GraphicPath,BmSize,BmWidth,BmHeight)
|
||||
|
||||
BMAspectRatio = BmWidth/BmHeight
|
||||
|
||||
MainSize = Get_Property(@WINDOW,'SIZE')
|
||||
|
||||
WinWidth = MainSize<WIDTH$>
|
||||
WinHeight = MainSize<HEIGHT$>
|
||||
|
||||
IF BmHeight > INT(WinHeight * .666) THEN
|
||||
Set_Property(@WINDOW:'.BITMAP_2','IMAGECLIP',0) ;* Allow Resize of bitmap
|
||||
BmDispHeight = INT(WinHeight * .666)
|
||||
BmDispWidth = INT(BmDispHeight*(BmWidth/BmHeight))
|
||||
END ELSE
|
||||
Set_Property(@WINDOW:'.BITMAP_2','IMAGECLIP',0) ;* Allow Resize of bitmap
|
||||
BmDispHeight = INT(WinHeight * .20)
|
||||
BmDispWidth = INT(BmDispHeight * BMAspectRatio)
|
||||
END
|
||||
|
||||
Xorg = INT((WinWidth - BmDispWidth) / 2 )
|
||||
Yorg = INT((WinHeight - BmDispHeight) / 3)
|
||||
|
||||
Set_Property(@WINDOW:'.BITMAP_2','SIZE',Xorg:@FM:Yorg:@FM:BmDispWidth:@FM:BmDispHeight)
|
||||
Set_Property(@WINDOW:'.BITMAP_2','VISIBLE',1)
|
||||
END
|
||||
|
||||
Company = obj_Install('Get_Prop','CompTitle')
|
||||
WinTitle = Get_Property(@WINDOW,'TEXT')
|
||||
Machine = ''
|
||||
If (Server EQ 'MESST6501') or (Server EQ 'MESST6502') or (Server EQ 'MESTST1006')then
|
||||
Machine = 'Server'
|
||||
end else
|
||||
Machine = 'Client'
|
||||
end
|
||||
|
||||
WinTitle = Get_Property(@WINDOW,'TEXT')
|
||||
LSL2Version = Xlate('LSL_USERS', @User4, 'LSL2_VERSION', 'X')
|
||||
OCXVersion = Xlate('LSL_USERS', @User4, 'OCX_VERSION', 'X')
|
||||
Set_Property(@WINDOW,'TEXT',Company:' ':WinTitle: ' - ':Machine: ' - v':LSL2Version:' - ocx.v':OCXVersion)
|
||||
|
||||
rv = Set_Property(@WINDOW:'.CURRENT_USER', 'TEXT', 'User: ':oconv( @user4, '[XLATE_CONV,LSL_USERS*FIRST_LAST]' ))
|
||||
rv = Set_Property(@WINDOW:'.OLE_PIC_CURRENT_USER','OLE.Caption','User: ':OCONV( @USER4, '[XLATE_CONV,LSL_USERS*FIRST_LAST]' ))
|
||||
rv = Set_Property(@WINDOW:'.GROUP_1', 'VISIBLE', 1)
|
||||
|
||||
Recipients = XLATE('NOTIFICATION','CONFIG_LIMITED',NOTIFICATION_USER_ID$,'X')
|
||||
|
||||
LOCATE @USER4 IN Recipients USING @VM SETTING Pos THEN
|
||||
obj_Login('LateShip')
|
||||
END
|
||||
|
||||
NotesSent = obj_Notes_Sent('GetUserKeys',@USER4)
|
||||
NewMessages = XLATE('NOTE_PTRS',@USER4,'NEW_MESSAGES','X')
|
||||
|
||||
IF NotesSent NE '' OR NewMessages > 0 THEN
|
||||
Void = Start_Window( 'NOTE_PTRS', @WINDOW, '*CENTER', '', '' )
|
||||
END
|
||||
|
||||
IF MemberOf(@USER4, 'SPEC_CHANGE') OR MemberOf(@USER4, 'OI_ADMIN') THEN
|
||||
Set_Property(@WINDOW:'.MENU.ENGINEERING.TOOL_CLASS_-_RECIPES__PATTERNS','VISIBLE',1)
|
||||
END ELSE
|
||||
Set_Property(@WINDOW:'.MENU.ENGINEERING.TOOL_CLASS_-_RECIPES__PATTERNS','VISIBLE',0)
|
||||
END
|
||||
|
||||
Ctrls = @WINDOW:'.MENU.ADMIN.FABTIME_SUPPORT':@RM ; Props = 'ENABLED':@RM
|
||||
Ctrls := @WINDOW:'.MENU.MAINT.REACTOR_MAINTENANCE':@RM ; Props := 'ENABLED':@RM
|
||||
Ctrls := @WINDOW:'.MENU.ADM.SYSTEM_CONFIG':@RM ; Props := 'ENABLED':@RM
|
||||
Ctrls := @WINDOW:'.MENU.ADM.TOOLS':@RM ; Props := 'ENABLED':@RM
|
||||
Ctrls := @WINDOW:'.MENU.ADM.RAS':@RM ; Props := 'ENABLED':@RM
|
||||
Ctrls := @WINDOW:'.MENU.ADM.DEVELOPER':@RM ; Props := 'ENABLED':@RM
|
||||
Ctrls := @WINDOW:'.MENU.ADMIN.DEV.ARCHIVE' ; Props := 'ENABLED'
|
||||
IF Memberof(@user4, 'OI_ADMIN') THEN
|
||||
Vals = 1
|
||||
END ELSE
|
||||
Vals = 0
|
||||
END
|
||||
Set_Property(Ctrls,Props,Vals) ; * Sets the enabled property ON/OFF for the record mark delimited variables Ctrls,Props, and Vals
|
||||
|
||||
Ctrls := @WINDOW:'.MENU.ADMIN.SAP_INTERFACE':@RM ; Props := 'ENABLED':@RM
|
||||
Ctrls := @WINDOW:'.MENU.ADM.WAREHOUSE':@RM ; Props := 'ENABLED':@RM
|
||||
Ctrls := @WINDOW:'.MENU.ADMIN.SAP_INTERFACE.SAP_COMM_MONITOR':@RM ; Props := 'VISIBLE':@RM
|
||||
|
||||
IF Memberof(@user4, 'OI_ADMIN') OR Memberof(@user4, 'OI_SUPERUSER') THEN
|
||||
Vals = 1
|
||||
END ELSE
|
||||
Vals = 0
|
||||
END
|
||||
Set_Property(Ctrls,Props,Vals) ; * Sets the enabled property ON/OFF for the record mark delimited variables Ctrls,Props, and Vals
|
||||
|
||||
Ctrls = @WINDOW:'.MENU.ADM.THRUPUT_TARGETS':@RM ; Props = 'ENABLED':@RM
|
||||
Ctrls := @WINDOW:'.MENU.PROD.REACTOR_RUN' ; Props := 'ENABLED'
|
||||
IF Memberof(@user4,'CONFIG_LIMITED') THEN
|
||||
Vals = 1
|
||||
END ELSE
|
||||
Vals = 0
|
||||
END
|
||||
Set_Property(Ctrls,Props,Vals) ; * Sets the enabled property ON/OFF for the record mark delimited variables Ctrls,Props, and Vals
|
||||
|
||||
If Not(MemberOf(@USER4, 'LEAD')) AND Not(MemberOf(@USER4, 'SUPERVISOR')) then
|
||||
Set_Property(@Window : '.MENU.ADMIN.TOOLS_EVAC', 'VISIBLE', 0)
|
||||
end
|
||||
|
||||
If @User4 NE 'DAN_CR' then
|
||||
Set_Property(@Window : '.MENU.MATERIAL.PTO_MATERIAL_SCAN', 'VISIBLE', 0)
|
||||
end
|
||||
|
||||
CalDueRecipients = XLATE('NOTIFICATION','CALIB_DUE_NOTIFY',NOTIFICATION_USER_ID$,'X')
|
||||
|
||||
LOCATE @USER4 IN CalDueRecipients USING @VM SETTING POS THEN
|
||||
obj_Calib_List('SendReminders') ;* New system added 3/18/2010 JCH
|
||||
END
|
||||
|
||||
stat = Set_Property(@WINDOW,'TIMER',1200000:@FM:0) ;* Start the Keep Alive Timer event and run every 20 Minutes * * * * * * * * * * * *
|
||||
stat = Set_Property(@WINDOW,'STATUSLINE',@WINDOW:'.STATUS_LINE') ;* Setup status line
|
||||
|
||||
SRP_Show_Window(@Window, '', 'C', 'C', 1, '', False$, False$)
|
||||
Eventflow = 0
|
||||
end else
|
||||
End_Window(@Window)
|
||||
end
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event WINDOW.READ()
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event WINDOW.CLOSE(CancelFlag)
|
||||
|
||||
Void = Set_Property(@WINDOW,'TIMER','')
|
||||
UNLOCK All
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event WINDOW.CLEAR(bSaveKey, bSuppressWarning, bMaintainFocus, CtrlIDFocus)
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event WINDOW.TIMER()
|
||||
|
||||
Close = Get_Property(@Window, '@CLOSE')
|
||||
CurrDTM = OCONV(Date(),'D4/'):' ':OCONV(Time(),'MTS')
|
||||
|
||||
OPEN 'SYSLISTS' TO ListsFile THEN
|
||||
Station = @STATION
|
||||
Station = Station[1,'_']
|
||||
ListKey = Station:'*KEEP_ALIVE'
|
||||
ListRec = @USERNAME:@FM:CurrDTM
|
||||
WRITE ListRec ON ListsFile,ListKey ELSE NULL
|
||||
END
|
||||
|
||||
Set_Property(@WINDOW:'.CURRENT_TIME','TEXT','Current Time: ':OCONV( TIME(), 'MTHS' ))
|
||||
Set_Property(@WINDOW:'.CURRENT_DATE','TEXT','Date: ':OCONV( DATE(), 'D2/' ))
|
||||
If Get_Property(@Window, '@CLOSE') then
|
||||
Send_Event(@Window, 'CLOSE')
|
||||
end
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event OLE_LAUNCHER.OnLaunchAttempt(Params)
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event PUB_SHIP_DATA_QUEUE.CLICK()
|
||||
|
||||
Start_Window('DIALOG_FTP_QUEUE', @Window)
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event PUB_SHIP_DOC_QUEUE.CLICK()
|
||||
|
||||
Start_Window('DIALOG_EMAIL_SHIPMENT', @Window)
|
||||
* Send_Message(@Window : '.OLE_DIRECT_CONNECT', 'OLE.Broadcast', 'Booyaa!')
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event MENU.REACT_STAT.MENU()
|
||||
|
||||
Start_Window('REACT_STATUS_EVEN',@WINDOW,'')
|
||||
Start_Window('REACT_STATUS_ODD',@WINDOW,'')
|
||||
Start_Window('NDW_TOOL_STATUS_GAN',@WINDOW,'')
|
||||
Start_Window('TOOL_STATUS',@WINDOW,'')
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event MENU.WIN.PROD.RMC.MENU()
|
||||
|
||||
IF MemberOf(@USER4, 'DATA_ENTRY') OR MemberOf(@USER4, 'SUPERVISOR') THEN
|
||||
Start_Window('REACT_MODE_CHG', @WINDOW, '*CENTER','','')
|
||||
END ELSE
|
||||
MsgInfo = ''
|
||||
MsgInfo<MCOL$> = -2
|
||||
MsgInfo<MROW$> = -2
|
||||
MsgInfo<MTEXT$> = 'You must be a Supervisor or Technician in order to change reactor modes...'
|
||||
MsgInfo<MICON$> = 'H'
|
||||
void = Msg('',MsgInfo)
|
||||
END
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event MENU.ADMIN.SAP_INTERFACE.SAP_COMM_MONITOR.MENU()
|
||||
|
||||
rv = Start_Window('DIALOG_SAP_COMM', '')
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event MENU.ADMIN.TOOLS_EVAC.MENU()
|
||||
|
||||
// Require the user to acknowledge using their application password.
|
||||
* Valid = Dialog_Box('QUOTE_SIG_PWD_ENTRY', @WINDOW, @USER4 : @VM : XLATE('LSL_USERS', @USER4, LSL_USERS_PASSWORD$, 'X'))
|
||||
MsgOverride = ''
|
||||
MsgOverride<MDEFBTN$> = 2 ; // Default to Cancel button.
|
||||
Valid = Msg(@Window, MsgOverride, 'OK_CANCEL', '', 'Evac Procedures' : @FM : 'Please confirm that you wish to put all tools into Evac mode.')
|
||||
|
||||
If Valid EQ '' then
|
||||
UserName = Oconv(@USER4, '[XLATE_CONV,LSL_USERS*FIRST_LAST]')
|
||||
CurrDate = Date()
|
||||
CurrTime = Time()
|
||||
EvacMode = 'Facilities (UnSched)'
|
||||
EvacNotes = 'Fab Evac'
|
||||
NumberTools = 0
|
||||
|
||||
// Step 1 - Update the Reactor Tools. This logic is based on the script event handler in the REACT_MODE_CHG.APPLY
|
||||
// pushbutton control.
|
||||
|
||||
ReactorNos = Reactor_Services('GetReactorNumbers')
|
||||
For Each ReactorNo in ReactorNos using @FM
|
||||
ReactModeRow = Database_Services('ReadDataRow', 'CONFIG', 'REACT_MODE' : ReactorNo)
|
||||
ReactModeDesc = ReactModeRow<Mode$>
|
||||
If ReactModeDesc _NEC 'Shutdown' then
|
||||
ReactUtilID = ReactModeRow<ReactUtilID$>
|
||||
ReactLogID = ReactModeRow<ReactorLogID$>
|
||||
If ReactUtilID NE '' then
|
||||
ReactUtilRow = Database_Services('ReadDataRow', 'REACT_UTIL', ReactUtilID)
|
||||
ReactUtilRow<REACT_UTIL_END_DATE$> = CurrDate
|
||||
ReactUtilRow<REACT_UTIL_END_TIME$> = CurrTime
|
||||
ReactUtilRow<REACT_UTIL_MODE_FINISH_USER$> = @USER4
|
||||
Database_Services('WriteDataRow', 'REACT_UTIL', ReactUtilID, ReactUtilRow, True$, '', True$)
|
||||
end else
|
||||
ReactUtilRow = ''
|
||||
end
|
||||
|
||||
hReactUtil = Database_Services('GetTableHandle', 'REACT_UTIL')
|
||||
KeyToUse = Next_Key('REACT_UTIL', hReactUtil, 'NEXT', '')
|
||||
NewReactUtilRow = ''
|
||||
NewReactUtilRow<REACT_UTIL_REACTOR$> = ReactorNo
|
||||
NewReactUtilRow<REACT_UTIL_NOTES$> = EvacNotes
|
||||
NewReactUtilRow<REACT_UTIL_MODE$> = 'S'
|
||||
NewReactUtilRow<REACT_UTIL_START_DATE$> = CurrDate
|
||||
NewReactUtilRow<REACT_UTIL_START_TIME$> = CurrTime
|
||||
NewReactUtilRow<REACT_UTIL_MODE_START_USER$> = @USER4
|
||||
WorkOrderNo = ReactUtilRow<REACT_UTIL_WO$>
|
||||
NewReactUtilRow<REACT_UTIL_WO$> = WorkOrderNo
|
||||
NewReactUtilRow<REACT_UTIL_CUST_NO$> = Xlate('WO_LOG', WorkOrderNo, WO_LOG_CUST_NO$, 'X')
|
||||
NewReactUtilRow<REACT_UTIL_REACTOR_LOG_ID$> = ''
|
||||
Database_Services('WriteDataRow', 'REACT_UTIL', KeyToUse, NewReactUtilRow, True$, '', True$)
|
||||
Database_Services('ReleaseKeyIDLock', 'REACT_UTIL', KeyToUse)
|
||||
Next_Key('REACT_UTIL', HReactUtil, 'UPDATE', KeyToUse)
|
||||
|
||||
NewReactModeRow = ''
|
||||
NewReactModeRow<Mode$> = EvacMode
|
||||
NewReactModeRow<Username$> = UserName
|
||||
NewReactModeRow<Date$> = Oconv(CurrDate, 'D4/')
|
||||
NewReactModeRow<Time$> = Oconv(CurrTime, 'MTH')
|
||||
NewReactModeRow<ReactUtilID$> = KeyToUse
|
||||
NewReactModeRow<ReactorLogID$> = ''
|
||||
NewReactModeRow<Note$> = EvacNotes
|
||||
|
||||
CurrDTM = NewReactModeRow<Date$> : ' ' : NewReactModeRow<Time$>
|
||||
PrevModeKey = Xlate('REACTOR_CHILD_KEY_IDS', ReactorNo, REACTOR_CHILD_KEY_IDS_REACT_MODE_KEY_IDS$, 'X')<1, 1>
|
||||
OpenDTM = Field(PrevModeKey, '*', 2)
|
||||
OpenDTM = Oconv(OpenDTM, 'DT4/^S')
|
||||
CurrMode = Oconv(Xlate('REACTOR', ReactorNo, 'CURR_MODE', 'X'), '[REACT_MODE_CONV]')
|
||||
ProdModes = 'Production':@VM
|
||||
ProdModes := 'Production (incr sampling)'
|
||||
Locate CurrMode in ProdModes Using @VM Setting vPos then
|
||||
Locate EvacMode in ProdModes Using @VM Setting vPos else
|
||||
OutOfProdDTM = NewReactModeRow<Date$> : ' ' : NewReactModeRow<Time$>
|
||||
obj_React_Status('SetOutOfProdDTM', ReactorNo : @RM : OutOfProdDTM)
|
||||
end ; // End of check on New Mode
|
||||
end ; // End of check on Current Mode
|
||||
|
||||
Database_Services('WriteDataRow', 'CONFIG', 'REACT_MODE' : ReactorNo, NewReactModeRow, True$, '', True$)
|
||||
If Error_Services('NoError') then
|
||||
NumberTools += 1
|
||||
If CurrMode NE '' then
|
||||
// Close the currently active mode
|
||||
crParms = ReactorNo
|
||||
crParms := @RM : OpenDTM
|
||||
crParms := @RM : CurrDTM
|
||||
crParms := @RM : @USER4
|
||||
crParms := @RM : NewReactModeRow<Note$>
|
||||
crParms := @RM : NewReactModeRow<ReactUtilID$>
|
||||
crParms := @RM : NewReactModeRow<ReactorLogID$>
|
||||
obj_React_Mode('Close', crParms)
|
||||
end
|
||||
// Create new active mode record
|
||||
crParms = ReactorNo
|
||||
crParms := @RM : CurrDTM
|
||||
crParms := @RM : @USER4
|
||||
crParms := @RM : NewReactModeRow<Mode$>
|
||||
crParms := @RM : NewReactModeRow<Note$>
|
||||
crParms := @RM : NewReactModeRow<ReactUtilID$>
|
||||
crParms := @RM : NewReactModeRow<ReactorLogID$>
|
||||
obj_React_Mode('Create', crParms)
|
||||
end
|
||||
end
|
||||
Next ReactorNo
|
||||
|
||||
// Step 2 - Update the Silicon Tools. This logic is based on the TBClick gosub in the Comm_Dialog_Tool_Status
|
||||
// commuter module. This commuter module supports the TOOL_STATUS form.
|
||||
|
||||
ToolIDs = obj_Tool('KeysByType') ; // All tool IDs sorted by TOOL_TYPE
|
||||
For Each ToolID in ToolIDs using @VM
|
||||
ToolRow = Database_Services('ReadDataRow', 'TOOL', ToolID)
|
||||
CurrModeKey = ToolRow<TOOL_CURR_MODE_KEY$>
|
||||
CurrMode = Xlate('TOOL', ToolID, 'CURR_MODE', 'X')<1, 1>
|
||||
If CurrMode NE 'OUT' AND CurrMode NE 'FACILITIES (UnSched)' then
|
||||
If CurrMode EQ '' then
|
||||
obj_Tool_Log('InitialLog', ToolID)
|
||||
CurrMode = 'OUT'
|
||||
end
|
||||
|
||||
NumberTools += 1
|
||||
CurrModeDTM = Field(CurrModeKey, '*', 2)
|
||||
CurrModeDTM = Oconv(CurrModeDTM, 'DT4/^S')
|
||||
Parms = ToolID : @RM
|
||||
Parms := CurrModeDTM : @RM
|
||||
Parms := 'FACILITIES (UnSched)' : @RM
|
||||
Parms := EvacNotes
|
||||
obj_Tool_Log('SetMode', Parms)
|
||||
end
|
||||
Next ToolID
|
||||
|
||||
// Step 3 - Update the GaN Tools. This logic is based on the ToolOptions gosub in the GaN_Tool_Status commuter
|
||||
// module. This commuter module supports the GAN_TOOL_STATUS form.
|
||||
|
||||
SelectSent = 'SELECT TOOL WITH TOOL_PROC "G" AND WITH CLASS NE "G_REACT" BY TOOL_WH BY TOOL_TYPE'
|
||||
RList(SelectSent, TARGET_ACTIVELIST$, '', '', '')
|
||||
EOF = False$
|
||||
Loop
|
||||
Readnext ToolID else EOF = True$
|
||||
Until EOF
|
||||
ToolRow = Database_Services('ReadDataRow', 'TOOL', ToolID)
|
||||
CurrModeKey = ToolRow<TOOL_CURR_MODE_KEY$>
|
||||
CurrMode = Xlate('TOOL', ToolID, 'CURR_MODE', 'X')<1, 1>
|
||||
If CurrMode NE 'OUT' AND CurrMode NE 'FACILITIES (UnSched)' then
|
||||
If CurrMode EQ '' then
|
||||
obj_Tool_Log('InitialLog', ToolID)
|
||||
CurrMode = 'OUT'
|
||||
end
|
||||
|
||||
NumberTools += 1
|
||||
CurrModeDTM = Field(CurrModeKey, '*', 2)
|
||||
CurrModeDTM = Oconv(CurrModeDTM, 'DT4/^S')
|
||||
Parms = ToolID : @RM
|
||||
Parms := CurrModeDTM : @RM
|
||||
Parms := 'FACILITIES (UnSched)' : @RM
|
||||
Parms := EvacNotes
|
||||
obj_Tool_Log('SetMode', Parms)
|
||||
end
|
||||
Repeat
|
||||
Msg(@Window, '', 'OK', '', 'Evac Procedures' : @FM : NumberTools : ' tools have been placed into Evac mode.')
|
||||
end
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event MENU.ADMIN.DEVELOPER.SESSION_MANAGER.MENU()
|
||||
|
||||
rv = Start_Window('NDW_SESSION_MANAGER', '')
|
||||
|
||||
end event
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Internal GoSubs
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Setup_OLE_Controls:
|
||||
|
||||
Qualify = ''
|
||||
Qualify<1> = 1
|
||||
Qualify<4> = 0
|
||||
|
||||
Ctrl = @Window : '.OLE_LAUNCHER'
|
||||
Send_Message(Ctrl, 'QUALIFY_EVENT', 'OLE.OnLaunchAttempt', Qualify)
|
||||
|
||||
return
|
@ -1,422 +0,0 @@
|
||||
Compile function NDW_MATERIAL_TRACK_PRO_REPORT_EVENTS(CtrlEntId, Event, @PARAMS)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
Name : NDW_MATERIAL_TRACK_PRO_REPORT_EVENTS
|
||||
|
||||
Description : Commuter module for the NDW_MATERIAL_TRACK_PRO_REPORT_EVENTS form.
|
||||
|
||||
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)
|
||||
10/29/20 djs Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
#pragma precomp SRP_PreCompiler
|
||||
#window NDW_MATERIAL_TRACK_PRO_REPORT
|
||||
|
||||
Declare function Form_Services, Database_Services, RTI_Task_Submit, RTI_Task_Status, MemberOf
|
||||
Declare subroutine SRP_Show_Window, Send_Message, Set_Property, Database_Services, Material_Track, Report_Services
|
||||
Declare subroutine PlaceDialog
|
||||
|
||||
$Insert EVENT_SETUP
|
||||
$Insert LOGICAL
|
||||
$Insert REPORT_CONFIG_EQUATES
|
||||
|
||||
SubclassInfo = Form_Services('FindSubclassControl')
|
||||
Subclass = SubclassInfo<1>
|
||||
|
||||
// Update the arguments so that the OpenInsight OLE event will treate the ActiveX event as a native event handler.
|
||||
If Event EQ 'OLE' then
|
||||
Transfer Event to OIEvent
|
||||
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
|
||||
end
|
||||
|
||||
GoToEvent Event for CtrlEntId else
|
||||
// Event not implemented
|
||||
end
|
||||
|
||||
Return EventFlow or 1
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// EVENT HANDLERS
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Event WINDOW.CREATE(CreateParam)
|
||||
|
||||
RptConfigKey = 'MATERIAL_TRACK*':@User4
|
||||
If RowExists('REPORT_CONFIG', RptConfigKey) then
|
||||
UserSettings = Database_Services('ReadDataRow', 'REPORT_CONFIG', RptConfigKey)
|
||||
Set_Property(@Window:'.PUB_SAVE_SETTINGS', 'ENABLED', False$)
|
||||
end else
|
||||
UserSettings = ''
|
||||
Set_Property(@Window:'.PUB_SAVE_SETTINGS', 'ENABLED', True$)
|
||||
end
|
||||
|
||||
If MemberOf(@User4, 'OI_ADMIN') then Set_Property(@Window:'.CHK_OLD_REPORT', 'VISIBLE', True$)
|
||||
|
||||
GoSub Setup_OLE_Controls
|
||||
GoSub EnableGenerateReportButton
|
||||
|
||||
PlaceDialog(-2, -2)
|
||||
|
||||
End Event
|
||||
|
||||
|
||||
Event PUB_GEN_REPORT.CLICK()
|
||||
|
||||
// Gather settings from form
|
||||
ColFltrArray = Get_Property(@Window:'.OLE_EDT_COL_FILTER', 'OLE.ARRAY')
|
||||
LocFltrArray = Get_Property(@Window:'.OLE_EDT_LOC_FILTER', 'OLE.ARRAY')
|
||||
NoMatFlag = Get_Property(@Window:'.CHK_NO_MAT_FOUND', 'CHECK')
|
||||
OldReport = Get_Property(@Window:'.CHK_OLD_REPORT', 'CHECK')
|
||||
|
||||
RptColumns = ''
|
||||
RptLocations = ''
|
||||
|
||||
Columns = ColFltrArray<1>
|
||||
Flags = ColFltrArray<2>
|
||||
For each Column in Columns using @VM setting vPos
|
||||
ColumnEnabled = Flags<0, vPos>
|
||||
If ColumnEnabled then RptColumns<0, -1> = Column
|
||||
Next Column
|
||||
|
||||
Locations = LocFltrArray<1>
|
||||
Flags = LocFltrArray<3>
|
||||
For each Location in Locations using @VM setting vPos
|
||||
LocationEnabled = Flags<0, vPos>
|
||||
If LocationEnabled then RptLocations<0, -1> = Location
|
||||
Next Location
|
||||
|
||||
Report_Services('PrintMaterialTrackReport', RptColumns, RptLocations, NoMatFlag, OldReport)
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event PUB_SAVE_SETTINGS.CLICK()
|
||||
|
||||
RptConfigKey = 'MATERIAL_TRACK*':@User4
|
||||
If RowExists('REPORT_CONFIG', RptConfigKey) then
|
||||
UserSettings = Database_Services('ReadDataRow', 'REPORT_CONFIG', RptConfigKey)
|
||||
end else
|
||||
UserSettings = ''
|
||||
end
|
||||
|
||||
// Gather settings from form
|
||||
ColFltrArray = Get_Property(@Window:'.OLE_EDT_COL_FILTER', 'OLE.ARRAY')
|
||||
LocFltrArray = Get_Property(@Window:'.OLE_EDT_LOC_FILTER', 'OLE.ARRAY')
|
||||
NoMatFoundFlag = Get_Property(@Window:'.CHK_NO_MAT_FOUND', 'CHECK')
|
||||
RptColumns = ''
|
||||
RptLocations = ''
|
||||
|
||||
Columns = ColFltrArray<1>
|
||||
Flags = ColFltrArray<2>
|
||||
For each Column in Columns using @VM setting vPos
|
||||
ColumnEnabled = Flags<0, vPos>
|
||||
If ColumnEnabled then RptColumns<0, -1> = Column
|
||||
Next Column
|
||||
UserSettings<REPORT_CONFIG.REPORT_COLUMNS$> = Flags
|
||||
|
||||
Locations = LocFltrArray<1>
|
||||
Flags = LocFltrArray<3>
|
||||
For each Location in Locations using @VM setting vPos
|
||||
LocationEnabled = Flags<0, vPos>
|
||||
If LocationEnabled then RptLocations<0, -1> = Location
|
||||
Next Location
|
||||
UserSettings<REPORT_CONFIG.LOCATION_FILTER$> = Flags
|
||||
UserSettings<REPORT_CONFIG.NO_MAT_FOUND$> = NoMatFoundFlag
|
||||
Database_Services('WriteDataRow', 'REPORT_CONFIG', RptConfigKey, UserSettings, True$, False$, True$)
|
||||
Set_Property(CtrlEntID, 'ENABLED', False$)
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event OLE_EDT_COL_FILTER.OnCheckChanged(Cell, OldValue, NewValue)
|
||||
|
||||
GoSub EnableSaveButton
|
||||
GoSub EnableGenerateReportButton
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event OLE_EDT_LOC_FILTER.OnCheckChanged(Cell, OldValue, NewValue)
|
||||
|
||||
GoSub EnableReportColumns
|
||||
GoSub EnableSaveButton
|
||||
GoSub EnableGenerateReportButton
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event CHK_NO_MAT_FOUND.CLICK()
|
||||
|
||||
GoSub EnableSaveButton
|
||||
GoSub EnableGenerateReportButton
|
||||
|
||||
end event
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Internal GoSubs
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Setup_OLE_Controls:
|
||||
|
||||
// Report Columns
|
||||
RptCols = ''
|
||||
RptCols<1, 1> = 'React No'
|
||||
RptCols<1, 2> = 'React Type'
|
||||
RptCols<1, 3> = 'WO No'
|
||||
RptCols<1, 4> = 'SAP Prod No'
|
||||
RptCols<1, 5> = 'Sub Part No'
|
||||
RptCols<1, 6> = 'Epi Part No'
|
||||
RptCols<1, 7> = 'WO Qty'
|
||||
RptCols<1, 8> = 'RX Qty'
|
||||
RptCols<1, 9> = 'UnRel Qty'
|
||||
RptCols<1, 10> = 'Kit Location'
|
||||
RptCols<1, 11> = 'Kit Qty'
|
||||
RptCols<1, 12> = '+/-'
|
||||
RptCols<1, 13> = 'Kit RO'
|
||||
RptCols<1, 14> = 'PTI RO'
|
||||
RptCols<1, 15> = 'Load'
|
||||
RptCols<1, 16> = 'Comments'
|
||||
|
||||
RptColsEnabled = ''
|
||||
If UserSettings NE '' then
|
||||
RptColsEnabled = UserSettings<REPORT_CONFIG.REPORT_COLUMNS$>
|
||||
end else
|
||||
For each Col in RptCols using @VM setting vPos
|
||||
RptColsEnabled<0, -1> = True$
|
||||
Next Col
|
||||
end
|
||||
|
||||
NoMatFoundFlag = UserSettings<REPORT_CONFIG.NO_MAT_FOUND$>
|
||||
Set_Property(@Window:'.CHK_NO_MAT_FOUND', 'CHECK', NoMatFoundFlag)
|
||||
|
||||
RptColsArray = RptCols:@FM:RptColsEnabled
|
||||
|
||||
// Location Filters
|
||||
LocFilters = ''
|
||||
LocFilters<1, 1> = 'SR*KTR]'
|
||||
LocFilters<1, 2> = '1K*PTI'
|
||||
LocFilters<1, 3> = 'CR*BE'
|
||||
LocFilters<1, 4> = 'CR*BO'
|
||||
LocFilters<1, 5> = 'CR*TUN'
|
||||
LocFilters<1, 6> = 'CR*EPR'
|
||||
LocFilters<1, 7> = 'CR*FE'
|
||||
LocFilters<1, 8> = 'CR*FEH'
|
||||
LocFilters<1, 9> = 'CR*FO'
|
||||
LocFilters<1, 10> = 'CR*FOH'
|
||||
|
||||
LocDescriptions = ''
|
||||
LocsEnabled = ''
|
||||
If UserSettings NE '' then
|
||||
LocsEnabled = UserSettings<REPORT_CONFIG.LOCATION_FILTER$>
|
||||
For each Loc in LocFilters using @VM setting vPos
|
||||
If vPos GT 1 then
|
||||
LocDescriptions<0, -1> = Xlate('LOCATION', Loc, 'DESC', 'X')
|
||||
end else
|
||||
LocDescriptions<0, -1> = 'All Kit Racks'
|
||||
end
|
||||
Next Loc
|
||||
end else
|
||||
For each Loc in LocFilters using @VM setting vPos
|
||||
LocsEnabled<0, -1> = True$
|
||||
If vPos GT 1 then
|
||||
LocDescriptions<0, -1> = Xlate('LOCATION', Loc, 'DESC', 'X')
|
||||
end else
|
||||
LocDescriptions<0, -1> = 'All Kit Racks'
|
||||
end
|
||||
Next Loc
|
||||
end
|
||||
|
||||
LocFltrArray = LocFilters:@FM:LocDescriptions:@FM:LocsEnabled
|
||||
|
||||
ColFltrCtrl = @Window:'.OLE_EDT_COL_FILTER'
|
||||
LocFltrCtrl = @Window:'.OLE_EDT_LOC_FILTER'
|
||||
|
||||
// Qualify OLE events that we want to intercept
|
||||
Qualifier = ''
|
||||
Qualifier<1> = 1
|
||||
Qualifier<4> = 0 ; * process synchronously (i.e. immediately)
|
||||
Send_Message(ColFltrCtrl, 'QUALIFY_EVENT', 'OLE.OnCheckChanged', Qualifier)
|
||||
Send_Message(LocFltrCtrl, 'QUALIFY_EVENT', 'OLE.OnCheckChanged', Qualifier)
|
||||
|
||||
NumColFltrCols = 2
|
||||
NumColFltrRows = DCount(RptCols, @VM)
|
||||
NumLocFltrCols = 3
|
||||
NumLocFltrRows = DCount(LocFilters, @VM)
|
||||
|
||||
HeaderFontArray = 'Segoe UI':@SVM:8:@SVM:700
|
||||
ColFltrDimArray = NumColFltrCols : @FM : NumColFltrRows
|
||||
LocFltrDimArray = NumLocFltrCols : @FM : NumLocFltrRows
|
||||
DataColArray = ''
|
||||
DataColArray<4> = True$ ; // Autosize column
|
||||
|
||||
HeaderTitles = 'Column':@VM:'Enabled'
|
||||
Set_Property(ColFltrCtrl, "OLE.TitleList", HeaderTitles)
|
||||
Set_Property(ColFltrCtrl, "OLE.CellFont[All; All]", 'Segoe UI':@SVM:8)
|
||||
Set_Property(ColFltrCtrl, "OLE.Dimension", ColFltrDimArray)
|
||||
Set_Property(ColFltrCtrl, "OLE.HeaderFont[All; 1]", HeaderFontArray)
|
||||
Set_Property(ColFltrCtrl, "OLE.HeaderColumn[1]", '':@FM:False$:@FM)
|
||||
Set_Property(ColFltrCtrl, "OLE.HeaderAlignment[All; 1]", "Top":@FM:"Center":@FM:"Center")
|
||||
Set_Property(ColFltrCtrl, "OLE.HeaderColors[All; 1]", @FM:"{200, 200, 200}")
|
||||
Set_Property(ColFltrCtrl, "OLE.CellType[2; All]", "Check Box")
|
||||
Set_Property(ColFltrCtrl, "OLE.CellAlignment[2; All]", "Top":@FM:"Center":@FM:"Center")
|
||||
Set_Property(ColFltrCtrl, "OLE.DataColumn[1]", DataColArray)
|
||||
Set_Property(ColFltrCtrl, "OLE.ARRAY", RptColsArray)
|
||||
Set_Property(ColFltrCtrl, "OLE.CellCheckEnabled[2; 1-3]", False)
|
||||
CellColorArray = 'None':@FM:"{240, 240, 240}"
|
||||
Set_Property(ColFltrCtrl, "OLE.CellColors[All; 1-3]", CellColorArray)
|
||||
Set_Property(ColFltrCtrl, "OLE.CellProtection[All; 1-3]", 'FUL')
|
||||
|
||||
|
||||
HeaderTitles = 'Location':@VM:'Description':@VM:'Enabled'
|
||||
Set_Property(LocFltrCtrl, "OLE.TitleList", HeaderTitles)
|
||||
Set_Property(LocFltrCtrl, "OLE.CellFont[All; All]", 'Segoe UI':@SVM:8)
|
||||
Set_Property(LocFltrCtrl, "OLE.Dimension", LocFltrDimArray)
|
||||
Set_Property(LocFltrCtrl, "OLE.LIST", '')
|
||||
Set_Property(LocFltrCtrl, "OLE.HeaderFont[All; 1]", HeaderFontArray)
|
||||
Set_Property(LocFltrCtrl, "OLE.HeaderColumn[1]", '':@FM:False$:@FM)
|
||||
Set_Property(LocFltrCtrl, "OLE.HeaderAlignment[All; 1]", "Top":@FM:"Center":@FM:"Center")
|
||||
Set_Property(LocFltrCtrl, "OLE.HeaderColors[All; 1]", @FM:"{200, 200, 200}")
|
||||
Set_Property(LocFltrCtrl, "OLE.CellType[3; All]", "Check Box")
|
||||
Set_Property(LocFltrCtrl, "OLE.DataColumn[2]", DataColArray)
|
||||
Set_Property(LocFltrCtrl, "OLE.CellAlignment[3; All]", "Top":@FM:"Center":@FM:"Center")
|
||||
Set_Property(LocFltrCtrl, "OLE.ARRAY", LocFltrArray)
|
||||
|
||||
return
|
||||
|
||||
|
||||
EnableSaveButton:
|
||||
|
||||
// Enable save settings button if necessary
|
||||
RptConfigKey = 'MATERIAL_TRACK*':@User4
|
||||
If RowExists('REPORT_CONFIG', RptConfigKey) then
|
||||
UserSettings = Database_Services('ReadDataRow', 'REPORT_CONFIG', RptConfigKey)
|
||||
end else
|
||||
UserSettings = ''
|
||||
end
|
||||
|
||||
// Gather settings from form
|
||||
ColFltrArray = Get_Property(@Window:'.OLE_EDT_COL_FILTER', 'OLE.ARRAY')
|
||||
LocFltrArray = Get_Property(@Window:'.OLE_EDT_LOC_FILTER', 'OLE.ARRAY')
|
||||
|
||||
NewColFlags = ColFltrArray<2>
|
||||
CurrColFlags = UserSettings<REPORT_CONFIG.REPORT_COLUMNS$>
|
||||
|
||||
NewLocFlags = LocFltrArray<3>
|
||||
CurrLocFlags = UserSettings<REPORT_CONFIG.LOCATION_FILTER$>
|
||||
|
||||
NewNoMatFoundFlag = Get_Property(@Window:'.CHK_NO_MAT_FOUND', 'CHECK')
|
||||
CurrNoMatFoundFlag = UserSettings<REPORT_CONFIG.NO_MAT_FOUND$>
|
||||
|
||||
ChangeDetected = ( (NewColFlags NE CurrColFlags) or (NewLocFlags NE CurrLocFlags) or (NewNoMatFoundFlag NE CurrNoMatFoundFlag) )
|
||||
Set_Property(@Window:'.PUB_SAVE_SETTINGS', 'ENABLED', ChangeDetected)
|
||||
|
||||
return
|
||||
|
||||
|
||||
EnableGenerateReportButton:
|
||||
|
||||
// Gather settings from form
|
||||
LocFltrArray = Get_Property(@Window:'.OLE_EDT_LOC_FILTER', 'OLE.ARRAY')
|
||||
NoMaterialFlag = Get_Property(@Window:'.CHK_NO_MAT_FOUND', 'CHECK')
|
||||
LocFlags = LocFltrArray<3>
|
||||
ButtonEnabled = ( (Sum(LocFlags) GT 0) or (NoMaterialFlag EQ True$) )
|
||||
Set_Property(@Window:'.PUB_GEN_REPORT', 'ENABLED', ButtonEnabled)
|
||||
|
||||
return
|
||||
|
||||
|
||||
EnableReportColumns:
|
||||
|
||||
ColFltrCtrl = @Window:'.OLE_EDT_COL_FILTER'
|
||||
LocFltrCtrl = @Window:'.OLE_EDT_LOC_FILTER'
|
||||
|
||||
// Gather settings from form
|
||||
LocFltrArray = Get_Property(LocFltrCtrl, 'OLE.ARRAY')
|
||||
|
||||
LocFlags = LocFltrArray<3>
|
||||
KitRackFlag = LocFlags<0, 1>
|
||||
PTIRackFlag = LocFlags<0, 2>
|
||||
LoadedFlags = Field(LocFlags, @VM , 3, 8)
|
||||
LoadedColEnabled = (Sum(LoadedFlags) GT 0)
|
||||
EnabledCellColorArray = 'None':@FM:'None'
|
||||
DisabledCellColorArray = 'None':@FM:"{240, 240, 240}"
|
||||
If KitRackFlag EQ True$ then
|
||||
Set_Property(ColFltrCtrl, "OLE.CellCheck[2; 10-13]", True$)
|
||||
Set_Property(ColFltrCtrl, "OLE.CellColors[All; 10-13]", EnabledCellColorArray)
|
||||
Set_Property(ColFltrCtrl, "OLE.CellProtection[All; 10-13]", 'SEL')
|
||||
Set_Property(ColFltrCtrl, "OLE.CellCheckEnabled[2; 10-13]", True$)
|
||||
end else
|
||||
Set_Property(ColFltrCtrl, "OLE.CellCheck[2; 10-13]", False$)
|
||||
Set_Property(ColFltrCtrl, "OLE.CellColors[All; 10-13]", DisabledCellColorArray)
|
||||
Set_Property(ColFltrCtrl, "OLE.CellProtection[All; 10-13]", 'FUL')
|
||||
Set_Property(ColFltrCtrl, "OLE.CellCheckEnabled[2; 10-13]", False$)
|
||||
end
|
||||
If PTIRackFlag EQ True$ then
|
||||
Set_Property(ColFltrCtrl, "OLE.CellCheck[2; 14]", True$)
|
||||
Set_Property(ColFltrCtrl, "OLE.CellColors[All; 14]", EnabledCellColorArray)
|
||||
Set_Property(ColFltrCtrl, "OLE.CellProtection[All; 14]", 'SEL')
|
||||
Set_Property(ColFltrCtrl, "OLE.CellCheckEnabled[2; 14]", True$)
|
||||
end else
|
||||
Set_Property(ColFltrCtrl, "OLE.CellCheck[2; 14]", False$)
|
||||
Set_Property(ColFltrCtrl, "OLE.CellColors[All; 14]", DisabledCellColorArray)
|
||||
Set_Property(ColFltrCtrl, "OLE.CellProtection[All; 14]", 'FUL')
|
||||
Set_Property(ColFltrCtrl, "OLE.CellCheckEnabled[2; 14]", False$)
|
||||
end
|
||||
If LoadedColEnabled EQ True$ then
|
||||
Set_Property(ColFltrCtrl, "OLE.CellCheck[2; 15]", True$)
|
||||
Set_Property(ColFltrCtrl, "OLE.CellColors[All; 15]", EnabledCellColorArray)
|
||||
Set_Property(ColFltrCtrl, "OLE.CellProtection[All; 15]", 'SEL')
|
||||
Set_Property(ColFltrCtrl, "OLE.CellCheckEnabled[2; 15]", True$)
|
||||
end else
|
||||
Set_Property(ColFltrCtrl, "OLE.CellCheck[2; 15]", False$)
|
||||
Set_Property(ColFltrCtrl, "OLE.CellColors[All; 15]", DisabledCellColorArray)
|
||||
Set_Property(ColFltrCtrl, "OLE.CellProtection[All; 15]", 'FUL')
|
||||
Set_Property(ColFltrCtrl, "OLE.CellCheckEnabled[2; 15]", False$)
|
||||
end
|
||||
|
||||
return
|
||||
|
@ -36,7 +36,7 @@ $Insert APP_INSERTS
|
||||
$Insert EVENT_SETUP
|
||||
$Insert MSG_EQUATES
|
||||
|
||||
Declare function Reactor_Services
|
||||
Declare function Reactor_Services, Labeling_Services, Printer_Select
|
||||
Declare subroutine PlaceDialog, Labeling_Services
|
||||
|
||||
GoToEvent Event for CtrlEntId else
|
||||
@ -77,15 +77,30 @@ end event
|
||||
|
||||
Event PUB_PRINT.CLICK()
|
||||
|
||||
ErrorMsg = ''
|
||||
ReactNo = Get_Property(@Window:'.COB_REACTOR', 'TEXT')
|
||||
LLSide = Get_Property(@Window:'.COB_LOAD_LOCK_SIDE', 'TEXT')
|
||||
Def = ""
|
||||
Def<MTEXT$> = "Printing label..."
|
||||
Def<MTYPE$> = "U"
|
||||
MsgUp = Msg(@window, Def) ;* display the processing message
|
||||
Labeling_Services('PrintReactorLabel', ReactNo, LLSide)
|
||||
Msg(@window, MsgUp) ;* take down the processing message
|
||||
If Error_Services('HasError') then Error_Services('DisplayError')
|
||||
ReactorZpl = Labeling_Services('GetReactorLabelZPL', ReactNo, LLSide)
|
||||
If Error_Services('NoError') then
|
||||
PrintPath = Printer_Select()
|
||||
If PrintPath NE '' then
|
||||
Def = ""
|
||||
Def<MTEXT$> = "Printing label..."
|
||||
Def<MTYPE$> = "U"
|
||||
MsgUp = Msg(@window, Def) ;* display the processing message
|
||||
Msg(@window, MsgUp) ;* take down the processing message
|
||||
Labeling_Services('PrintLabel', ReactorZpl, PrintPath)
|
||||
If Error_Services('HasError') then
|
||||
ErrorMsg = Error_Services('GetMessage')
|
||||
end
|
||||
end
|
||||
end else
|
||||
ErrorMsg = Error_Services('GetMessage')
|
||||
end
|
||||
|
||||
If ErrorMsg NE '' then
|
||||
Msg(@Window, '', 'OK', '', 'Print Error':@FM:ErrorMsg)
|
||||
end
|
||||
|
||||
end event
|
||||
|
||||
|
@ -44,7 +44,7 @@ $insert SUPPLEMENTS_EQUATES
|
||||
equ WOCust$ to 2
|
||||
|
||||
Declare subroutine SRP_Show_Window, Rds_Services, ErrMsg, Start_Window, Placedialog, Supplement_Services, Hold_Services
|
||||
Declare subroutine Labeling_Services
|
||||
Declare subroutine Labeling_Services
|
||||
Declare function Database_Services, Material_Services, Rds_Services, RGB, SRP_Array, MemberOf, Supplement_Services
|
||||
Declare function Hold_Services, Datetime, Printer_Select
|
||||
|
||||
@ -59,11 +59,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
|
||||
@ -186,78 +186,83 @@ Event PUB_ENG_OPTIONS.CLICK()
|
||||
|
||||
NumRows = DCount(WOMatKeys, @VM)
|
||||
|
||||
Begin Case
|
||||
|
||||
Case SelOpt EQ 'CLEAN_INSP'
|
||||
Caption = "Updating Clean & Insp specs for selected RDS cassettes..."
|
||||
ServiceModules = 'CLEAN_INSP_SERVICES'
|
||||
Services = 'UpdateAllCleanInsp'
|
||||
ServiceModules = ''
|
||||
Services = ''
|
||||
Caption = ''
|
||||
|
||||
For each Sel in SelOpt using @VM
|
||||
If Sel EQ 'CLEAN_INSP' then
|
||||
Caption<0, -1> = "Updating Clean & Insp specs for selected RDS cassettes..."
|
||||
ServiceModules<0, -1> = 'CLEAN_INSP_SERVICES'
|
||||
Services<0, -1> = 'UpdateAllCleanInsp'
|
||||
end
|
||||
|
||||
Case SelOpt EQ 'QA_MET'
|
||||
Caption = "Updating QA Metrology specs for selected RDS cassettes..."
|
||||
ServiceModules = 'WO_MAT_QA_SERVICES'
|
||||
Services = 'UpdateQAMet'
|
||||
If SelOpt EQ 'QA_MET' then
|
||||
Caption<0, -1> = "Updating QA Metrology specs for selected RDS cassettes..."
|
||||
ServiceModules<0, -1> = 'WO_MAT_QA_SERVICES'
|
||||
Services<0, -1> = 'UpdateQAMet'
|
||||
end
|
||||
|
||||
Case SelOpt EQ 'UPDATE_RDS_LAYER'
|
||||
Caption = "Updating RDS Layer specs for selected RDS cassettes..."
|
||||
ServiceModules = 'RDS_LAYER_SERVICES'
|
||||
Services = 'UpdateRDSLayerSpecs'
|
||||
If SelOpt EQ 'UPDATE_RDS_LAYER' then
|
||||
Caption<0, -1> = "Updating RDS Layer specs for selected RDS cassettes..."
|
||||
ServiceModules<0, -1> = 'RDS_LAYER_SERVICES'
|
||||
Services<0, -1> = 'UpdateRDSLayerSpecs'
|
||||
end
|
||||
|
||||
Case SelOpt EQ 'CLEAN_INSP':@VM:'QA_MET'
|
||||
Caption = "Updating Clean & Insp and QA Metrology specs for selected RDS cassettes..."
|
||||
ServiceModules = 'CLEAN_INSP_SERVICES':@VM:'WO_MAT_QA_SERVICES'
|
||||
Services = 'UpdateAllCleanInsp':@VM:'UpdateQAMet'
|
||||
|
||||
Case SelOpt EQ 'QA_MET':@VM:'UPDATE_RDS_LAYER'
|
||||
Caption = "Updating RDS Layer and QA Metrology specs for selected RDS cassettes..."
|
||||
ServiceModules = 'WO_MAT_QA_SERVICES':@VM:'RDS_LAYER_SERVICES'
|
||||
Services = 'UpdateQAMet':@VM:'UpdateRDSLayerSpecs'
|
||||
|
||||
Case SelOpt EQ 'CLEAN_INSP':@VM: 'UPDATE_RDS_LAYER'
|
||||
Caption = "Updating RDS Layer and Clean & Insp specs for selected RDS cassettes..."
|
||||
ServiceModules = 'CLEAN_INSP_SERVICES':@VM:'RDS_LAYER_SERVICES'
|
||||
Services = 'UpdateAllCleanInsp':@VM:'UpdateRDSLayerSpecs'
|
||||
|
||||
Case SelOpt EQ 'CLEAN_INSP':@VM:'QA_MET':@VM: 'UPDATE_RDS_LAYER'
|
||||
Caption = "Updating Clean & Insp, QA Metrology, and RDS Layer specs for selected RDS cassettes..."
|
||||
ServiceModules = 'CLEAN_INSP_SERVICES':@VM:'WO_MAT_QA_SERVICES' :@VM: 'RDS_LAYER_SERVICES'
|
||||
Services = 'UpdateAllCleanInsp':@VM:'UpdateQAMet' :@VM: 'UpdateRDSLayerSpecs'
|
||||
|
||||
End Case
|
||||
If SelOpt EQ 'UPDATE_RDS_TEST' then
|
||||
Caption<0, -1> = "Updating RDS Test specs for selected RDS cassettes..."
|
||||
ServiceModules<0, -1> = 'RDS_TEST_SERVICES'
|
||||
Services<0, -1> = 'UpdateRDSTestSpecs'
|
||||
end
|
||||
Next Sel
|
||||
|
||||
Swap @VM with CRLF$ in Caption
|
||||
|
||||
If ServiceModules NE '' then
|
||||
Def = ""
|
||||
ErrorMsg = ''
|
||||
Def = ''
|
||||
Def<MCAPTION$> = Caption
|
||||
Def<MTYPE$> = "GC"
|
||||
Def<MEXTENT$> = NumRows
|
||||
Def<MTEXTWIDTH$> = 600
|
||||
MsgUp = Msg(@WINDOW, Def) ;* Start gas guage message
|
||||
Def<MCOL$> = -2
|
||||
Def<MROW$> = -2
|
||||
MsgUp = Msg(@Window, Def) ;* Start gas guage message
|
||||
For each WOMatKey in WOMatKeys using @VM setting vPos
|
||||
Running = Msg(@WINDOW, MsgUp, vPos, MSGINSTUPDATE$) ;* Update gas guage
|
||||
Running = Msg(@Window, MsgUp, vPos, MSGINSTUPDATE$) ;* Update gas guage
|
||||
For each ServiceModule in ServiceModules using @VM setting sPos
|
||||
Service = Services<0, sPos>
|
||||
If Service = 'UpdateRDSLayerSpecs' then
|
||||
If ( (Service _EQC 'UpdateRDSLayerSpecs') or (Service _EQC 'UpdateRDSTestSpecs') ) then
|
||||
RDSKey = SelRDSList<4, vPos>
|
||||
Ans = Function(@ServiceModule(Service, RDSKey))
|
||||
end else
|
||||
Ans = Function(@ServiceModule(Service, WOMatKey))
|
||||
end
|
||||
If Error_Services('HasError') then
|
||||
Error_Services('DisplayError')
|
||||
ErrorMsg = Error_Services('GetMessage')
|
||||
end
|
||||
Until (ErrorMsg NE '')
|
||||
Next ServiceModule
|
||||
Until (ErrorMsg NE '')
|
||||
Next WOMatKey
|
||||
Msg(@WINDOW,MsgUp) ;* Take gas guage down
|
||||
|
||||
Msg(@Window,MsgUp) ;* Take gas guage down
|
||||
end
|
||||
|
||||
If Error_Services('NoError') then
|
||||
Def = ""
|
||||
Def = ''
|
||||
Def<MCOL$> = -2
|
||||
Def<MROW$> = -2
|
||||
If (ErrorMsg EQ '') then
|
||||
Def<MICON$> = '*'
|
||||
Def<MCAPTION$> = 'Success'
|
||||
Def<MTEXT$> = "Update complete!"
|
||||
Def<MTYPE$> = "BO"
|
||||
MsgUp = Msg(@window, Def)
|
||||
Def<MTEXT$> = 'Update complete!'
|
||||
end else
|
||||
Def<MICON$> = 'H'
|
||||
Def<MCAPTION$> = 'Update failed!'
|
||||
Def<MTEXT$> = ErrorMsg
|
||||
end
|
||||
Def<MTYPE$> = "BO"
|
||||
MsgUp = Msg(@Window, Def, 'OK')
|
||||
end
|
||||
|
||||
end event
|
||||
@ -277,7 +282,7 @@ Event PUB_ON_HOLD.CLICK()
|
||||
HoldEntity = 'RDS'
|
||||
HoldType = 'HOLD'
|
||||
HoldData = ''
|
||||
HoldData = Dialog_Box('DIALOG_HOLD',@WINDOW,Transition:@FM:@FM:HoldType)
|
||||
HoldData = Dialog_Box('DIALOG_HOLD',@Window,Transition:@FM:@FM:HoldType)
|
||||
If HoldData NE 'Cancel' then
|
||||
GoSub GetView
|
||||
Hold_Services('EnableMultipleHolds', WOMatKeys, HoldEntity, RDSKeys, 'NDW_RDS_QUERY', '', HoldData)
|
||||
@ -289,7 +294,7 @@ Event PUB_ON_HOLD.CLICK()
|
||||
MsgInfo<MTYPE$> = 'BNY'
|
||||
MsgInfo<MTEXT$> = 'Hold Successful. Would you like to print label(s)?'
|
||||
MsgInfo<MICON$> = '!'
|
||||
PrintLabel = Msg(@WINDOW,MsgInfo,'')
|
||||
PrintLabel = Msg(@Window,MsgInfo,'')
|
||||
HoldBy = HoldData<1>
|
||||
Reason = HoldData<2>
|
||||
Stage = HoldData<4>
|
||||
@ -333,7 +338,7 @@ Event PUB_OFF_HOLD.CLICK()
|
||||
Transition = True$
|
||||
HoldType = 'HOLD'
|
||||
HoldData = ''
|
||||
HoldData = Dialog_Box('DIALOG_HOLD',@WINDOW,Transition:@FM:@FM:HoldType)
|
||||
HoldData = Dialog_Box('DIALOG_HOLD',@Window,Transition:@FM:@FM:HoldType)
|
||||
If HoldData NE 'Cancel' then
|
||||
GoSub GetView
|
||||
Hold_Services('DisableMultipleHolds', WOMatKeys, 'RDS', RDSKeys, 'NDW_RDS_QUERY', '', HoldData)
|
||||
@ -666,7 +671,7 @@ CheckSelectedForHolds:
|
||||
Until HoldOnFlag EQ True$ and HoldOffFlag EQ True$
|
||||
Next K
|
||||
end
|
||||
if MemberOf(@USER4, 'ENG_TECH') OR MemberOf(@USER4, 'LEAD') OR MemberOf(@USER4, 'SUPERVISOR') then
|
||||
if MemberOf(@User4, 'ENG_TECH') OR MemberOf(@User4, 'LEAD') OR MemberOf(@User4, 'SUPERVISOR') then
|
||||
// IF ANY SELECTED LOTS ARE ON HOLD, ENABLE PUB_OFF_HOLD
|
||||
Set_Property(@Window:'.PUB_OFF_HOLD', 'ENABLED', HoldOffFlag)
|
||||
end else
|
||||
|
@ -723,12 +723,16 @@ Event OLE_SCHEDULE.OnContextMenuClick(Item, UserData)
|
||||
Description = AddEventDetails<5>
|
||||
WaferQty = AddEventDetails<6>
|
||||
NewApptID = Schedule_Services('AddSchedEvent', ReactorNo, WorkOrder, StartDTM, StopDTM, Description, WaferQty)
|
||||
NewAppt = Schedule_Services('GetScheduleEvent', NewApptID)
|
||||
If Error_Services('NoError') then
|
||||
GoSub RefreshReactor
|
||||
If NewApptID NE '' then
|
||||
SchedRec = Database_Services('ReadDataRow', 'SCHED_DET_NG', NewApptID)
|
||||
Schedule_Services('NotifySupervisorsIfSameDayChange', SchedRec)
|
||||
If Error_Services('NoError') then
|
||||
NewAppt = Schedule_Services('GetScheduleEvent', NewApptID)
|
||||
If Error_Services('NoError') then
|
||||
GoSub RefreshReactor
|
||||
If NewApptID NE '' then
|
||||
SchedRec = Database_Services('ReadDataRow', 'SCHED_DET_NG', NewApptID)
|
||||
Schedule_Services('NotifySupervisorsIfSameDayChange', SchedRec)
|
||||
end
|
||||
end else
|
||||
Error_Services('DisplayError')
|
||||
end
|
||||
end else
|
||||
Error_Services('DisplayError')
|
||||
|
@ -1221,7 +1221,6 @@ Event PUB_REM_CASS.CLICK()
|
||||
WmInKeys = ''
|
||||
for each CassetteToVoid in CassettesToVoid using @FM
|
||||
WmInKeys<1, -1> = CassetteToVoid<1,4>
|
||||
//Work_Order_Services('SignVoidWMI', WMIToVoid, @USER4)
|
||||
Next CassetteToVoid
|
||||
Service_Services('PostProcedure', 'WORK_ORDER_SERVICES', 'SignVoidWMI':SD$:WmInKeys:SD$:WoNo:SD$:@USER4)
|
||||
If Error_Services('HasError') then
|
||||
@ -1240,7 +1239,6 @@ Event PUB_REM_CASS.CLICK()
|
||||
CassNo = XLATE('RDS', RDSToVoid, RDS_CASS_NO$, 'X')
|
||||
WOMatKey = WONo : '*' : CassNo
|
||||
WoMatKeyList<1, -1> = WoMatKey
|
||||
//Work_Order_Services('SignVoidNonEPP', WOMatKey, @USER4)
|
||||
If Error_Services('HasError') then
|
||||
ErrorMessage = Error_Services('GetMessage')
|
||||
end
|
||||
@ -1332,7 +1330,7 @@ Event PUB_REM_WM_OUT.CLICK()
|
||||
WmOutKeys<1, -1> = CassetteToVoid<1,3>
|
||||
Until ErrorMessage NE ''
|
||||
Next CassetteToVoid
|
||||
Service_Services('PostProcedure', 'WORK_ORDER_SERVICES', 'SignVoidWMO':SD$:WmInKeys:SD$:WoNo:SD$:@USER4)
|
||||
Service_Services('PostProcedure', 'WORK_ORDER_SERVICES', 'SignVoidWMO':SD$:WmOutKeys:SD$:WoNo:SD$:@USER4)
|
||||
If Error_Services('HasError') then
|
||||
ErrorMessage = Error_Services('GetMessage')
|
||||
end
|
||||
|
@ -30,8 +30,7 @@ $Insert NICA_ORDERS_EQUATES
|
||||
$Insert NICA_CHECKLISTS_EQUATES
|
||||
$Insert NICA_ORDERS_CHECKLISTS_EQUATES
|
||||
$Insert RLIST_EQUATES
|
||||
|
||||
Equ SECONDS_IN_DAY$ to 86400
|
||||
$Insert TIME_INSERTS
|
||||
|
||||
Declare function Environment_Services, Database_Services, Error_Services, Logging_Services, Nica_Orders_Services
|
||||
Declare function Httpclient_Services, SRP_JSON, Reactor_Services, Reactor_Log_Services, SRP_Array, Datetime
|
||||
|
@ -1,162 +0,0 @@
|
||||
COMPILE FUNCTION obj_Calib_List(Method,Parms)
|
||||
/*
|
||||
Methods for Calib_List table
|
||||
|
||||
3/18/2010 JCH - Initial Coding
|
||||
|
||||
Properties:
|
||||
|
||||
Methods:
|
||||
|
||||
SendReminders ;* Send Notes reminding of calibrations coming due
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
DECLARE FUNCTION Get_Status, Msg, Utility, obj_Tables, Dialog_Box, Popup
|
||||
DECLARE SUBROUTINE Set_Status, Msg, obj_Tables, RList, obj_Notes
|
||||
|
||||
$INSERT MSG_EQUATES
|
||||
$INSERT CALIB_LIST_EQUATES
|
||||
$INSERT RLIST_EQUATES
|
||||
$INSERT NOTIFICATION_EQU
|
||||
|
||||
EQU PDISPLAY$ TO 8 ;* From Popup_Equates
|
||||
|
||||
EQU CRLF$ TO \0D0A\
|
||||
|
||||
ErrTitle = 'Error in Stored Procedure "obj_Calib_List"'
|
||||
ErrorMsg = ''
|
||||
|
||||
IF NOT(ASSIGNED(Method)) THEN ErrorMsg = 'Unassigned parameter "Method" passed to subroutine'
|
||||
IF NOT(ASSIGNED(Parms)) THEN Parms = ''
|
||||
|
||||
IF ErrorMsg NE '' THEN
|
||||
Set_Status(-1,ErrTitle:@SVM:ErrorMsg)
|
||||
RETURN ''
|
||||
END
|
||||
|
||||
Result = ''
|
||||
|
||||
BEGIN CASE
|
||||
CASE Method = 'SendReminders' ; GOSUB SendReminders
|
||||
|
||||
CASE 1
|
||||
|
||||
END CASE
|
||||
|
||||
IF ErrorMsg NE '' THEN
|
||||
Set_Status(-1,ErrTitle:@SVM:ErrorMsg)
|
||||
RETURN ''
|
||||
END
|
||||
|
||||
RETURN Result
|
||||
|
||||
|
||||
* * * * * * *
|
||||
SendReminders:
|
||||
* * * * * * *
|
||||
|
||||
OPEN 'CALIB_LIST' TO FileIn ELSE
|
||||
ErrorMsg = 'Unable to open "CALIB_LIST" table. (':Method:')'
|
||||
RETURN
|
||||
END
|
||||
|
||||
CheckDt = OCONV(Date()+15,'D4/')
|
||||
SelectSent = 'SELECT CALIB_LIST WITH NEXT_CAL_DT < ':QUOTE(CheckDt):' BY NEXT_CAL_DT'
|
||||
RList(SelectSent,TARGET_ACTIVELIST$,'','','')
|
||||
|
||||
NoteText = ''
|
||||
Depts = ''
|
||||
|
||||
Done = 0
|
||||
LOOP
|
||||
READNEXT CLNo ELSE Done = 1
|
||||
UNTIL Done
|
||||
READ CLRec FROM FileIn,CLNo THEN
|
||||
|
||||
NextCalDt = OCONV(XLATE('CALIB_LIST',CLNo,'NEXT_CAL_DT','X'),'D4/')
|
||||
|
||||
IF NextCalDt NE '' THEN
|
||||
|
||||
CLType = CLRec<CALIB_LIST_CL_TYPE$>
|
||||
Dept = CLRec<CALIB_LIST_DEPT$>
|
||||
IF Dept = '' THEN Dept = 'MET'
|
||||
|
||||
IF CLType = 'E' THEN
|
||||
Desc = CLRec<CALIB_LIST_EQ_DESC$>
|
||||
SN = CLRec<CALIB_LIST_EQ_SN$>
|
||||
Loc = CLRec<CALIB_LIST_EQ_LOC$
|
||||
NewLine = Desc:' (S/N: ':SN:') located in the ':Loc:' is due for calibration on ':NextCalDt:CRLF$
|
||||
END
|
||||
IF CLType = 'S' THEN
|
||||
Desc = CLRec<CALIB_LIST_STD_DESC$>
|
||||
SN = CLRec<CALIB_LIST_STD_SN$>
|
||||
Loc = CLRec<CALIB_LIST_STD_LOC$>
|
||||
NewLine = 'The NIST Standard ':Desc:' (S/N: ':SN:') located in the ':Loc:' is due for calibration on ':NextCalDt:CRLF$
|
||||
END
|
||||
|
||||
LOCATE Dept IN Depts USING @FM SETTING Pos ELSE
|
||||
Depts = INSERT(Depts,Pos,0,0,Dept)
|
||||
END
|
||||
NoteText<Pos> = NoteText<Pos>:NewLine
|
||||
|
||||
END ;* End of check for NextCalDt
|
||||
END ;* End of CLRec read
|
||||
REPEAT
|
||||
|
||||
DeptUsers = ''
|
||||
DeptDescs =''
|
||||
|
||||
PopupLiteral = XLATE('SYSREPOSPOPUPS',@APPID<1>:'**DEPT',PDISPLAY$,'X')
|
||||
|
||||
CONVERT @VM:@SVM TO @FM:@VM IN PopupLiteral
|
||||
|
||||
LiteralCnt = COUNT(PopupLiteral,@FM) + (PopupLiteral NE '')
|
||||
|
||||
FOR I = 1 TO LiteralCnt
|
||||
Dept = PopupLiteral<I,1>
|
||||
DeptDesc = PopupLiteral<I,2>
|
||||
UserNames = PopupLiteral<I,3>
|
||||
LOCATE Dept IN Depts USING @FM SETTING Pos THEN
|
||||
CONVERT ' ' TO '' IN UserNames
|
||||
CONVERT ',' TO @VM IN UserNames
|
||||
DeptUsers<Pos> = UserNames
|
||||
DeptDescs<Pos> = DeptDesc
|
||||
END
|
||||
NEXT I
|
||||
|
||||
NoteSubject = "Equipment Calibration Reminder"
|
||||
|
||||
DeptCnt = COUNT(Depts,@FM) + (Depts NE '')
|
||||
|
||||
FOR I = 1 TO DeptCnt
|
||||
|
||||
IF NoteText<I> NE '' THEN
|
||||
*NoteText<I> = 'Testing during development of new functionality - disregard':CRLF$:NoteText<I>
|
||||
|
||||
Recipients = DeptUsers<I>
|
||||
|
||||
LOCATE @USER4 IN Recipients SETTING Dummy THEN
|
||||
Recipient = @USER4
|
||||
|
||||
SentFrom = 'System'
|
||||
Subject = DeptDescs<I>:" Department - Equipment Calibration Reminder"
|
||||
Message = NoteText<I>
|
||||
AttachWindow = 'MASTER_CALIB_LIST'
|
||||
AttachKeys = ''
|
||||
SendToGroup = ''
|
||||
|
||||
Obj_Notes('Create',Recipient:@RM:'System':@RM:NoteSubject:@RM:NoteText<I>:@RM:'MASTER_CALIB_LIST')
|
||||
|
||||
END
|
||||
|
||||
END
|
||||
|
||||
NEXT I
|
||||
|
||||
|
||||
RETURN
|
||||
|
||||
|
@ -2108,5 +2108,3 @@ GetQAMet:
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
|
||||
|
@ -22,7 +22,7 @@ DECLARE FUNCTION Return_To_Fab_Services
|
||||
DECLARE FUNCTION Logging_Services, Environment_Services, Error_Services, Signature_Services, Lot_Services, Supplement_Services
|
||||
DECLARE SUBROUTINE Set_Status, Msg, obj_Tables, Send_Dyn, obj_WO_Step, obj_RDS_Layer, obj_RDS_Test, obj_WM_In
|
||||
DECLARE SUBROUTINE Btree.Extract, RDS_React_Run, Environment_Services, Logging_Services, Error_Services, Send_Info
|
||||
DECLARE SUBROUTINE SRP_Stopwatch, Database_Services, Lot_Services, Supplement_Services
|
||||
DECLARE SUBROUTINE SRP_Stopwatch, Database_Services, Lot_Services, Supplement_Services, RDS_Services
|
||||
|
||||
$INSERT MSG_EQUATES
|
||||
$INSERT WO_VERIFY_EQU
|
||||
@ -375,6 +375,10 @@ Create:
|
||||
Result = ''
|
||||
END ELSE
|
||||
|
||||
RDS_Services('VerifyWOLogRDSKeyIndex', RDSNo)
|
||||
RDS_Services('VerifyWOMatRDSNoIndex', RDSNo)
|
||||
RDS_Services('VerifyWOStepRDSKeyIndex', RDSNo)
|
||||
|
||||
NewLotId = Lot_Services('CreateNewLot', 'RDS', '', WaferQty, SubPartNo, LotNo, SubVendCd, @User4, '', RDSNo)
|
||||
|
||||
If Rds_Services('IsEpiPro', RDSNo) then
|
||||
@ -1250,4 +1254,3 @@ CalcThickTarget:
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
|
@ -772,9 +772,7 @@ IF NOT(UnloadFailed) THEN
|
||||
end else
|
||||
LotId = Lot_Services('GetLotIdByLegacyLotIdAndType', RDSNo, 'RDS')
|
||||
If Error_Services('NoError') then
|
||||
Lot_Services('MoveOutLot', LotId, @User4) ; // Move out of POST_EPI operation
|
||||
Lot_Services('MoveInLot', LotId, @User4) ; // Move into RDS_CLOSE operation
|
||||
Lot_Services('CloseLot', LotId)
|
||||
Lot_Services('AutoCloseLot', LotId, 'SYSTEM')
|
||||
end
|
||||
end
|
||||
|
||||
@ -1683,3 +1681,4 @@ RETURN
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -18,7 +18,7 @@ Declare subroutine Memory_Services, Environment_Services, Logging_Services, Dat
|
||||
|
||||
DECLARE FUNCTION Get_Status, Msg, Utility, obj_Tables, Dialog_Box, obj_WO_Log, NextKey, SRP_Encode
|
||||
DECLARE FUNCTION obj_Prod_Spec, obj_RDS_Test, obj_Popup, Database_Services, SRP_Array, Memory_Services
|
||||
Declare function Environment_Services, Logging_Services, Error_Services
|
||||
Declare function Environment_Services, Logging_Services, Error_Services, Datetime
|
||||
|
||||
|
||||
$insert LOGICAL
|
||||
@ -476,7 +476,9 @@ CopyStats:
|
||||
DestRDSTestRec<RDS_TEST_HGCV1_RES_MAX$> = SourceRDSTestRec<RDS_TEST_HGCV1_RES_MAX$>
|
||||
DestRDSTestRec<RDS_TEST_HGCV1_RES_RANGE$> = SourceRDSTestRec<RDS_TEST_HGCV1_RES_RANGE$>
|
||||
DestRDSTestRec<RDS_TEST_HGCV1_RES_RANGE_PCNT$> = SourceRDSTestRec<RDS_TEST_HGCV1_RES_RANGE_PCNT$>
|
||||
|
||||
DestRDSTestRec<RDS_TEST_COPY_FROM_RDS_TEST_ID$> = SourceRDSTestKey
|
||||
DestRDSTestRec<RDS_TEST_COPY_USER$> = @User4
|
||||
DestRDSTestRec<RDS_TEST_COPY_DTM$> = Datetime()
|
||||
|
||||
RTParms = FieldStore(RTParms, @RM, 2, 1, LockedRDSTestKey)
|
||||
RTParms = FieldStore(RTParms, @RM, 4, 1, DestRDSTestRec)
|
||||
@ -2052,3 +2054,4 @@ END ;* End of STRESS Property
|
||||
|
||||
|
||||
RETURN
|
||||
|
||||
|
@ -20,7 +20,7 @@ DECLARE FUNCTION Get_Status, Msg, Utility, obj_Tables, NextKey, obj_WO_Verify, o
|
||||
DECLARE FUNCTION Database_Services, obj_RDS2, Logging_Services, Environment_Services, Error_Services
|
||||
DECLARE SUBROUTINE Set_Status, Msg, obj_Tables, Send_Dyn, obj_WO_Step, obj_RDS_Layer, obj_RDS_Test, Update_Index
|
||||
DECLARE SUBROUTINE obj_Post_Log, obj_WO_Mat_Log,obj_WO_Wfr, Set_Property, Database_Services, Extract_SI_Keys
|
||||
DECLARE SUBROUTINE Logging_Services, obj_Notes
|
||||
DECLARE SUBROUTINE Logging_Services, obj_Notes, WM_In_Services
|
||||
|
||||
$INSERT MSG_EQUATES
|
||||
$INSERT WO_LOG_EQU
|
||||
@ -128,6 +128,9 @@ Create:
|
||||
LogData<7> = WaferQty
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
|
||||
Done = True$
|
||||
WM_In_Services('VerifyWoStepWMIKeyIndex', WMInKey)
|
||||
WM_In_Services('VerifyWOLogWMIKeyIndex', WMInKey)
|
||||
WM_In_Services('VerifyWOMatWMIKeyIndex', WMInKey)
|
||||
end
|
||||
Until ( (NumAttempts EQ 10) or (Done EQ True$) )
|
||||
Repeat
|
||||
@ -940,6 +943,3 @@ RepProdTW:
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -23,7 +23,7 @@ Declare Function Database_Services, SRP_Array, Return_To_Fab_Services
|
||||
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, Delay
|
||||
Declare Subroutine Service_Services, obj_Notes, Delay, WM_Out_Services
|
||||
|
||||
$Insert MSG_EQUATES
|
||||
$Insert APP_INSERTS
|
||||
@ -40,7 +40,7 @@ $Insert CLEAN_INSP_EQUATES
|
||||
$Insert WMO_WFRS_EQUATES
|
||||
$Insert REACT_RUN_EQUATES
|
||||
|
||||
EQU NUM_RETRIES$ TO 50
|
||||
EQU NUM_RETRIES$ TO 60
|
||||
|
||||
ErrTitle = 'Error in Stored Procedure "obj_WM_Out"'
|
||||
ErrorMsg = ''
|
||||
@ -115,13 +115,12 @@ Create:
|
||||
|
||||
WONo = Parms[1,@RM]
|
||||
WOStep = Parms[COL2()+1,@RM]
|
||||
NewCassNos = Parms[COL2()+1,@RM]
|
||||
NewCassNo = Parms[COL2()+1,@RM]
|
||||
CassLoadQty = Parms[COL2()+1,@RM]
|
||||
|
||||
|
||||
IF WONo = '' THEN ErrorMsg = 'Null Parameter "WONo" passed to routine. (':Method:')'
|
||||
IF WOStep = '' THEN ErrorMsg = 'Null Parameter "WOStep" passed to routine. (':Method:')'
|
||||
IF NewCassNos = '' THEN ErrorMsg = 'Null Parameter "NewCassNos" passed to routine. (':Method:')'
|
||||
IF NewCassNo = '' THEN ErrorMsg = 'Null Parameter "NewCassNo" passed to routine. (':Method:')'
|
||||
|
||||
IF ErrorMsg NE '' THEN RETURN
|
||||
|
||||
@ -161,11 +160,8 @@ Create:
|
||||
WORec = XLATE('WO_LOG',WONo,'','X')
|
||||
|
||||
InboundWaferQty = 0
|
||||
FOR I = 1 TO COUNT(NewCassNos,@VM) + (NewCassNos NE '')
|
||||
NewCassNo = NewCassNos<1,I>
|
||||
CassWfrQty = XLATE('WO_MAT',WONo:'*':NewCassNo,WO_MAT_WAFER_QTY$,'X')
|
||||
InboundWaferQty += CassWfrQty
|
||||
NEXT I
|
||||
CassWfrQty = XLATE('WO_MAT',WONo:'*':NewCassNo,WO_MAT_WAFER_QTY$,'X')
|
||||
InboundWaferQty += CassWfrQty
|
||||
|
||||
WMOutKeys = XLATE('WO_STEP',WONo:'*':WOStep,WO_STEP_WM_OUT_KEYS$,'X')
|
||||
|
||||
@ -214,7 +210,7 @@ Create:
|
||||
OutOnlyCassIDs = '' ;* List of Outbound only Cassette IDs added 8/12/1011 JCH
|
||||
|
||||
LOOP
|
||||
UNTIL InboundWaferQty = 0
|
||||
UNTIL InboundWaferQty EQ 0
|
||||
WMOutKey = WONo:'*':WOStep:'*':WMOCassNo
|
||||
WMOutRec = XLATE('WM_OUT',WMOutKey,'','X') ;* In case there is a partial box
|
||||
NewBoxFlag = ''
|
||||
@ -250,7 +246,7 @@ Create:
|
||||
NumAttempts = 0
|
||||
Loop
|
||||
NumAttempts += 1
|
||||
If NumAttempts GT 1 then Delay(NumAttempts)
|
||||
If NumAttempts GT 1 then Delay(1)
|
||||
Database_Services('WriteDataRow', 'WM_OUT', WMOutKey, WMOutRec, True$, False$, False$)
|
||||
If Error_Services('HasError') then
|
||||
// Log the error
|
||||
@ -272,6 +268,9 @@ Create:
|
||||
LogData<6> = WMOCassNo
|
||||
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
|
||||
Done = True$
|
||||
WM_Out_Services('VerifyWOLogWMOKeyIndex', WONo:'*':WOStep:'*':WMOCassNo)
|
||||
WM_Out_Services('VerifyWOMatWMOKeyIndex', WONo:'*':WOStep:'*':WMOCassNo)
|
||||
WM_Out_Services('VerifyWoStepWMOKeyIndex', WONo:'*':WOStep:'*':WMOCassNo)
|
||||
end
|
||||
Until ( (NumAttempts GT NUM_RETRIES$) or (Done EQ True$) )
|
||||
Repeat
|
||||
@ -1999,6 +1998,3 @@ ConvertCleanInsp:
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -23,7 +23,7 @@ DECLARE SUBROUTINE Set_Status, Msg, obj_Tables, Send_Dyn, Btree.Extract, ErrMsg,
|
||||
DECLARE SUBROUTINE obj_Order_Change, obj_Vision, obj_Notes, obj_WM_In, obj_WM_Out, Msg, obj_WO_Mat, obj_Reprocess
|
||||
DECLARE SUBROUTINE obj_WO_Wfr, obj_WO_Step, Send_Info, obj_RDS2, obj_RDS, obj_Post_Log, obj_WO_Mat_Log, Sleepery
|
||||
DECLARE SUBROUTINE Environment_Services, Logging_Services, Error_Services, Database_Services, Update_Index
|
||||
DECLARE SUBROUTINE Work_Order_Services, Delay, Transaction_Services
|
||||
DECLARE SUBROUTINE Work_Order_Services, Delay, Transaction_Services, RDS_Services, WM_In_Services, WM_Out_Services
|
||||
|
||||
$INSERT MSG_EQUATES
|
||||
$INSERT ORDER_EQU
|
||||
@ -53,7 +53,7 @@ $INSERT LOGICAL
|
||||
$INSERT APPCOLORS
|
||||
$INSERT WM_IN_EQUATES
|
||||
|
||||
EQU NUM_RETRIES$ TO 50
|
||||
EQU NUM_RETRIES$ TO 60
|
||||
|
||||
EQU CRLF$ TO \0D0A\
|
||||
EQU COMMA$ TO ','
|
||||
@ -103,7 +103,7 @@ BEGIN CASE
|
||||
CASE Method = 'OpenWONos' ; GOSUB OpenWONos
|
||||
CASE Method = 'ShipWONos' ; GOSUB ShipWONos
|
||||
CASE Method = 'WOStepStatus' ; GOSUB WOStepStatus
|
||||
CASE Method = 'ReleaseCassettes' ; GOSUB ReleaseCassettes
|
||||
CASE Method = 'ReleaseCassette' ; GOSUB ReleaseCassette
|
||||
CASE Method = 'RecallWO' ; GOSUB RecallWO
|
||||
CASE Method = 'ChangeLotNo' ; GOSUB ChangeLotNo
|
||||
CASE Method = 'ChangeCassQty' ; GOSUB ChangeCassQty
|
||||
@ -967,11 +967,11 @@ RETURN
|
||||
|
||||
|
||||
* * * * * * *
|
||||
ReleaseCassettes:
|
||||
ReleaseCassette:
|
||||
* * * * * * *
|
||||
|
||||
WONo = Parms[1,@RM]
|
||||
CassNos = Parms[COL2()+1,@RM]
|
||||
CassNo = Parms[COL2()+1,@RM]
|
||||
ReleaseUser = Parms[COL2()+1,@RM]
|
||||
RelDtm = Parms[COL2()+1,@RM]
|
||||
|
||||
@ -979,7 +979,7 @@ ReleaseCassettes:
|
||||
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
|
||||
LogData<2> = ReleaseUser
|
||||
LogData<3> = WONo
|
||||
LogData<4> = 'WONo: ':WONo:' CassNos: ':CassNos:' ReleaseUser: ':ReleaseUser:' ||| Beginning ReleaseCassettes routine.'
|
||||
LogData<4> = 'WONo: ':WONo:' CassNo: ':CassNo:' ReleaseUser: ':ReleaseUser:' ||| Beginning ReleaseCassette routine.'
|
||||
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
|
||||
|
||||
IF WONo = '' THEN ErrorMsg = 'Null parameter WONo passed to routine (':Method:').'
|
||||
@ -1050,12 +1050,7 @@ ReleaseCassettes:
|
||||
|
||||
OrdSummary = '' ;* Holds Order Detail Lot Numbers and Associated Order Item Numbers
|
||||
|
||||
CassCnt = COUNT(CassNos,@VM) + (CassNos NE '')
|
||||
|
||||
WOMKeys = ''
|
||||
FOR K = 1 TO CassCnt
|
||||
WOMKeys<1,K> = WONo:'*':CassNos<1,K>
|
||||
NEXT K
|
||||
WOMKey = WONo:'*':CassNo
|
||||
|
||||
WOMTableVar = Database_Services('GetTableHandle', 'WO_MAT')
|
||||
|
||||
@ -1065,7 +1060,7 @@ ReleaseCassettes:
|
||||
END
|
||||
|
||||
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
|
||||
LogData<4> = 'WONo:':WONo:' CassNos:':CassNos:' ||| Trace 1'
|
||||
LogData<4> = 'WONo:':WONo:' CassNo:':CassNo:' ||| Trace 1'
|
||||
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
|
||||
|
||||
EpiPN = WORec<WO_LOG_EPI_PART_NO$>
|
||||
@ -1093,149 +1088,138 @@ ReleaseCassettes:
|
||||
|
||||
// Log variables before obj_WM_Out('Create')
|
||||
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
|
||||
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNos:':CassNos:' WMOLoadQty:':WMOLoadQty
|
||||
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNo:':CassNo:' WMOLoadQty:':WMOLoadQty
|
||||
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
|
||||
|
||||
IF ReactorType = 'EPP' THEN
|
||||
Send_Info('Creating WM_OUT records for WOStep ':WOStep:'...')
|
||||
OutOnlyCassIDS = obj_WM_Out('Create',WONO:@RM:WOStep:@RM:CassNos:@RM:WMOLoadQty)
|
||||
OutOnlyCassIDs = obj_WM_Out('Create',WONO:@RM:WOStep:@RM:CassNo:@RM:WMOLoadQty)
|
||||
END ELSE
|
||||
OutOnlyCassIDs = ''
|
||||
END
|
||||
|
||||
StepRDSNos = ''
|
||||
|
||||
CassCnt = COUNT(CassNos,@VM) + (CassNos NE '')
|
||||
|
||||
// Log variables after obj_WM_Out('Create')
|
||||
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
|
||||
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNos:':CassNos:' CassCnt:':CassCnt:' WMOLoadQty:':WMOLoadQty
|
||||
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNo:':CassNo:' WMOLoadQty:':WMOLoadQty
|
||||
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
|
||||
|
||||
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
|
||||
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNos:':CassNos:' CassCnt:':CassCnt:' WMOLoadQty:':WMOLoadQty:' ||| Trace 2'
|
||||
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNo:':CassNo:' WMOLoadQty:':WMOLoadQty:' ||| Trace 2'
|
||||
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
|
||||
|
||||
FOR N = 1 TO CassCnt
|
||||
IF ReactorType EQ 'EPP' THEN
|
||||
|
||||
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
|
||||
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNos:':CassNos:' CassCnt:':CassCnt:' WMOLoadQty:':WMOLoadQty:' ||| Trace 2.':N
|
||||
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
|
||||
CassWaferQty = XLATE('WO_MAT',WONo:'*':CassNo,WO_MAT_WAFER_QTY$,'X')
|
||||
WMIKey = WONo:'*':WOStep:'*':CassNo
|
||||
obj_WM_IN('Create',WONo:@RM:WOStep:@RM:CassNo:@RM:CassWaferQty)
|
||||
|
||||
CassNo = CassNos<1,N>
|
||||
END ELSE
|
||||
|
||||
IF ReactorType EQ 'EPP' THEN
|
||||
WOMatRec = XLATE('WO_MAT',WoNo:'*':CassNo,'','X')
|
||||
RDSNoCheck = WOMatRec<WO_MAT_RDS_NO$>
|
||||
If RDSNoCheck EQ '' then
|
||||
|
||||
CassWaferQty = XLATE('WO_MAT',WONo:'*':CassNo,WO_MAT_WAFER_QTY$,'X')
|
||||
WMIKey = WONo:'*':WOStep:'*':CassNo
|
||||
obj_WM_IN('Create',WONo:@RM:WOStep:@RM:CassNo:@RM:CassWaferQty)
|
||||
CassLotNo = WOMatRec<WO_MAT_LOT_NO$>
|
||||
CassWaferQty = WOMatRec<WO_MAT_WAFER_QTY$>
|
||||
CassCustPartNo = WOMatRec<WO_MAT_CUST_PART_NO$>
|
||||
CassSubPartNo = WOMatRec<WO_MAT_SUB_PART_NO$>
|
||||
CassSubInvID = ''
|
||||
CassOrderItem = WOMatRec<WO_MAT_ORDER_ITEM$>
|
||||
ReprocessedMat = WOMatRec<WO_MAT_REPROCESSED_MAT$>
|
||||
CassSubVendCd = WOMatRec<WO_MAT_SUB_VEND_CD$>
|
||||
|
||||
END ELSE
|
||||
IF OrderNo = '' THEN
|
||||
QuoteNo = ''
|
||||
END ELSE
|
||||
QuoteNo = XLATE('ORDER_DET',OrderNo:'*':CassOrderItem,ORDER_DET_QUOTE_NO$,'X')
|
||||
END
|
||||
|
||||
WOMatRec = XLATE('WO_MAT',WoNo:'*':CassNo,'','X')
|
||||
RDSNoCheck = WOMatRec<WO_MAT_RDS_NO$>
|
||||
If RDSNoCheck EQ '' then
|
||||
Parms = WONo:@RM
|
||||
Parms := WOStep:@RM
|
||||
Parms := LastStep:@RM
|
||||
Parms := CassNo:@RM
|
||||
Parms := QuoteNo:@RM
|
||||
Parms := OrderNo:@RM
|
||||
Parms := CassOrderItem:@RM
|
||||
Parms := CustNo:@RM
|
||||
Parms := PONo:@RM
|
||||
Parms := ProcPSN:@RM
|
||||
Parms := SubSupplyBy:@RM
|
||||
Parms := SubPreClean:@RM
|
||||
Parms := SubPostClean:@RM
|
||||
Parms := PromiseDt:@RM
|
||||
Parms := CassLotNo:@RM
|
||||
Parms := CassCustPartNo:@RM
|
||||
Parms := CassWaferQty:@RM
|
||||
Parms := CassSubPartNo:@RM
|
||||
Parms := '':@RM ;* QXJ Flag
|
||||
Parms := CassSubVendCd
|
||||
|
||||
IF ReactorType NE 'GAN' then
|
||||
|
||||
CassLotNo = WOMatRec<WO_MAT_LOT_NO$>
|
||||
CassWaferQty = WOMatRec<WO_MAT_WAFER_QTY$>
|
||||
CassCustPartNo = WOMatRec<WO_MAT_CUST_PART_NO$>
|
||||
CassSubPartNo = WOMatRec<WO_MAT_SUB_PART_NO$>
|
||||
CassSubInvID = ''
|
||||
CassOrderItem = WOMatRec<WO_MAT_ORDER_ITEM$>
|
||||
ReprocessedMat = WOMatRec<WO_MAT_REPROCESSED_MAT$>
|
||||
CassSubVendCd = WOMatRec<WO_MAT_SUB_VEND_CD$>
|
||||
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
|
||||
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNo:':CassNo:' WMOLoadQty:':WMOLoadQty:' ||| Trace 2.1 - Start obj_RDS("Create")'
|
||||
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
|
||||
Done = False$
|
||||
For AttemptIndex = 1 to NUM_RETRIES$
|
||||
If (AttemptIndex GT 1) then Delay(1)
|
||||
NewRDSNo = obj_RDS('Create',Parms)
|
||||
errCode = ''
|
||||
Begin Case
|
||||
Case Get_Status(errCode)
|
||||
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
|
||||
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNo:':CassNo:' WMOLoadQty:':WMOLoadQty:' ||| Trace 2.1.1 - Attempt ':AttemptIndex:'. Error calling obj_RDS("Create"). Error message: ':errCode
|
||||
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
|
||||
Case (NewRDSNo EQ 0) or (NewRDSNo EQ '')
|
||||
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
|
||||
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNo:':CassNo:' WMOLoadQty:':WMOLoadQty:' ||| Trace 2.1.1 - Attempt ':AttemptIndex:'. Error calling obj_RDS("Create"). Invalid RDSNo ':Quote(RDSNo):' returned.'
|
||||
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
|
||||
Case RowExists('RDS', NewRDSNo)
|
||||
Done = True$
|
||||
End Case
|
||||
Until Done
|
||||
Next AttemptIndex
|
||||
|
||||
IF OrderNo = '' THEN
|
||||
QuoteNo = ''
|
||||
END ELSE
|
||||
QuoteNo = XLATE('ORDER_DET',OrderNo:'*':CassOrderItem,ORDER_DET_QUOTE_NO$,'X')
|
||||
END
|
||||
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
|
||||
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNo:':CassNo:' WMOLoadQty:':WMOLoadQty:' ||| Trace 2.2 - End obj_RDS("Create")'
|
||||
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
|
||||
|
||||
Parms = WONo:@RM
|
||||
Parms := WOStep:@RM
|
||||
Parms := LastStep:@RM
|
||||
Parms := CassNo:@RM
|
||||
Parms := QuoteNo:@RM
|
||||
Parms := OrderNo:@RM
|
||||
Parms := CassOrderItem:@RM
|
||||
Parms := CustNo:@RM
|
||||
Parms := PONo:@RM
|
||||
Parms := ProcPSN:@RM
|
||||
Parms := SubSupplyBy:@RM
|
||||
Parms := SubPreClean:@RM
|
||||
Parms := SubPostClean:@RM
|
||||
Parms := PromiseDt:@RM
|
||||
Parms := CassLotNo:@RM
|
||||
Parms := CassCustPartNo:@RM
|
||||
Parms := CassWaferQty:@RM
|
||||
Parms := CassSubPartNo:@RM
|
||||
Parms := '':@RM ;* QXJ Flag
|
||||
Parms := CassSubVendCd
|
||||
|
||||
IF ReactorType NE 'GAN' then
|
||||
If ( (NewRDSNo EQ 0) or (NewRDSNo EQ '') ) then
|
||||
|
||||
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
|
||||
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNos:':CassNos:' CassCnt:':CassCnt:' WMOLoadQty:':WMOLoadQty:' ||| Trace 2.':N:'.1 - Start obj_RDS("Create")'
|
||||
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
|
||||
Done = False$
|
||||
For AttemptIndex = 1 to NUM_RETRIES$
|
||||
If (AttemptIndex GT 1) then Delay(AttemptIndex)
|
||||
NewRDSNo = obj_RDS('Create',Parms)
|
||||
errCode = ''
|
||||
Begin Case
|
||||
Case Get_Status(errCode)
|
||||
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
|
||||
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNos:':CassNos:' CassCnt:':CassCnt:' WMOLoadQty:':WMOLoadQty:' ||| Trace 2.':N:'.1.1 - Attempt ':AttemptIndex:'. Error calling obj_RDS("Create"). Error message: ':errCode
|
||||
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
|
||||
Case (NewRDSNo EQ 0) or (NewRDSNo EQ '')
|
||||
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
|
||||
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNos:':CassNos:' CassCnt:':CassCnt:' WMOLoadQty:':WMOLoadQty:' ||| Trace 2.':N:'.1.1 - Attempt ':AttemptIndex:'. Error calling obj_RDS("Create"). Invalid RDSNo ':Quote(RDSNo):' returned.'
|
||||
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
|
||||
Case RowExists('RDS', NewRDSNo)
|
||||
Done = True$
|
||||
End Case
|
||||
Until Done
|
||||
Next AttemptIndex
|
||||
|
||||
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
|
||||
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNos:':CassNos:' CassCnt:':CassCnt:' WMOLoadQty:':WMOLoadQty:' ||| Trace 2.':N:'.2 - End obj_RDS("Create")'
|
||||
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
|
||||
|
||||
If ( (NewRDSNo EQ 0) or (NewRDSNo EQ '') ) then
|
||||
|
||||
ErrMsg(errCode)
|
||||
ErrorMsg = "RDS '" : NewRDSNo : "' Create Failure - Check for missing data on Work Order"
|
||||
If Error_Services('HasError') then
|
||||
ErrMsg = Error_Services('GetMessage')
|
||||
LogData = LoggingDTM : ',' : ReleaseUser : ',' : WONo : ',' : ErrMsg
|
||||
Logging_Services('AppendLog', objLog, LogData, CRLF$, COMMA$, False$, '', LogData)
|
||||
end
|
||||
|
||||
RTParms = 'RDS'
|
||||
FOR I = 1 TO COUNT(StepRdsNos,@VM) + (StepRdsNos NE '')
|
||||
RdsNo = StepRdsNos<1,I>
|
||||
RTParms = FieldStore(RTParms, @RM, 2, 1, RdsNo)
|
||||
obj_Tables('DeleteRec',RTParms)
|
||||
NEXT I
|
||||
RETURN
|
||||
END else
|
||||
// No error creating RDS record -> add it to the batch list.
|
||||
StepRDSNos<1,-1> = NewRDSNo
|
||||
ErrMsg(errCode)
|
||||
ErrorMsg = "RDS '" : NewRDSNo : "' Create Failure - Check for missing data on Work Order"
|
||||
If Error_Services('HasError') then
|
||||
ErrMsg = Error_Services('GetMessage')
|
||||
LogData = LoggingDTM : ',' : ReleaseUser : ',' : WONo : ',' : ErrMsg
|
||||
Logging_Services('AppendLog', objLog, LogData, CRLF$, COMMA$, False$, '', LogData)
|
||||
end
|
||||
|
||||
IF ReprocessedMat THEN
|
||||
OrgRDSNo = CassLotNo
|
||||
obj_Reprocess('FixUp',OrgRDSNo:@RM:NewRDSNo)
|
||||
END
|
||||
|
||||
END ;* End of check for GAN reactor
|
||||
END ;* End of Check for existing RDS
|
||||
END ;* End of check for EpiPRO reactor type
|
||||
NEXT N
|
||||
RTParms = 'RDS'
|
||||
FOR I = 1 TO COUNT(StepRdsNos,@VM) + (StepRdsNos NE '')
|
||||
RdsNo = StepRdsNos<1,I>
|
||||
RTParms = FieldStore(RTParms, @RM, 2, 1, RdsNo)
|
||||
obj_Tables('DeleteRec',RTParms)
|
||||
NEXT I
|
||||
RETURN
|
||||
END else
|
||||
// No error creating RDS record -> add it to the batch list.
|
||||
StepRDSNos<1,-1> = NewRDSNo
|
||||
end
|
||||
|
||||
IF ReprocessedMat THEN
|
||||
OrgRDSNo = CassLotNo
|
||||
obj_Reprocess('FixUp',OrgRDSNo:@RM:NewRDSNo)
|
||||
END
|
||||
|
||||
END ;* End of check for GAN reactor
|
||||
END ;* End of Check for existing RDS
|
||||
END ;* End of check for EpiPRO reactor type
|
||||
NEXT WOStep
|
||||
|
||||
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
|
||||
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNos:':CassNos:' CassCnt:':CassCnt:' WMOLoadQty:':WMOLoadQty:' ||| Trace 3'
|
||||
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNo:':CassNo:' WMOLoadQty:':WMOLoadQty:' ||| Trace 3'
|
||||
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
|
||||
|
||||
If RelDtm EQ '' then
|
||||
@ -1251,95 +1235,91 @@ ReleaseCassettes:
|
||||
|
||||
MaxShipQty = Xlate('WO_LOG', WONo, 'CUST_EPI_PART_SHIP_QTY', 'X')
|
||||
|
||||
FOR N = 1 TO CassCnt
|
||||
WOMKey = WOMKeys<1,N>
|
||||
CassNo = FIELD(WOMKey,'*',2)
|
||||
// Keep trying to get the lock. Another process may be updating this record at the same time.
|
||||
Done = False$
|
||||
For AttemptIndex = 1 to NUM_RETRIES$
|
||||
CassNo = FIELD(WOMKey,'*',2)
|
||||
// Keep trying to get the lock. Another process may be updating this record at the same time.
|
||||
Done = False$
|
||||
For AttemptIndex = 1 to NUM_RETRIES$
|
||||
|
||||
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
|
||||
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNo:':CassNo:' WMOLoadQty:':WMOLoadQty:' ||| Trace 3.':AttemptIndex
|
||||
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
|
||||
|
||||
If (AttemptIndex GT 1) then Delay(1)
|
||||
HaveLock = Database_Services('GetKeyIDLock', 'WO_MAT', WOMKey, True$)
|
||||
If HaveLock then
|
||||
|
||||
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
|
||||
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNos:':CassNos:' CassCnt:':CassCnt:' WMOLoadQty:':WMOLoadQty:' ||| Trace 3.':AttemptIndex
|
||||
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
|
||||
|
||||
If (AttemptIndex GT 1) then Delay(AttemptIndex)
|
||||
HaveLock = Database_Services('GetKeyIDLock', 'WO_MAT', WOMKey)
|
||||
If HaveLock then
|
||||
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNo:':CassNo:' WMOLoadQty:':WMOLoadQty:' ||| Trace 3.':AttemptIndex:' Have lock!'
|
||||
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
|
||||
|
||||
WOMatRec = XLATE('WO_MAT',WOMKey,'','X') ;* We have the lock, so just get the record this way
|
||||
|
||||
IF WOMatRec<WO_MAT_REL_DTM$> = '' THEN
|
||||
WOMatRec<WO_MAT_REL_DTM$> = IConv(RelDTM,'DT')
|
||||
WOMatRec<WO_MAT_REL_BY$> = ReleaseUser
|
||||
WOMatRec<WO_MAT_ORG_COMMIT_DT$> = PromiseDt
|
||||
|
||||
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
|
||||
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNos:':CassNos:' CassCnt:':CassCnt:' WMOLoadQty:':WMOLoadQty:' ||| Trace 3.':AttemptIndex:' Have lock!'
|
||||
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
|
||||
IF SubPreClean = 'No' OR SubPreClean = '' THEN
|
||||
WOMatRec<WO_MAT_WMI_CURR_STATUS$> = 'RTU'
|
||||
END ELSE
|
||||
WOMatRec<WO_MAT_WMI_CURR_STATUS$> = 'PREC'
|
||||
END
|
||||
|
||||
WOMatRec = XLATE('WO_MAT',WOMKey,'','X') ;* We have the lock, so just get the record this way
|
||||
WOMatRec<WO_MAT_WMO_CURR_STATUS$> = 'RTB'
|
||||
|
||||
IF WOMatRec<WO_MAT_REL_DTM$> = '' THEN
|
||||
WOMatRec<WO_MAT_REL_DTM$> = IConv(RelDTM,'DT')
|
||||
WOMatRec<WO_MAT_REL_BY$> = ReleaseUser
|
||||
WOMatRec<WO_MAT_ORG_COMMIT_DT$> = PromiseDt
|
||||
thisInvDTM = ICONV(RelDTM,'DT')
|
||||
|
||||
WHCd = 'SR'
|
||||
LocCd = 'RB'
|
||||
InvAction = 'REL'
|
||||
ScanUserID = ReleaseUser
|
||||
Tag = ''
|
||||
ToolID = ''
|
||||
|
||||
LOCATE thisInvDTM IN WOMatRec<WO_MAT_INV_DTM$> BY 'AR' USING @VM SETTING Pos ELSE
|
||||
|
||||
IF SubPreClean = 'No' OR SubPreClean = '' THEN
|
||||
WOMatRec<WO_MAT_WMI_CURR_STATUS$> = 'RTU'
|
||||
END ELSE
|
||||
WOMatRec<WO_MAT_WMI_CURR_STATUS$> = 'PREC'
|
||||
END
|
||||
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_WH$,Pos,0,WHCd)
|
||||
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_LOCATION$,Pos,0,LocCd)
|
||||
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_ACTION$,Pos,0,InvAction)
|
||||
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_DTM$,Pos,0,thisInvDTM)
|
||||
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_USER$,Pos,0,ScanUserID)
|
||||
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_TAG$,Pos,0,Tag)
|
||||
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_TOOL_ID$,Pos,0,ToolID)
|
||||
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_SCAN_ENTRY$,Pos,0,False$)
|
||||
|
||||
WOMatRec<WO_MAT_WMO_CURR_STATUS$> = 'RTB'
|
||||
|
||||
thisInvDTM = ICONV(RelDTM,'DT')
|
||||
|
||||
WHCd = 'SR'
|
||||
LocCd = 'RB'
|
||||
InvAction = 'REL'
|
||||
ScanUserID = ReleaseUser
|
||||
Tag = ''
|
||||
ToolID = ''
|
||||
|
||||
LOCATE thisInvDTM IN WOMatRec<WO_MAT_INV_DTM$> BY 'AR' USING @VM SETTING Pos ELSE
|
||||
|
||||
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_WH$,Pos,0,WHCd)
|
||||
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_LOCATION$,Pos,0,LocCd)
|
||||
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_ACTION$,Pos,0,InvAction)
|
||||
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_DTM$,Pos,0,thisInvDTM)
|
||||
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_USER$,Pos,0,ScanUserID)
|
||||
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_TAG$,Pos,0,Tag)
|
||||
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_TOOL_ID$,Pos,0,ToolID)
|
||||
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_SCAN_ENTRY$,Pos,0,False$)
|
||||
|
||||
END
|
||||
|
||||
WOMatParms = 'WO_MAT':@RM:WOMKey:@RM:WOMTableVar:@RM:WOMatRec
|
||||
obj_Tables('WriteRec',WOMatParms) ;* This writes and unlocks the WO_MAT records
|
||||
|
||||
If Not(Get_Status(errCode)) then
|
||||
Done = True$
|
||||
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
|
||||
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNos:':CassNos:' CassCnt:':CassCnt:' WMOLoadQty:':WMOLoadQty:' ||| Trace 3.':AttemptIndex:' Successfully updated WO_MAT record ':WOMKey:' with REL operation.'
|
||||
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
|
||||
end else
|
||||
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
|
||||
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNos:':CassNos:' CassCnt:':CassCnt:' WMOLoadQty:':WMOLoadQty:' ||| Trace 3.':AttemptIndex:' Failed to update WO_MAT record ':WOMKey:' with REL operation.'
|
||||
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
|
||||
end
|
||||
|
||||
IF ReactType = 'EPP' OR ReactType = 'GAN' THEN
|
||||
obj_WO_Wfr('CassRel',WOMKey) ;* Added 3/17/2016 JCH for wafer history
|
||||
END
|
||||
END else
|
||||
END
|
||||
|
||||
WOMatParms = 'WO_MAT':@RM:WOMKey:@RM:WOMTableVar:@RM:WOMatRec
|
||||
obj_Tables('WriteRec',WOMatParms) ;* This writes and unlocks the WO_MAT records
|
||||
|
||||
If Not(Get_Status(errCode)) then
|
||||
Done = True$
|
||||
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
|
||||
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNos:':CassNos:' CassCnt:':CassCnt:' WMOLoadQty:':WMOLoadQty:' ||| Trace 3.':AttemptIndex:' Error! REL_DTM is not null.'
|
||||
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
|
||||
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNo:':CassNo:' WMOLoadQty:':WMOLoadQty:' ||| Trace 3.':AttemptIndex:' Successfully updated WO_MAT record ':WOMKey:' with REL operation.'
|
||||
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
|
||||
end else
|
||||
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
|
||||
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNo:':CassNo:' WMOLoadQty:':WMOLoadQty:' ||| Trace 3.':AttemptIndex:' Failed to update WO_MAT record ':WOMKey:' with REL operation.'
|
||||
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
|
||||
end
|
||||
|
||||
IF ReactType = 'EPP' OR ReactType = 'GAN' THEN
|
||||
obj_WO_Wfr('CassRel',WOMKey) ;* Added 3/17/2016 JCH for wafer history
|
||||
END
|
||||
END else
|
||||
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
|
||||
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNo:':CassNo:' WMOLoadQty:':WMOLoadQty:' ||| Trace 3.':AttemptIndex:' Error! REL_DTM is not null.'
|
||||
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
|
||||
end
|
||||
Until Done
|
||||
Next AttemptIndex
|
||||
end
|
||||
Until Done
|
||||
Next AttemptIndex
|
||||
|
||||
NEXT N
|
||||
|
||||
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
|
||||
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNos:':CassNos:' CassCnt:':CassCnt:' WMOLoadQty:':WMOLoadQty:' ||| Trace 4'
|
||||
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNo:':CassNo:' WMOLoadQty:':WMOLoadQty:' ||| Trace 4'
|
||||
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
|
||||
|
||||
OutOnlyCnt = COUNT(OutOnlyCassIDs,@VM) + (OutOnlyCassIDs NE '')
|
||||
OutOnlyCnt = DCount(OutOnlyCassIDs, @VM)
|
||||
ExistingWOMatKeys = WORec<WO_LOG_WO_MAT_KEY$>
|
||||
NewWOMatKeys = ExistingWOMatKeys
|
||||
FOR I = 1 TO OutOnlyCnt
|
||||
@ -1351,7 +1331,7 @@ ReleaseCassettes:
|
||||
NEXT I
|
||||
|
||||
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
|
||||
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNos:':CassNos:' CassCnt:':CassCnt:' WMOLoadQty:':WMOLoadQty:' ||| Trace 5'
|
||||
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNo:':CassNo:' WMOLoadQty:':WMOLoadQty:' ||| Trace 5'
|
||||
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
|
||||
|
||||
ReactNos = obj_Sched('GetReactNos',WONo) ; // 5/26/2-15 JCH Added schedule ReactNos and check for WO_START_DTM$
|
||||
@ -1401,12 +1381,12 @@ ReleaseCassettes:
|
||||
|
||||
If ErrorMsg NE '' then
|
||||
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
|
||||
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNos:':CassNos:' CassCnt:':CassCnt:' WMOLoadQty:':WMOLoadQty:' ||| Error Message: ':ErrorMsg
|
||||
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNo:':CassNo:' WMOLoadQty:':WMOLoadQty:' ||| Error Message: ':ErrorMsg
|
||||
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
|
||||
end
|
||||
|
||||
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
|
||||
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNos:':CassNos:' CassCnt:':CassCnt:' WMOLoadQty:':WMOLoadQty:' ||| Ending ReleaseCassettes routine'
|
||||
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNo:':CassNo:' WMOLoadQty:':WMOLoadQty:' ||| Ending ReleaseCassette routine'
|
||||
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
|
||||
|
||||
RETURN
|
||||
@ -2348,7 +2328,6 @@ Route:
|
||||
|
||||
IF Get_Status(errCode) THEN RETURN
|
||||
|
||||
|
||||
WOStepKeys = WOLogRec<WO_LOG_WO_STEP_KEY$>
|
||||
|
||||
IF WOStepKeys NE '' THEN
|
||||
@ -2386,7 +2365,6 @@ Route:
|
||||
|
||||
DefWMOCassQtys = XLATE('CUST_EPI_PART',CustNo:'*':EpiPartNo,CUST_EPI_PART_WMO_LOAD_CNT$,'X')
|
||||
|
||||
|
||||
WOStepKeys = ''
|
||||
DefWMOCassQty = ''
|
||||
|
||||
@ -2418,8 +2396,43 @@ Route:
|
||||
WOLogRec<WO_LOG_CUST_PART_NO$> = EpiPN
|
||||
END
|
||||
|
||||
WOLogRec<WO_LOG_PROD_VER_NO$> = ProdVerNo
|
||||
WOLogRec<WO_LOG_CUST_NO$> = CustNo
|
||||
WOLogRec<WO_LOG_PROD_VER_NO$> = ProdVerNo
|
||||
WOLogRec<WO_LOG_CUST_NO$> = CustNo
|
||||
|
||||
WOQty = WOLogRec<WO_LOG_WO_QTY$>
|
||||
If WOQty EQ '' then
|
||||
WOQty = 0
|
||||
WOLogRec<WO_LOG_WO_QTY$> = WOQty
|
||||
end
|
||||
RxQty = WOLogRec<WO_LOG_RX_QTY_STATIC$>
|
||||
If RxQty EQ '' then
|
||||
RxQty = 0
|
||||
WOLOgRec<WO_LOG_RX_QTY_STATIC$> = RxQty
|
||||
end
|
||||
RelQty = WOLogRec<WO_LOG_REL_QTY_STATIC$>
|
||||
If RelQty EQ '' then
|
||||
RelQty = 0
|
||||
WOLogRec<WO_LOG_REL_QTY_STATIC$> = RelQty
|
||||
end
|
||||
UnRelQty = WOLogRec<WO_LOG_UNREL_QTY_STATIC$>
|
||||
If UnRelQty EQ '' then
|
||||
UnRelQty = WOQty - RelQty
|
||||
end
|
||||
OpenQty = WOLogRec<WO_LOG_OPEN_QTY_STATIC$>
|
||||
If OpenQty EQ '' then
|
||||
OpenQty = WOQty - RxQty
|
||||
WOLogRec<WO_LOG_OPEN_QTY_STATIC$> = OpenQty
|
||||
end
|
||||
ScrapQty = WOLogRec<WO_LOG_SCRAP_QTY_STATIC$>
|
||||
If ScrapQty EQ '' then
|
||||
ScrapQty = 0
|
||||
WOLogRec<WO_LOG_SCRAP_QTY_STATIC$> = ScrapQty
|
||||
end
|
||||
ShippedQty = WOLogRec<WO_LOG_STATIC_SHIP_QTY$>
|
||||
If ShippedQty EQ '' then
|
||||
ShippedQty = 0
|
||||
WOLogRec<WO_LOG_STATIC_SHIP_QTY$> = ShippedQty
|
||||
end
|
||||
|
||||
otParms = FIELDSTORE(otParms,@RM,4,0,WOLogRec)
|
||||
obj_Tables('WriteRec',otParms)
|
||||
|
@ -1258,10 +1258,11 @@ AddInvTrans:
|
||||
END
|
||||
END
|
||||
|
||||
OtParms = FieldStore(OtParms,@RM,4,0,WOMatRec) ;* Put record in 4th field of OtParms
|
||||
|
||||
Done = False$
|
||||
NumAttempts = 0
|
||||
OtParms = FieldStore(OtParms,@RM,4,0,WOMatRec) ;* Put record in 4th field of OtParms
|
||||
LogPos = ''
|
||||
ThisEntryAction = ''
|
||||
Done = False$
|
||||
NumAttempts = 0
|
||||
Loop
|
||||
NumAttempts += 1
|
||||
Database_Services('WriteDataRow', 'WO_MAT', WOMatKey, WOMatRec, True$, False$, False$)
|
||||
@ -1310,27 +1311,39 @@ AddInvTrans:
|
||||
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>
|
||||
LastEntryLocCd = WOMatRecVerify<WO_MAT_INV_LOCATION$, LastEntryIndex>
|
||||
If LastEntryAction EQ InvAction AND LastEntryLocCd = LocCd then
|
||||
Done = True$
|
||||
If Pos EQ -1 then
|
||||
LastEntryIndex = DCount(WOMatRecVerify<WO_MAT_INV_WH$>, @VM)
|
||||
LogPos = LastEntryIndex
|
||||
ThisEntryAction = WOMatRecVerify<WO_MAT_INV_ACTION$, LastEntryIndex>
|
||||
ThisEntryLocCd = WOMatRecVerify<WO_MAT_INV_LOCATION$, LastEntryIndex>
|
||||
If ThisEntryAction EQ InvAction AND ThisEntryLocCd = LocCd then
|
||||
Done = True$
|
||||
end
|
||||
end else
|
||||
LogPos = Pos
|
||||
ThisEntryAction = WOMatRecVerify<WO_MAT_INV_ACTION$, Pos>
|
||||
ThisEntryLocCd = WOMatRecVerify<WO_MAT_INV_LOCATION$, Pos>
|
||||
If ThisEntryAction EQ InvAction AND ThisEntryLocCd = LocCd then
|
||||
Done = True$
|
||||
end
|
||||
end
|
||||
Until ( (Done EQ True$) or (NumAttempts EQ 10) )
|
||||
Repeat
|
||||
|
||||
If LogPos EQ '' then LogPos = DCount(WOMatRecVerify<WO_MAT_INV_DTM$>, @VM)
|
||||
|
||||
LogData = ''
|
||||
LogData<1> = WOMatRecVerify<WO_MAT_INV_DTM$, LastEntryIndex>
|
||||
LogData<1> = WOMatRecVerify<WO_MAT_INV_DTM$, LogPos>
|
||||
LogData<2> = WONo
|
||||
LogData<3> = CassNo
|
||||
LogData<4> = WOMatRecVerify<WO_MAT_INV_USER$, LastEntryIndex>
|
||||
LogData<5> = LastEntryIndex
|
||||
LogData<6> = WOMatRecVerify<WO_MAT_INV_TAG$, LastEntryIndex>
|
||||
LogData<7> = WOMatRecVerify<WO_MAT_INV_WH$, LastEntryIndex>
|
||||
LogData<8> = WOMatRecVerify<WO_MAT_INV_LOCATION$, LastEntryIndex>
|
||||
LogData<9> = LastEntryAction
|
||||
LogData<10> = WOMatRecVerify<WO_MAT_INV_TOOL_ID$, LastEntryIndex>
|
||||
LogData<11> = WOMatRecVerify<WO_MAT_INV_SCAN_ENTRY$, LastEntryIndex>
|
||||
LogData<4> = WOMatRecVerify<WO_MAT_INV_USER$, LogPos>
|
||||
LogData<5> = LogPos
|
||||
LogData<6> = WOMatRecVerify<WO_MAT_INV_TAG$, LogPos>
|
||||
LogData<7> = WOMatRecVerify<WO_MAT_INV_WH$, LogPos>
|
||||
LogData<8> = WOMatRecVerify<WO_MAT_INV_LOCATION$, LogPos>
|
||||
LogData<9> = ThisEntryAction
|
||||
LogData<10> = WOMatRecVerify<WO_MAT_INV_TOOL_ID$, LogPos>
|
||||
LogData<11> = WOMatRecVerify<WO_MAT_INV_SCAN_ENTRY$, LogPos>
|
||||
LogData<12> = NumAttempts
|
||||
Logging_Services('AppendLog', WOMatObjLog3, LogData, @RM, @FM)
|
||||
|
||||
@ -5735,6 +5748,3 @@ ExpCOA:
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -551,23 +551,32 @@ RemQAMet:
|
||||
|
||||
IF WOMatQARec<WO_MAT_QA_SIG$,DelPos> = '' THEN
|
||||
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_PROFILE$, DelPos, 0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_PROP$,DelPos,0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_TOOL_CLASS$, DelPos, 0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_STAGE$, DelPos, 0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_MIN$, DelPos, 0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_MAX$, DelPos, 0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_SLOT$, DelPos, 0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_RECIPE$, DelPos, 0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_RECIPE_PATTERN$, DelPos, 0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_SIG$, DelPos, 0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_SIG_DTM$, DelPos, 0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_STD_MAX$, DelPos, 0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_STD_RESULT$, DelPos, 0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_WFR_QTY$, DelPos, 0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_WFR_TYPE$, DelPos, 0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_REACT_SCHED$, DelPos, 0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_SHIP_DOC$, DelPos, 0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_PROFILE$, DelPos, 0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_PROP$,DelPos,0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_TOOL_CLASS$, DelPos, 0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_STAGE$, DelPos, 0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_MIN$, DelPos, 0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_MAX$, DelPos, 0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_SLOT$, DelPos, 0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_RECIPE$, DelPos, 0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_RECIPE_PATTERN$, DelPos, 0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_SIG$, DelPos, 0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_SIG_DTM$, DelPos, 0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_STD_MAX$, DelPos, 0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_STD_RESULT$, DelPos, 0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_WFR_QTY$, DelPos, 0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_WFR_TYPE$, DelPos, 0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_REACT_SCHED$, DelPos, 0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_SHIP_DOC$, DelPos, 0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_DATA_POINTS$, DelPos, 0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_MIN_RESULT$, DelPos, 0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_MAX_RESULT$, DelPos, 0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_RANGE_PCT_RESULT$, DelPos, 0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_EDGE_MEAN_RESULT$, DelPos, 0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_5MM_PCT_RESULT$, DelPos, 0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_OUT_OF_SPEC$, DelPos, 0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_PHASE_MIN$, DelPos, 0)
|
||||
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_FAIL_REASON$, DelPos, 0)
|
||||
|
||||
otParms = FIELDSTORE(otParms,@RM,4,0,WOMatQARec)
|
||||
obj_Tables('WriteRec',otParms)
|
||||
@ -754,5 +763,3 @@ QAResults:
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
|
||||
|
@ -14,7 +14,6 @@ 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, Database_Services
|
||||
DECLARE SUBROUTINE Set_Status, Msg, obj_Tables, RList, ErrMsg, Btree.Extract, obj_WO_Mat_QA, Mona_Services
|
||||
@ -70,222 +69,213 @@ RETURN Result
|
||||
AddRdsNo:
|
||||
* * * * * * *
|
||||
|
||||
StartTick = GetTickCount()
|
||||
MetricName = 'AddRdsNo'
|
||||
StartTick = GetTickCount()
|
||||
MetricName = 'AddRdsNo'
|
||||
|
||||
WONo = Parms[1,@RM]
|
||||
StepNo = Parms[COL2()+1,@RM]
|
||||
ReactNo = Parms[COL2()+1,@RM]
|
||||
RdsNo = Parms[COL2()+1,@RM]
|
||||
CassNo = Parms[COL2()+1,@RM]
|
||||
WONo = Parms[1,@RM]
|
||||
StepNo = Parms[COL2()+1,@RM]
|
||||
ReactNo = Parms[COL2()+1,@RM]
|
||||
RdsNo = Parms[COL2()+1,@RM]
|
||||
CassNo = Parms[COL2()+1,@RM]
|
||||
|
||||
IF WONo = '' THEN RETURN
|
||||
IF StepNo = '' THEN RETURN
|
||||
IF ReactNo = '' THEN RETURN
|
||||
IF RdsNo = '' THEN RETURN
|
||||
IF CassNo = '' THEN RETURN
|
||||
IF WONo = '' THEN RETURN
|
||||
IF StepNo = '' THEN RETURN
|
||||
IF ReactNo = '' THEN RETURN
|
||||
IF RdsNo = '' THEN RETURN
|
||||
IF CassNo = '' THEN RETURN
|
||||
|
||||
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$>
|
||||
|
||||
PSNos = XLATE('WO_LOG',WoNo,'PROD_VER_STEP_PSN','X')
|
||||
PSNo = PSNos<1,StepNo>
|
||||
|
||||
QAMetData = obj_Prod_Spec('GetQAMet',PSNo:@RM:@RM:1) ;* * * Get Reactor Scheduled QA Metrology * * *
|
||||
|
||||
IF QAMetData = '' THEN RETURN ;* No reactor scheduled QA_MET specified
|
||||
|
||||
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$> USING @VM SETTING InsPos THEN
|
||||
WOReactKey = WONo:'*':StepNo:'*':ReactNo
|
||||
|
||||
otParms = 'WO_REACT':@RM:WOReactKey
|
||||
WOReactRec = obj_Tables('UnlockRec',otParms)
|
||||
|
||||
RETURN ;* RDSNo already in this list -> nothing to do.
|
||||
WOReactRec = obj_Tables('ReadOnlyRec',otParms)
|
||||
RDSNos = WOReactRec<WO_REACT_RDS_NO$>
|
||||
CassNos = WOReactRec<WO_REACT_CASS_NO$>
|
||||
|
||||
END ELSE
|
||||
PSNos = XLATE('WO_LOG',WoNo,'PROD_VER_STEP_PSN','X')
|
||||
PSNo = PSNos<1,StepNo>
|
||||
|
||||
LOCATE InsPos IN AllTestPos USING @VM SETTING TrimPos ELSE Null
|
||||
|
||||
QAMetData = obj_Prod_Spec('GetQAMet',PSNo:@RM:@RM:1) ;* * * Get Reactor Scheduled QA Metrology * * *
|
||||
|
||||
IF QAMetData = '' THEN RETURN ;* No reactor scheduled QA_MET specified
|
||||
|
||||
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$> USING @VM SETTING InsPos THEN
|
||||
|
||||
otParms = 'WO_REACT':@RM:WOReactKey
|
||||
WOReactRec = obj_Tables('UnlockRec',otParms)
|
||||
|
||||
RETURN ;* RDSNo already in this list -> nothing to do.
|
||||
|
||||
END ELSE
|
||||
|
||||
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
|
||||
|
||||
WOReactRec = INSERT(WOReactRec,WO_REACT_RDS_NO$,InsPos,0,RDSNo)
|
||||
WOReactRec = INSERT(WOReactRec,WO_REACT_CASS_NO$,InsPos,0,CassNo) ;* Inserts the passed in RDSNo & associated cassette number from the data fields
|
||||
|
||||
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
|
||||
ChangePosList = FIELD(AllTestPos,@VM,TrimPos,SeqCnt)
|
||||
GOSUB RemSchedQA ;* Removes unsigned QAMet from cassettes scheduled past the box being removed
|
||||
|
||||
END
|
||||
// Add QAMet spec data to cassettes now associated with the test
|
||||
// positions after removing the RDS & Cassno from the lists
|
||||
GOSUB AddSchedQA
|
||||
|
||||
WOReactRec = INSERT(WOReactRec,WO_REACT_RDS_NO$,InsPos,0,RDSNo)
|
||||
WOReactRec = INSERT(WOReactRec,WO_REACT_CASS_NO$,InsPos,0,CassNo) ;* Inserts the passed in RDSNo & associated cassette number from the data fields
|
||||
otParms = FIELDSTORE(otParms,@RM,4,0,WOReactRec)
|
||||
// Done with updates to the WO_REACT record
|
||||
obj_Tables('WriteOnlyRec',otParms)
|
||||
|
||||
RDSNos = WOReactRec<WO_REACT_RDS_NO$> ;* List after insert
|
||||
CassNos = WOReactRec<WO_REACT_CASS_NO$> ;* List after insert
|
||||
Result = Log
|
||||
|
||||
* * * 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)
|
||||
obj_Tables('WriteOnlyRec',otParms) ;* Done with updates to the WO_REACT record
|
||||
|
||||
Result = Log
|
||||
|
||||
EndTick = GetTickCount()
|
||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||
EndTick = GetTickCount()
|
||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
|
||||
* * * * * * *
|
||||
RemRDSNo:
|
||||
* * * * * * *
|
||||
|
||||
StartTick = GetTickCount()
|
||||
MetricName = 'RemRDSNo'
|
||||
StartTick = GetTickCount()
|
||||
MetricName = 'RemRDSNo'
|
||||
|
||||
WONo = Parms[1,@RM]
|
||||
StepNo = Parms[COL2()+1,@RM]
|
||||
ReactNo = Parms[COL2()+1,@RM]
|
||||
RdsNo = Parms[COL2()+1,@RM]
|
||||
CassNo = Parms[COL2()+1,@RM]
|
||||
WONo = Parms[1,@RM]
|
||||
StepNo = Parms[COL2()+1,@RM]
|
||||
ReactNo = Parms[COL2()+1,@RM]
|
||||
RdsNo = Parms[COL2()+1,@RM]
|
||||
CassNo = Parms[COL2()+1,@RM]
|
||||
|
||||
IF WONo = '' THEN RETURN
|
||||
IF StepNo = '' THEN RETURN
|
||||
IF ReactNo = '' THEN RETURN
|
||||
IF RdsNo = '' THEN RETURN
|
||||
IF CassNo = '' THEN RETURN
|
||||
IF WONo = '' THEN RETURN
|
||||
IF StepNo = '' THEN RETURN
|
||||
IF ReactNo = '' THEN RETURN
|
||||
IF RdsNo = '' THEN RETURN
|
||||
IF CassNo = '' THEN RETURN
|
||||
|
||||
WOReactKey = WONo:'*':StepNo:'*':ReactNo
|
||||
WOReactKey = WONo:'*':StepNo:'*':ReactNo
|
||||
|
||||
otParms = 'WO_REACT':@RM:WOReactKey
|
||||
// 10/12/18 Changed to ReadOnlyRec as per Francois' instructions. - djs
|
||||
WOReactRec = obj_Tables('ReadOnlyRec',otParms)
|
||||
otParms = 'WO_REACT':@RM:WOReactKey
|
||||
|
||||
WOReactRec = obj_Tables('ReadOnlyRec',otParms)
|
||||
|
||||
RDSNos = WOReactRec<WO_REACT_RDS_NO$>
|
||||
CassNos = WOReactRec<WO_REACT_CASS_NO$>
|
||||
RDSNos = WOReactRec<WO_REACT_RDS_NO$>
|
||||
CassNos = WOReactRec<WO_REACT_CASS_NO$>
|
||||
|
||||
PSNos = XLATE('WO_LOG',WoNo,'PROD_VER_STEP_PSN','X')
|
||||
PSNo = PSNos<1,StepNo>
|
||||
PSNos = XLATE('WO_LOG',WoNo,'PROD_VER_STEP_PSN','X')
|
||||
PSNo = PSNos<1,StepNo>
|
||||
|
||||
QAMetData = obj_Prod_Spec('GetQAMet',PSNo:@RM:@RM:1) ;* * * Get Reactor Scheduled QA Metrology * * *
|
||||
QAMetData = obj_Prod_Spec('GetQAMet',PSNo:@RM:@RM:1) ;* * * Get Reactor Scheduled QA Metrology * * *
|
||||
|
||||
Start = QAMetData<COL$QA_MET_START>
|
||||
Interval = QAMetData<COL$QA_MET_INTERVAL>
|
||||
Stage = QAMetData<COL$QA_MET_STAGE>
|
||||
MetPropCd = QAMetData<COL$QA_MET_PROP>
|
||||
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
|
||||
GOSUB BuildAllTestPos ;* Set RDSNos, Start and Interval -> returns AllTestPos
|
||||
|
||||
IF AllTestPos NE '' THEN
|
||||
IF AllTestPos NE '' THEN
|
||||
|
||||
* * * Find where the the RDS being removed is in the list. * * *
|
||||
* * * 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 RDSNo IN WOReactRec<WO_REACT_RDS_NO$> USING @VM SETTING RemPos THEN
|
||||
|
||||
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
|
||||
WOReactRec = obj_Tables('UnlockRec',otParms)
|
||||
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
|
||||
WOReactRec = obj_Tables('UnlockRec',otParms)
|
||||
|
||||
RETURN ;* RDSNo is not in this list -> nothing to do.
|
||||
END
|
||||
END ;* End of check for AllTestPos null
|
||||
RETURN ;* RDSNo is not in this list -> nothing to do.
|
||||
END
|
||||
END ;* End of check for AllTestPos null
|
||||
|
||||
WOReactRec = DELETE(WOReactRec,WO_REACT_RDS_NO$,RemPos,0)
|
||||
WOReactRec = DELETE(WOReactRec,WO_REACT_CASS_NO$,RemPos,0) ;* Removes the passed in RDSNo & associated cassette number from the data fields
|
||||
WOReactRec = DELETE(WOReactRec,WO_REACT_RDS_NO$,RemPos,0)
|
||||
WOReactRec = DELETE(WOReactRec,WO_REACT_CASS_NO$,RemPos,0) ;* Removes the passed in RDSNo & associated cassette number from the data fields
|
||||
|
||||
RDSNos = WOReactRec<WO_REACT_RDS_NO$> ;* List after removal
|
||||
CassNos = WOReactRec<WO_REACT_CASS_NO$> ;* List after removal
|
||||
RDSNos = WOReactRec<WO_REACT_RDS_NO$> ;* List after removal
|
||||
CassNos = WOReactRec<WO_REACT_CASS_NO$> ;* List after removal
|
||||
|
||||
* * * Now build list for cassette
|
||||
|
||||
GOSUB BuildAllTestPos
|
||||
ChangePosList = FIELD(AllTestPos,@VM,TrimPos,SeqCnt)
|
||||
* * * 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
|
||||
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)
|
||||
|
||||
Result = Log
|
||||
obj_Tables('WriteOnlyRec',otParms) ;* Done with updates to the WO_REACT record
|
||||
|
||||
EndTick = GetTickCount()
|
||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||
Result = Log
|
||||
|
||||
EndTick = GetTickCount()
|
||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
************** Internal Methods *************
|
||||
|
||||
* * * * * * *
|
||||
BuildAllTestPos:
|
||||
* * * * * * *
|
||||
|
||||
AllTestPos = ''
|
||||
AllTestPos = ''
|
||||
|
||||
RDSCnt = COUNT(RDSNos,@VM) + (RDSNos NE '')
|
||||
SeqCnt = 0
|
||||
RDSCnt = COUNT(RDSNos,@VM) + (RDSNos NE '')
|
||||
SeqCnt = 0
|
||||
|
||||
|
||||
FOR TestSeq = 1 TO RDSCnt
|
||||
IF REM((TestSeq - Start),Interval) = 0 THEN
|
||||
AllTestPos<1,-1> = TestSeq ;* Build list of list positions to have QAMet scheduled
|
||||
SeqCnt += 1
|
||||
END
|
||||
NEXT TestSeq
|
||||
FOR TestSeq = 1 TO RDSCnt
|
||||
IF REM((TestSeq - Start),Interval) = 0 THEN
|
||||
AllTestPos<1,-1> = TestSeq ;* Build list of list positions to have QAMet scheduled
|
||||
SeqCnt += 1
|
||||
END
|
||||
NEXT TestSeq
|
||||
|
||||
Log := 'AllTestPos: ':AllTestPos:@FM
|
||||
Log := 'AllTestPos: ':AllTestPos:@FM
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
|
||||
* * * * * * *
|
||||
RemSchedQA:
|
||||
* * * * * * *
|
||||
|
||||
chgCnt = COUNT(ChangePosList,@VM) + (ChangePosList NE '')
|
||||
chgCnt = COUNT(ChangePosList,@VM) + (ChangePosList NE '')
|
||||
|
||||
FOR I = 1 TO chgCnt
|
||||
RemCassNo = CassNos<1,ChangePoslist<1,I>>
|
||||
Log:= 'RemSched on CassNo: ':RemCassNo:@FM
|
||||
|
||||
owmParms = WONo:@RM:StepNo:@RM:RemCassNo:@RM:Stage:@RM:MetPropCd
|
||||
|
||||
obj_WO_Mat_QA('RemQAMet',owmParms) ;* Unschedule test boxes before list change
|
||||
|
||||
IF Get_Status(errCode) THEN
|
||||
ErrMsg(errCode)
|
||||
END
|
||||
|
||||
|
||||
*obj_WO_Mat('RemQAMet',owmParms) ;* Dead 6/5/2015 JCH - Remove after a few days
|
||||
|
||||
*IF Get_Status(errCode) THEN
|
||||
* ErrMsg(errCode)
|
||||
*END
|
||||
NEXT I
|
||||
FOR I = 1 TO chgCnt
|
||||
RemCassNo = CassNos<1,ChangePoslist<1,I>>
|
||||
Log:= 'RemSched on CassNo: ':RemCassNo:@FM
|
||||
|
||||
owmParms = WONo:@RM:StepNo:@RM:RemCassNo:@RM:Stage:@RM:MetPropCd
|
||||
|
||||
obj_WO_Mat_QA('RemQAMet',owmParms) ;* Unschedule test boxes before list change
|
||||
|
||||
IF Get_Status(errCode) THEN
|
||||
ErrMsg(errCode)
|
||||
END
|
||||
|
||||
NEXT I
|
||||
|
||||
RETURN
|
||||
|
||||
@ -294,47 +284,39 @@ RETURN
|
||||
AddSchedQA:
|
||||
* * * * * * *
|
||||
|
||||
chgCnt = COUNT(ChangePosList,@VM) + (ChangePosList NE '')
|
||||
chgCnt = COUNT(ChangePosList,@VM) + (ChangePosList NE '')
|
||||
|
||||
FOR I = 1 TO chgCnt
|
||||
AddCassNo = CassNos<1,ChangePoslist<1,I>>
|
||||
|
||||
Log:= 'AddSched on CassNo: ':AddCassNo:@FM
|
||||
|
||||
owmParms = WONo:@RM
|
||||
owmParms := StepNo:@RM
|
||||
owmParms := AddCassNo:@RM
|
||||
owmParms := QAMetData<COL$QA_MET_STAGE>:@RM
|
||||
owmParms := QAMetData<COL$QA_MET_TEST>:@RM
|
||||
owmParms := QAMetData<COL$QA_MET_PROP>:@RM
|
||||
owmParms := QAMetData<COL$QA_MET_TOOL_CLASS>:@RM
|
||||
owmParms := QAMetData<COL$QA_MET_MIN>:@RM
|
||||
owmParms := QAMetData<COL$QA_MET_MAX>:@RM
|
||||
owmParms := QAMetData<COL$QA_MET_SLOT>:@RM
|
||||
owmParms := QAMetData<COL$QA_MET_RECIPE>:@RM
|
||||
owmParms := QAMetData<COL$QA_MET_RECIPE_PATTERN>:@RM
|
||||
owmParms := QAMetData<COL$QA_MET_WFR_QTY>:@RM
|
||||
owmParms := QAMetData<COL$QA_MET_WFR_TYPE>:@RM
|
||||
owmParms := QAMetData<COL$QA_MET_REACT_SCHED>:@RM
|
||||
owmParms := QAMetData<COL$QA_MET_SHIP_DOC>:@RM
|
||||
owmParms := QAMetData<COL$QA_MET_PHASE_MIN> ; // 10/15/18 - djs - Added Phase Min Spec for HgCV
|
||||
|
||||
|
||||
obj_WO_Mat_QA('AddQAMet', owmParms) ;* Schedule test boxes after list change
|
||||
|
||||
IF Get_Status(errCode) THEN
|
||||
ErrMsg(errCode)
|
||||
END
|
||||
|
||||
*obj_WO_Mat('AddQAMet',owmParms) ;* Dead 6/5/2015 JCH - remove after a few days
|
||||
|
||||
*IF Get_Status(errCode) THEN
|
||||
* ErrMsg(errCode)
|
||||
*END
|
||||
|
||||
|
||||
|
||||
NEXT I
|
||||
FOR I = 1 TO chgCnt
|
||||
AddCassNo = CassNos<1,ChangePoslist<1,I>>
|
||||
|
||||
Log:= 'AddSched on CassNo: ':AddCassNo:@FM
|
||||
|
||||
owmParms = WONo:@RM
|
||||
owmParms := StepNo:@RM
|
||||
owmParms := AddCassNo:@RM
|
||||
owmParms := QAMetData<COL$QA_MET_STAGE>:@RM
|
||||
owmParms := QAMetData<COL$QA_MET_TEST>:@RM
|
||||
owmParms := QAMetData<COL$QA_MET_PROP>:@RM
|
||||
owmParms := QAMetData<COL$QA_MET_TOOL_CLASS>:@RM
|
||||
owmParms := QAMetData<COL$QA_MET_MIN>:@RM
|
||||
owmParms := QAMetData<COL$QA_MET_MAX>:@RM
|
||||
owmParms := QAMetData<COL$QA_MET_SLOT>:@RM
|
||||
owmParms := QAMetData<COL$QA_MET_RECIPE>:@RM
|
||||
owmParms := QAMetData<COL$QA_MET_RECIPE_PATTERN>:@RM
|
||||
owmParms := QAMetData<COL$QA_MET_WFR_QTY>:@RM
|
||||
owmParms := QAMetData<COL$QA_MET_WFR_TYPE>:@RM
|
||||
owmParms := QAMetData<COL$QA_MET_REACT_SCHED>:@RM
|
||||
owmParms := QAMetData<COL$QA_MET_SHIP_DOC>:@RM
|
||||
owmParms := QAMetData<COL$QA_MET_PHASE_MIN> ; // 10/15/18 - djs - Added Phase Min Spec for HgCV
|
||||
|
||||
|
||||
obj_WO_Mat_QA('AddQAMet', owmParms) ;* Schedule test boxes after list change
|
||||
|
||||
IF Get_Status(errCode) THEN
|
||||
ErrMsg(errCode)
|
||||
END
|
||||
|
||||
NEXT I
|
||||
|
||||
RETURN
|
||||
|
||||
|
@ -41,9 +41,11 @@ Function OI_Wizard_Actions(Action, CalcColName, FSList, Handle, Name, FMC, Recor
|
||||
***********************************************************************************************************************/
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$insert LOGICAL
|
||||
$insert FILE.SYSTEM.EQUATES
|
||||
$insert ACTION_SETUP
|
||||
$Insert LOGICAL
|
||||
$Insert FILE.SYSTEM.EQUATES
|
||||
$Insert ACTION_SETUP
|
||||
$Insert OI_WIZARD_EQUATES
|
||||
$Insert TIME_INSERTS
|
||||
|
||||
Declare function UCase, Utility_DotNet, Database_Services, Error_Services, Datetime
|
||||
|
||||
@ -140,12 +142,10 @@ VALID:
|
||||
LastDate = {CREATED_DATE}
|
||||
LastTime = {CREATED_TIME}
|
||||
end
|
||||
lastDateTime = Iconv(Oconv(LastDate, 'D4/') : ' ' : Oconv(LastTime, 'MTS'), 'DTS')
|
||||
SessionAge = (Datetime() - lastDateTime) * 86400
|
||||
// 600 seconds = 10 minutes
|
||||
If SessionAge LT 600 then
|
||||
Valid = True$
|
||||
end
|
||||
LastDateTime = Iconv(Oconv(LastDate, 'D4/') : ' ' : Oconv(LastTime, 'MTS'), 'DTS')
|
||||
SessionAge = (Datetime() - LastDateTime) * SECONDS_IN_DAY$
|
||||
MaxAge = HOUR_IN_SECONDS$ * 12
|
||||
If SessionAge LT MaxAge then Valid = True$
|
||||
end
|
||||
ActionFlow = Valid
|
||||
|
||||
@ -164,8 +164,9 @@ EXPIRY:
|
||||
LastTime = {CREATED_TIME}
|
||||
end
|
||||
lastDateTime = Iconv(Oconv(LastDate, 'D4/') : ' ' : Oconv(LastTime, 'MTS'), 'DTS')
|
||||
// Set expiry to last updated datetime (i.e. last time the session was updated/validated) plus 10 minutes
|
||||
Expiry = lastDateTime + (600 / 86400)
|
||||
// Set expiry to last updated datetime (i.e. last time the session was updated/validated)
|
||||
// plus 12 hours (0.5 of a day).
|
||||
Expiry = lastDateTime + 0.5
|
||||
end
|
||||
ActionFlow = Expiry
|
||||
|
||||
@ -288,3 +289,4 @@ Restore_System_Variables:
|
||||
@FILE.ERROR = OrigFileError
|
||||
|
||||
return
|
||||
|
||||
|
@ -1,9 +1,10 @@
|
||||
Compile function OI_Wizard_Services(@Service, @Params)
|
||||
#pragma precomp SRP_PreCompiler
|
||||
$insert LOGICAL
|
||||
$insert OI_WIZARD_EQUATES
|
||||
$insert OI_WIZARD_TRANSACTIONS_EQUATES
|
||||
$Insert LOGICAL
|
||||
$Insert OI_WIZARD_EQUATES
|
||||
$Insert OI_WIZARD_TRANSACTIONS_EQUATES
|
||||
$Insert REACT_MODE_NG_EQUATES
|
||||
$Insert TIME_INSERTS
|
||||
|
||||
Declare function RTI_CreateGUID, Database_Services, Error_Services, SRP_Json, MemberOf
|
||||
Declare function OI_Wizard_Services, Reactor_Services, Reactor_Modes_Services, Datetime
|
||||
@ -198,9 +199,9 @@ Service ValidateSession(OIWizardID)
|
||||
LastTime = OIWizardRec<OI_WIZARD.CREATED_TIME$>
|
||||
end
|
||||
lastDateTime = Iconv(Oconv(LastDate, 'D4/') : ' ' : Oconv(LastTime, 'MTS'), 'DTS')
|
||||
SessionAge = (Datetime() - lastDateTime) * 86400
|
||||
// 600 seconds = 10 minutes
|
||||
If SessionAge LT 600 then
|
||||
SessionAge = (Datetime() - lastDateTime) * SECONDS_IN_DAY$
|
||||
MaxAge = HOUR_IN_SECONDS$ * 12
|
||||
If SessionAge LT MaxAge then
|
||||
OIWizardRec<OI_WIZARD.UPDATED_DATES$, -1> = Date()
|
||||
OIWizardRec<OI_WIZARD.UPDATED_TIMES$, -1> = Time()
|
||||
Database_Services('WriteDataRow', 'OI_WIZARD', OIWizardID, OIWizardRec)
|
||||
@ -498,11 +499,3 @@ Service ConvertMVTransactionToJSON(TransactionID, mvTransaction, itemURL)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,481 +0,0 @@
|
||||
COMPILE SUBROUTINE Print_Demand(ReportParm)
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
/*
|
||||
Print Material Demand Report
|
||||
10/27/2016 - John C Henry, J.C. Henry & Co., Inc. - Initial Coding
|
||||
10/05/2017 - Donald Bakke - No longer select SCHED_DET rows with an end date specified.
|
||||
10/24/2018 - Daniel Stieber - Patch added to resolve scheduling conflicts on the same day
|
||||
*/
|
||||
|
||||
DECLARE SUBROUTINE Utility, ErrMsg, Set_Status, Set_Printer, RList, SRP_Stopwatch
|
||||
DECLARE FUNCTION Set_Printer, Get_Printer, Msg, Get_Status, Printer_Select, obj_Install, Dialog_Box, obj_Location
|
||||
DECLARE FUNCTION Schedule_Services
|
||||
|
||||
$INSERT OIPRINT_EQUATES
|
||||
$INSERT SCHED_DET_EQUATES
|
||||
$INSERT WO_LOG_EQUATES
|
||||
$INSERT APPCOLORS
|
||||
$INSERT MSG_EQUATES
|
||||
$INSERT LOGICAL
|
||||
$INSERT SCHEDULE_EQU
|
||||
|
||||
EQU TAB$ TO \09\
|
||||
EQU TARGET_ACTIVELIST$ TO 5
|
||||
|
||||
Main:
|
||||
ErrorTitle = 'Error in stored procedure Print_Demand'
|
||||
ErrCode = ''
|
||||
ErrorMsg = ''
|
||||
SRP_Stopwatch('Reset')
|
||||
SRP_Stopwatch('Start', 'Initializing')
|
||||
OPEN 'SCHED_DET' TO SchedDetTable ELSE
|
||||
ErrorMsg = 'Unable to open "SCHED_DET" table.'
|
||||
ErrMsg(ErrorTitle:@SVM:ErrorMsg)
|
||||
RETURN
|
||||
END
|
||||
|
||||
OPEN 'DICT.SCHED_DET' TO @DICT ELSE
|
||||
ErrorMsg = 'Unable to open "SCHED_DET" table.'
|
||||
ErrMsg(ErrorTitle:@SVM:ErrorMsg)
|
||||
RETURN
|
||||
END
|
||||
|
||||
|
||||
Today = OCONV(Date(),'D4/')
|
||||
|
||||
EndDate = OCONV(Date()+13,'D4/')
|
||||
|
||||
|
||||
ReactList = ''
|
||||
WOList = ''
|
||||
SchedDetKeys = ''
|
||||
PrevReactNo = ''
|
||||
PrevWO = ''
|
||||
|
||||
SelectSent = 'SELECT SCHED_DET WITH SCHED_DT GE ':QUOTE(Today):' BY REACT_NO'
|
||||
|
||||
SRP_Stopwatch('Stop', 'Initializing')
|
||||
SRP_Stopwatch('Start', 'Data Select')
|
||||
|
||||
RList(SelectSent,TARGET_ACTIVELIST$,'','','')
|
||||
IF Get_Status(errCode) THEN
|
||||
ErrMsg(errCode)
|
||||
RETURN
|
||||
END
|
||||
SRP_Stopwatch('Stop', 'Data Select')
|
||||
SRP_Stopwatch('Start', 'Build Key List')
|
||||
Done = 0
|
||||
@ID = ''
|
||||
LOOP
|
||||
PrevSchedDetKey = @ID
|
||||
READNEXT @ID ELSE Done = 1
|
||||
UNTIL Done
|
||||
ReactNo = @ID[1,'*']
|
||||
SchedDt = @ID[COL2()+1,'*']
|
||||
SeqNo = @ID[COL2()+1,'*']
|
||||
|
||||
READ SchedDetRec FROM SchedDetTable,@ID THEN
|
||||
|
||||
WONo = SchedDetRec<SCHED_DET_WO_NO$>
|
||||
|
||||
LOCATE ReactNo IN ReactList BY 'AR' USING @FM SETTING Pos ELSE
|
||||
ReactList = INSERT(ReactList,Pos,0,0,ReactNo)
|
||||
END
|
||||
|
||||
PrevReactNo = Field(PrevSchedDetKey, '*', 1)
|
||||
PrevSchedDt = Field(PrevSchedDetKey, '*', 2)
|
||||
|
||||
LOCATE WONo IN WOList<Pos> USING @VM SETTING WPos ELSE
|
||||
WOList = INSERT(WOList,Pos,-1,0,WONo)
|
||||
// Patch added on 10/24/18 to resolve scheduling conflicts on the same day for
|
||||
// the material track report. - djs
|
||||
If (PrevReactNo EQ ReactNo) and (PrevSchedDt EQ SchedDt) then
|
||||
PrevSeqNo = Field(PrevSchedDetKey, '*', 3)
|
||||
NumWO = DCount(WOList<Pos>, @VM)
|
||||
PrevWONo = WOList<Pos, NumWO - 1>
|
||||
SchedEvents = Schedule_Services('GetScheduleEventSummary', ReactNo, WONo, SchedDt, SeqNo, True$)
|
||||
StartDt = IConv(SchedEvents<SCHEDULE_ENTRY_DATE$>, 'D')
|
||||
PrevSchedEvents = Schedule_Services('GetScheduleEventSummary', ReactNo, PrevWONo, PrevSchedDt, PrevSeqNo, True$)
|
||||
PrevStartDt = IConv(PrevSchedEvents<SCHEDULE_ENTRY_DATE$>, 'D')
|
||||
If StartDt GT PrevStartDt then
|
||||
// This is the common case
|
||||
SchedDetKeys = INSERT(SchedDetKeys,-1,0,0,@ID)
|
||||
end else
|
||||
// Scheduling irregularity - Insert this key in the second to last position.
|
||||
NumKeys = DCount(SchedDetKeys, @FM)
|
||||
InsertPos = NumKeys
|
||||
SchedDetKeys = INSERT(SchedDetKeys,InsertPos,0,0,@ID)
|
||||
end
|
||||
end else
|
||||
SchedDetKeys = INSERT(SchedDetKeys,-1,0,0,@ID)
|
||||
end
|
||||
END
|
||||
END
|
||||
|
||||
REPEAT
|
||||
|
||||
CALL Make.List(0,SchedDetKeys,SchedDetTable,@DICT)
|
||||
SRP_Stopwatch('Stop', 'Build Key List')
|
||||
SRP_Stopwatch('Start', 'Build Report')
|
||||
IF ReportParm = 'T' THEN
|
||||
|
||||
* Tracking Report
|
||||
|
||||
Header = "'D'":@VM:obj_Install('Get_Prop','CompTitle'):' Material Tracking by Reactor':@VM:"Page 'P'"
|
||||
MinDemand = 0
|
||||
|
||||
END
|
||||
|
||||
IF ReportParm = 'D' THEN
|
||||
|
||||
* Demand Report
|
||||
|
||||
MinDemand = Msg(@WINDOW,'','MIN_DEMAND_QTY')
|
||||
Header = "'D'":@VM:obj_Install('Get_Prop','CompTitle'):' Material Demand with Reactor Queue < ':MinDemand:' Cassettes':@VM:"Page 'P'"
|
||||
|
||||
END
|
||||
|
||||
Set_Status(0)
|
||||
|
||||
* Start of printing process
|
||||
|
||||
FileName = 'Print Material Demand'
|
||||
Title = 'Printing Material Demand'
|
||||
|
||||
TopMargin = 1.0
|
||||
BottomMargin = 0.75
|
||||
LeftMargin = 0.25
|
||||
RightMargin = 0.25
|
||||
|
||||
Margins = LeftMargin:@FM:TopMargin:@FM:RightMargin:@FM:BottomMargin
|
||||
|
||||
PageSetup = '1' ;* LandScape
|
||||
PrintSetup = '2' ;* Preview Normal
|
||||
PrintSetup<1,2> = '0' ;* All buttons
|
||||
PrintSetup<1,5> = '1' ;* Page Range
|
||||
PrintSetup<1,6> = 7 ;* full mouse and keyboard support
|
||||
|
||||
PrintPath = ''
|
||||
stat = Set_Printer('INIT',FileName,Title,Margins,PageSetup,PrintSetup,PrintPath)
|
||||
|
||||
IF stat < 0 THEN
|
||||
ErrorMsg = 'Stat = ' : Stat : ', PrintPath = ' : PrintPath
|
||||
GOTO OIPrintErr
|
||||
end
|
||||
DateRange = 'Effective ':OCONV(Date(),'D4')
|
||||
|
||||
Header<-1> = "'T'"
|
||||
Header<-1> = '' ;* Blank line following heading
|
||||
|
||||
font = 'Arial'
|
||||
font<2> = '10'
|
||||
font<4> = '0' ;* Bold
|
||||
|
||||
stat = Set_Printer('FONTHEADFOOT',font) ; IF stat < 0 THEN GOTO OIPrintErr
|
||||
stat = Set_Printer('HEADER',Header) ; IF stat < 0 THEN GOTO OIPrintErr
|
||||
|
||||
Footer = " 'D' 'T'":@VM:@VM:"Page: 'P'"
|
||||
stat = Set_Printer('FOOTER',Footer) ; IF stat < 0 THEN GOTO OIPrintErr
|
||||
|
||||
*
|
||||
@RECCOUNT = 0
|
||||
FirstPass = 1
|
||||
LastRecord = 0
|
||||
FirstLine = 1
|
||||
fontSpacing = 100
|
||||
|
||||
* Make Column Heading
|
||||
|
||||
ColHead = '' ; ColFmt = ''
|
||||
ColHead<1,1> = 'React No' ; ColFmt<1,1> = '+^720'
|
||||
ColHead<1,2> = 'React Type' ; ColFmt<1,2> = '+<^720'
|
||||
ColHead<1,4> = 'WO No' ; ColFmt<1,4> = '+^1000'
|
||||
ColHead<1,5> = 'SAP Prod No' ; ColFmt<1,5> = '+^1000'
|
||||
ColHead<1,6> = 'Sub Part No' ; ColFmt<1,6> = '+<1200'
|
||||
ColHead<1,7> = 'Epi Part No' ; ColFmt<1,7> = '+<1200'
|
||||
ColHead<1,8> = 'WO Qty' ; ColFmt<1,8> = '+>720'
|
||||
ColHead<1,9> = 'RX Qty' ; ColFmt<1,9> = '+>720'
|
||||
ColHead<1,10> = 'UnRel Qty' ; ColFmt<1,10> = '+>720'
|
||||
ColHead<1,11> = 'Kit Location' ; ColFmt<1,11> = '+^1260'
|
||||
ColHead<1,12> = 'Kit Qty' ; ColFmt<1,12> = '+^720'
|
||||
IF ReportParm = 'T' THEN
|
||||
ColHead<1,3> = 'Wafer Size' ; ColFmt<1,3> = '+^1400'
|
||||
ColHead<1,13> = 'PTI Location' ; ColFmt<1,13> = '+^1260'
|
||||
ColHead<1,14> = 'PTI RO' ; ColFmt<1,14> = '+^3380'
|
||||
END ELSE
|
||||
ColHead<1,3> = 'Wafer Size' ; ColFmt<1,3> = '+^1000'
|
||||
ColHead<1,13> = '1K Stage Location' ; ColFmt<1,13> = '+^1260'
|
||||
ColHead<1,14> = 'Stage Qty' ; ColFmt<1,14> = '+^1260'
|
||||
ColHead<1,15> = 'PTI Location' ; ColFmt<1,15> = '+^1260'
|
||||
ColHead<1,16> = 'PTI RO' ; ColFmt<1,16> = '+^1260'
|
||||
END
|
||||
|
||||
|
||||
* Zero Accumulators For Each Break
|
||||
|
||||
Prev.ReactNo = ''
|
||||
Last.ReactNo.Break = 1
|
||||
|
||||
* * * * * * *
|
||||
ReadRecord:
|
||||
* * * * * * *
|
||||
|
||||
* Zero Break Flags To False
|
||||
|
||||
ReactNo.Break=0
|
||||
|
||||
READNEXT @ID, Which.Value ELSE
|
||||
LastRecord = 1
|
||||
ReactNo.Break = 1
|
||||
ReactNo = Prev.ReactNo
|
||||
END
|
||||
|
||||
S.ATID = @ID
|
||||
|
||||
IF FirstPass AND LastRecord THEN
|
||||
GOTO Bail
|
||||
END
|
||||
|
||||
IF LastRecord THEN GOTO BREAKS
|
||||
|
||||
READO @RECORD FROM SchedDetTable,@ID ELSE
|
||||
GOTO ReadRecord
|
||||
END
|
||||
|
||||
@RECCOUNT += 1
|
||||
|
||||
* Calculate Value(s) For Column(s)
|
||||
|
||||
S.ATID = {@ID}
|
||||
I.ATID = S.ATID
|
||||
S.ReactNo = {REACT_NO}
|
||||
I.ReactNo = S.ReactNo
|
||||
S.WoNo = {WO_NO}
|
||||
I.WoNo = S.WoNo
|
||||
S.SubPartNo = XLATE('WO_LOG',S.WoNo,'ORD_SUB_PART_NO','X')
|
||||
I.SubPartNo = S.SubPartNo
|
||||
S.EpiPartNo = XLATE('WO_LOG',S.WoNo,WO_LOG_EPI_PART_NO$,'X')
|
||||
I.EpiPartNo = S.EpiPartNo
|
||||
S.WO_Qty = {WO_QTY}
|
||||
I.WO_Qty = S.WO_Qty
|
||||
S.WO_RX_Qty = {WO_RX_QTY}
|
||||
I.WO_RX_Qty = S.WO_RX_Qty
|
||||
S.WO_UnRel_QTY = {WO_UNREL_QTY}
|
||||
I.WO_UnRel_QTY = S.WO_UnRel_QTY
|
||||
S.Sched_DT = {SCHED_DT}
|
||||
I.Sched_DT = S.Sched_DT
|
||||
*Changed Here JRO
|
||||
S.REACT_TYPE = {REACTOR_TYPE}
|
||||
S.WAFER_SIZE = {WAFER_SIZE}
|
||||
S.ProdOrdNo = {PROD_ORD_NO}
|
||||
|
||||
KitData = obj_Location('KitLocations',S.WONo)
|
||||
|
||||
SWAP CRLF$ WITH @VM IN KitData
|
||||
|
||||
S.KitLocation = KitData<1>
|
||||
I.KitLocation = S.KitLocation
|
||||
|
||||
S.KitQty = OCONV(SUM(KitData<2>) * 25,'MD0,Z')
|
||||
I.KitQty = S.KitQty
|
||||
|
||||
S.KitCassCnt = COUNT(KitData<3>,',') + (KitData<3> NE '')
|
||||
I.KitCassCnt = S.KitCassCnt
|
||||
|
||||
StageData = obj_Location('StageLocations',S.WONo)
|
||||
|
||||
SWAP CRLF$ WITH @VM IN StageData
|
||||
|
||||
S.StageLocation = StageData<1>
|
||||
I.StageLocation = S.StageLocation
|
||||
|
||||
S.StageQty = StageData<3>
|
||||
I.StageQty = S.StageQty
|
||||
|
||||
S.StageCassCnt = COUNT(S.StageQty,',') + (S.StageQty NE '')
|
||||
I.StageCassCnt = S.StageCassCnt
|
||||
|
||||
PTIData = obj_Location('PTILocations',S.WONo)
|
||||
|
||||
SWAP CRLF$ WITH @VM IN PTIData
|
||||
|
||||
S.PTILocation = PTIData<1>
|
||||
I.PTILocation = S.PTILocation
|
||||
|
||||
S.PTIQty = PTIData<3>
|
||||
I.PTIQty = S.PTIQty
|
||||
|
||||
S.PTICassCnt = COUNT(S.PTIQty,',') + (S.PTIQty NE '')
|
||||
I.PTICassCnt = S.PTICassCnt
|
||||
|
||||
CassQueueCnt = I.KitCassCnt + I.StageCassCnt + I.PTICassCnt
|
||||
|
||||
* TEST FOR CONTROL BREAK(S)
|
||||
|
||||
IF (S.ReactNo NE Prev.ReactNo) OR ReactNo.Break THEN
|
||||
ReactNo = Prev.ReactNo
|
||||
Prev.ReactNo = S.ReactNo
|
||||
ReactNo.Break += 1
|
||||
END
|
||||
|
||||
IF FirstPass THEN
|
||||
FirstPass=0
|
||||
GOTO DETAIL
|
||||
END
|
||||
|
||||
* * * * * * *
|
||||
BREAKS:
|
||||
* * * * * * *
|
||||
|
||||
* Print Break Total(s) And Accumulate Total(s)
|
||||
|
||||
IF ReactNo.Break THEN
|
||||
|
||||
IF ReportParm = 'D' ELSE
|
||||
stat = Set_Printer('TEXT')
|
||||
END
|
||||
|
||||
END
|
||||
|
||||
|
||||
* Perform Last Record Output If Done
|
||||
|
||||
IF LastRecord THEN
|
||||
|
||||
colData = ''
|
||||
|
||||
|
||||
GOTO Bail
|
||||
|
||||
END
|
||||
|
||||
|
||||
* * * * * * *
|
||||
DETAIL:
|
||||
* * * * * * *
|
||||
|
||||
* Do Conversion If Any
|
||||
|
||||
IF ReportParm = 'T' OR CassQueueCnt < MinDemand THEN
|
||||
|
||||
IF S.REACTNO NE "" THEN S.REACTNO = OCONV(S.REACTNO,"MD0,")
|
||||
IF S.WONO NE "" THEN S.WONO = OCONV(S.WONO,"MD0")
|
||||
IF S.WO_QTY NE "" THEN S.WO_QTY = OCONV(S.WO_QTY,"MD0,")
|
||||
IF S.WO_RX_QTY NE "" THEN S.WO_RX_QTY = OCONV(S.WO_RX_QTY,"MD0,")
|
||||
IF S.WO_UNREL_QTY NE "" THEN S.WO_UNREL_QTY = OCONV(S.WO_UNREL_QTY,"MD0,")
|
||||
IF S.SCHED_DT NE "" THEN S.SCHED_DT = OCONV(S.SCHED_DT,"D4/")
|
||||
|
||||
* PRINT DETAIL LINE
|
||||
|
||||
COLDATA = ''
|
||||
RowNumber = 0
|
||||
CassList = ''
|
||||
|
||||
For each Location in S.PTILocation using @VM setting fPos
|
||||
LocationCassNos = S.PTIQty<0, fPos>
|
||||
If S.React_Type NE 'EPP' then
|
||||
For each CassNo in LocationCassNos using ','
|
||||
WOMatKey = S.WONO:'*':CassNo
|
||||
CurrStatus = Xlate('WO_MAT', WOMatKey, 'CURR_STATUS', 'X')
|
||||
If ( (CurrStatus EQ 'VER') OR (CurrStatus EQ 'LOAD') OR (CurrStatus EQ 'REL') ) then
|
||||
* If ( (CurrStatus EQ 'VER') ) then
|
||||
CassList = Insert(CassList, 0, -1, 0, CassNo)
|
||||
end
|
||||
Next CassNo
|
||||
end else
|
||||
CassList = Insert(CassList, 0, -1, 0, LocationCassNos)
|
||||
end
|
||||
Next Location
|
||||
|
||||
If CassList NE '' then
|
||||
RowNumber += 1
|
||||
Convert @VM to ',' in CassList
|
||||
COLDATA<RowNumber,1> = S.ReactNo
|
||||
COLDATA<RowNumber,2> = S.React_Type
|
||||
COLDATA<RowNumber,3> = S.Wafer_Size
|
||||
COLDATA<RowNumber,4> = S.WoNo
|
||||
SWAP '.1' WITH '' IN S.ProdOrdNo
|
||||
COLDATA<RowNumber,5> = S.ProdOrdNo
|
||||
COLDATA<RowNumber,6> = S.SubPartNo
|
||||
ColData<RowNumber,7> = S.EpiPartNo
|
||||
COLDATA<RowNumber,8> = S.WO_Qty
|
||||
COLDATA<RowNumber,9> = S.WO_RX_Qty
|
||||
COLDATA<RowNumber,10> = S.WO_UnRel_Qty
|
||||
COLDATA<RowNumber,11> = S.KitLocation
|
||||
COLDATA<RowNumber,12> = S.KitQty
|
||||
COLDATA<RowNumber,13> = S.PTILocation<0, fPos>
|
||||
COLDATA<RowNumber,14> = CassList
|
||||
|
||||
If COLDATA NE '' then GoSub PrintTable
|
||||
END
|
||||
END
|
||||
|
||||
GOTO ReadRecord
|
||||
|
||||
|
||||
* * * * * * *
|
||||
Bail:
|
||||
* * * * * * *
|
||||
|
||||
stat = Set_Printer('TERM',1)
|
||||
SRP_Stopwatch('Stop', 'Build Report')
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
* * * * * * *
|
||||
OIPrintErr:
|
||||
* * * * * * *
|
||||
|
||||
ErrMsg(ErrorTitle:@SVM:ErrorMsg)
|
||||
ErrMsg(ErrorTitle:@SVM:'Set_Printer returned errorcode ':stat)
|
||||
stat = Set_Printer('TERM',1)
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
* * * * * *
|
||||
PrintTable:
|
||||
* * * * * *
|
||||
|
||||
PageHeight = Get_Printer('PAGESIZE')<2>
|
||||
PrintableHeight = PageHeight - TopMargin - BottomMargin
|
||||
PrinterHeight = Get_Printer('POS')<2>
|
||||
|
||||
stat = Set_Printer('CALCTABLE',ColFmt:@FM:ColData)
|
||||
TableSize = Get_Printer('CALCTABLE')
|
||||
|
||||
|
||||
TableHeight = TableSize<2>
|
||||
|
||||
fontSpacing = 120
|
||||
|
||||
IF ( TableHeight + PrinterHeight >= PrintableHeight ) OR FirstLine THEN
|
||||
IF NOT(FirstLine) THEN
|
||||
stat = Set_Printer('PAGEBREAK')
|
||||
END
|
||||
FirstLine = 0
|
||||
font<2> = 10
|
||||
font<4> = 1 ;* Bold
|
||||
stat = Set_Printer('FONT',font,'100')
|
||||
|
||||
stat = Set_Printer('ADDTABLE',colFmt,colHead,'',LTGREY$,'',0,TB_ALL)
|
||||
|
||||
|
||||
font<4> = 0
|
||||
stat = Set_Printer('FONT',font,fontSpacing)
|
||||
|
||||
stat = Set_Printer('ADDTABLE',colFmt,'',colData,LTGREY$,'',0,7)
|
||||
|
||||
END ELSE
|
||||
font<2> = 10
|
||||
font<4> = 0
|
||||
stat = Set_Printer('FONT',font,fontSpacing)
|
||||
stat = Set_Printer('ADDTABLE',colFmt,'',colData,LTGREY$,'',1,TB_ALL)
|
||||
|
||||
END
|
||||
|
||||
|
||||
RETURN
|
||||
|
@ -1,534 +0,0 @@
|
||||
COMPILE SUBROUTINE Print_Demand(ReportParm)
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
/*
|
||||
Print Material Demand Report
|
||||
10/27/2016 - John C Henry, J.C. Henry & Co., Inc. - Initial Coding
|
||||
10/05/2017 - Donald Bakke - No longer select SCHED_DET rows with an end date specified.
|
||||
10/24/2018 - Daniel Stieber - Patch added to resolve scheduling conflicts on the same day
|
||||
*/
|
||||
|
||||
DECLARE SUBROUTINE Utility, ErrMsg, Set_Status, Set_Printer, RList, SRP_Stopwatch
|
||||
DECLARE FUNCTION Set_Printer, Get_Printer, Msg, Get_Status, Printer_Select, obj_Install, Dialog_Box, obj_Location
|
||||
DECLARE FUNCTION Schedule_Services
|
||||
|
||||
$INSERT OIPRINT_EQUATES
|
||||
$INSERT SCHED_DET_EQUATES
|
||||
$INSERT WO_LOG_EQUATES
|
||||
$INSERT APPCOLORS
|
||||
$INSERT MSG_EQUATES
|
||||
$INSERT LOGICAL
|
||||
$INSERT SCHEDULE_EQU
|
||||
|
||||
EQU TAB$ TO \09\
|
||||
EQU TARGET_ACTIVELIST$ TO 5
|
||||
|
||||
ErrorTitle = 'Error in stored procedure Print_Demand'
|
||||
ErrCode = ''
|
||||
ErrorMsg = ''
|
||||
SRP_Stopwatch('Reset')
|
||||
SRP_Stopwatch('Start', 'Initializing')
|
||||
OPEN 'SCHED_DET' TO SchedDetTable ELSE
|
||||
ErrorMsg = 'Unable to open "SCHED_DET" table.'
|
||||
ErrMsg(ErrorTitle:@SVM:ErrorMsg)
|
||||
RETURN
|
||||
END
|
||||
|
||||
OPEN 'DICT.SCHED_DET' TO @DICT ELSE
|
||||
ErrorMsg = 'Unable to open "SCHED_DET" table.'
|
||||
ErrMsg(ErrorTitle:@SVM:ErrorMsg)
|
||||
RETURN
|
||||
END
|
||||
|
||||
// Two full week
|
||||
Today = OCONV(Date(),'D4/')
|
||||
EndDate = OCONV(Date()+13,'D4/')
|
||||
|
||||
ReactList = ''
|
||||
WOList = ''
|
||||
SchedDetKeys = ''
|
||||
|
||||
* SelectSent = 'SELECT SCHED_DET WITH SCHED_DT GE ':QUOTE(Today):' AND WITH SCHED_DT LE ':QUOTE(EndDate):' BY REACT_NO'
|
||||
SelectSent = 'SELECT SCHED_DET WITH SCHED_DT GE ':QUOTE(Today):' BY REACT_NO'
|
||||
|
||||
SRP_Stopwatch('Stop', 'Initializing')
|
||||
SRP_Stopwatch('Start', 'Data Select')
|
||||
RList(SelectSent,TARGET_ACTIVELIST$,'','','')
|
||||
IF Get_Status(errCode) THEN
|
||||
ErrMsg(errCode)
|
||||
RETURN
|
||||
END
|
||||
SRP_Stopwatch('Stop', 'Data Select')
|
||||
SRP_Stopwatch('Start', 'Build Key List')
|
||||
Done = 0
|
||||
|
||||
LOOP
|
||||
READNEXT @ID ELSE Done = 1
|
||||
UNTIL Done
|
||||
ReactNo = @ID[1,'*']
|
||||
SchedDt = @ID[COL2()+1,'*']
|
||||
SeqNo = @ID[COL2()+1,'*']
|
||||
* If @User4 EQ 'FRANCOIS_R' and ReactNo EQ '77' then debug
|
||||
READ SchedDetRec FROM SchedDetTable,@ID THEN
|
||||
|
||||
WONo = SchedDetRec<SCHED_DET_WO_NO$>
|
||||
|
||||
LOCATE ReactNo IN ReactList BY 'AR' USING @FM SETTING Pos ELSE
|
||||
ReactList = INSERT(ReactList,Pos,0,0,ReactNo)
|
||||
END
|
||||
|
||||
LOCATE WONo IN WOList<Pos> USING @VM SETTING WPos ELSE
|
||||
WOList = INSERT(WOList,Pos,-1,0,WONo)
|
||||
// Patch added on 10/24/18 to resolve scheduling conflicts on the same day for
|
||||
// the material track report. - djs
|
||||
PrevSchedDetKey = SchedDetKeys[-1, 'B':@FM]
|
||||
PrevReactNo = Field(PrevSchedDetKey, '*', 1)
|
||||
PrevSchedDt = Field(PrevSchedDetKey, '*', 2)
|
||||
If (PrevReactNo EQ ReactNo) and (PrevSchedDt EQ SchedDt) then
|
||||
PrevSeqNo = Field(PrevSchedDetKey, '*', 3)
|
||||
NumWO = DCount(WOList<Pos>, @VM)
|
||||
PrevWONo = WOList<Pos, NumWO - 1>
|
||||
SchedEvents = Schedule_Services('GetScheduleEventSummary', ReactNo, WONo, SchedDt, SeqNo, True$)
|
||||
StartDt = IConv(SchedEvents<SCHEDULE_ENTRY_DATE$>, 'D')
|
||||
PrevSchedEvents = Schedule_Services('GetScheduleEventSummary', ReactNo, PrevWONo, PrevSchedDt, PrevSeqNo, True$)
|
||||
PrevStartDt = IConv(PrevSchedEvents<SCHEDULE_ENTRY_DATE$>, 'D')
|
||||
If StartDt GT PrevStartDt then
|
||||
// This is the common case
|
||||
SchedDetKeys = INSERT(SchedDetKeys,-1,0,0,@ID)
|
||||
end else
|
||||
// Scheduling irregularity - Insert this key in the second to last position.
|
||||
NumKeys = DCount(SchedDetKeys, @FM)
|
||||
InsertPos = NumKeys
|
||||
SchedDetKeys = INSERT(SchedDetKeys,InsertPos,0,0,@ID)
|
||||
end
|
||||
end else
|
||||
SchedDetKeys = INSERT(SchedDetKeys,-1,0,0,@ID)
|
||||
end
|
||||
END
|
||||
END
|
||||
|
||||
REPEAT
|
||||
|
||||
CALL Make.List(0,SchedDetKeys,SchedDetTable,@DICT)
|
||||
SRP_Stopwatch('Stop', 'Build Key List')
|
||||
SRP_Stopwatch('Start', 'Build Report')
|
||||
IF ReportParm = 'T' THEN
|
||||
|
||||
* Tracking Report
|
||||
|
||||
Header = "'D'":@VM:obj_Install('Get_Prop','CompTitle'):' Material Tracking by Reactor':@VM:"Page 'P'"
|
||||
MinDemand = 0
|
||||
|
||||
END
|
||||
|
||||
IF ReportParm = 'D' THEN
|
||||
|
||||
* Demand Report
|
||||
|
||||
MinDemand = Msg(@WINDOW,'','MIN_DEMAND_QTY')
|
||||
Header = "'D'":@VM:obj_Install('Get_Prop','CompTitle'):' Material Demand with Reactor Queue < ':MinDemand:' Cassettes':@VM:"Page 'P'"
|
||||
|
||||
END
|
||||
|
||||
Set_Status(0)
|
||||
|
||||
/*
|
||||
Today = OCONV(Date(),'D4/')
|
||||
Tomorrow = OCONV(Date()+1,'D4/')
|
||||
|
||||
SelectSent = 'SELECT SCHED_DET WITH SCHED_DT = ':QUOTE(Today):' BY REACT_NO'
|
||||
|
||||
RList(SelectSent,TARGET_ACTIVELIST$,'','','')
|
||||
IF Get_Status(errCode) THEN
|
||||
ErrMsg(errCode)
|
||||
RETURN
|
||||
END
|
||||
*/
|
||||
|
||||
* Start of printing process
|
||||
|
||||
FileName = 'Print Material Demand'
|
||||
Title = 'Printing Material Demand'
|
||||
|
||||
TopMargin = 1.0
|
||||
BottomMargin = 0.75
|
||||
LeftMargin = 0.25
|
||||
RightMargin = 0.25
|
||||
|
||||
Margins = LeftMargin:@FM:TopMargin:@FM:RightMargin:@FM:BottomMargin
|
||||
|
||||
PageSetup = '1' ;* LandScape
|
||||
PrintSetup = '2' ;* Preview Normal
|
||||
PrintSetup<1,2> = '0' ;* All buttons
|
||||
PrintSetup<1,5> = '1' ;* Page Range
|
||||
PrintSetup<1,6> = 7 ;* full mouse and keyboard support
|
||||
|
||||
If @UserName EQ 'MESCATXMUSER' then
|
||||
PageSetup = '1' ;* Landscape
|
||||
PrintSetup = '0' ;* Print to specific location
|
||||
PrintPath = Printer_Select(PrinterID) ;* Select printer - Displays popup if PrinterPort not found
|
||||
end else
|
||||
* PrintPath = Printer_Select('',1) ;* Get Default printer path
|
||||
PrintPath = ''
|
||||
end
|
||||
stat = Set_Printer('INIT',FileName,Title,Margins,PageSetup,PrintSetup,PrintPath)
|
||||
|
||||
IF stat < 0 THEN
|
||||
ErrorMsg = 'Stat = ' : Stat : ', PrintPath = ' : PrintPath
|
||||
GOTO OIPrintErr
|
||||
end
|
||||
DateRange = 'Effective ':OCONV(Date(),'D4')
|
||||
|
||||
|
||||
*Header = "'D'":@VM:obj_Install('Get_Prop','CompTitle'):' Material Tracking by Reactor':@VM:"Page 'P'"
|
||||
Header<-1> = "'T'"
|
||||
Header<-1> = '' ;* Blank line following heading
|
||||
|
||||
font = 'Arial'
|
||||
font<2> = '10'
|
||||
font<4> = '0' ;* Bold
|
||||
|
||||
stat = Set_Printer('FONTHEADFOOT',font) ; IF stat < 0 THEN GOTO OIPrintErr
|
||||
stat = Set_Printer('HEADER',Header) ; IF stat < 0 THEN GOTO OIPrintErr
|
||||
|
||||
Footer = " 'D' 'T'":@VM:@VM:"Page: 'P'"
|
||||
stat = Set_Printer('FOOTER',Footer) ; IF stat < 0 THEN GOTO OIPrintErr
|
||||
|
||||
*
|
||||
@RECCOUNT = 0
|
||||
FirstPass = 1
|
||||
LastRecord = 0
|
||||
FirstLine = 1
|
||||
fontSpacing = 100
|
||||
|
||||
* Make Column Heading
|
||||
|
||||
ColHead = '' ; ColFmt = ''
|
||||
ColHead<1,1> = 'React No' ; ColFmt<1,1> = '+^720'
|
||||
ColHead<1,2> = 'WO No' ; ColFmt<1,2> = '+^1260'
|
||||
ColHead<1,3> = 'Sub Part No' ; ColFmt<1,3> = '+<1800'
|
||||
ColHead<1,4> = 'Epi Part No' ; ColFmt<1,4> = '+<1800'
|
||||
ColHead<1,5> = 'WO Qty' ; ColFmt<1,5> = '+>720'
|
||||
ColHead<1,6> = 'RX Qty' ; ColFmt<1,6> = '+>720'
|
||||
ColHead<1,7> = 'UnRel Qty' ; ColFmt<1,7> = '+>720'
|
||||
ColHead<1,8> = 'Kit Location' ; ColFmt<1,8> = '+^1260'
|
||||
ColHead<1,9> = 'Kit Qty' ; ColFmt<1,9> = '+^1260'
|
||||
ColHead<1,10> = '1K Stage Location' ; ColFmt<1,10> = '+^1260'
|
||||
ColHead<1,11> = 'Stage Qty' ; ColFmt<1,11> = '+^1260'
|
||||
ColHead<1,12> = 'PTI Location' ; ColFmt<1,12> = '+^1260'
|
||||
ColHead<1,13> = 'PTI RO' ; ColFmt<1,13> = '+^1260'
|
||||
|
||||
|
||||
* Zero Accumulators For Each Break
|
||||
|
||||
Prev.ReactNo = ''
|
||||
Last.ReactNo.Break = 1
|
||||
|
||||
|
||||
* * * * * * *
|
||||
ReadRecord:
|
||||
* * * * * * *
|
||||
|
||||
* Zero Break Flags To False
|
||||
|
||||
ReactNo.Break=0
|
||||
|
||||
|
||||
READNEXT @ID, Which.Value ELSE
|
||||
LastRecord = 1
|
||||
ReactNo.Break = 1
|
||||
ReactNo = Prev.ReactNo
|
||||
END
|
||||
|
||||
S.ATID = @ID
|
||||
|
||||
IF FirstPass AND LastRecord THEN
|
||||
GOTO Bail
|
||||
END
|
||||
|
||||
IF LastRecord THEN GOTO BREAKS
|
||||
|
||||
|
||||
READO @RECORD FROM SchedDetTable,@ID ELSE
|
||||
GOTO ReadRecord
|
||||
END
|
||||
|
||||
@RECCOUNT += 1
|
||||
|
||||
* Calculate Value(s) For Column(s)
|
||||
|
||||
S.ATID = {@ID}
|
||||
I.ATID = S.ATID
|
||||
S.ReactNo = {REACT_NO}
|
||||
I.ReactNo = S.ReactNo
|
||||
S.WoNo = {WO_NO}
|
||||
I.WoNo = S.WoNo
|
||||
S.SubPartNo = XLATE('WO_LOG',S.WoNo,'ORD_SUB_PART_NO','X')
|
||||
I.SubPartNo = S.SubPartNo
|
||||
S.EpiPartNo = XLATE('WO_LOG',S.WoNo,WO_LOG_EPI_PART_NO$,'X')
|
||||
I.EpiPartNo = S.EpiPartNo
|
||||
S.WO_Qty = {WO_QTY}
|
||||
I.WO_Qty = S.WO_Qty
|
||||
S.WO_RX_Qty = {WO_RX_QTY}
|
||||
I.WO_RX_Qty = S.WO_RX_Qty
|
||||
S.WO_UnRel_QTY = {WO_UNREL_QTY}
|
||||
I.WO_UnRel_QTY = S.WO_UnRel_QTY
|
||||
S.Sched_DT = {SCHED_DT}
|
||||
I.Sched_DT = S.Sched_DT
|
||||
|
||||
KitData = obj_Location('KitLocations',S.WONo)
|
||||
|
||||
SWAP CRLF$ WITH @VM IN KitData
|
||||
|
||||
S.KitLocation = KitData<1>
|
||||
I.KitLocation = S.KitLocation
|
||||
|
||||
S.KitQty = OCONV(SUM(KitData<2>) * 25,'MD0,Z')
|
||||
I.KitQty = S.KitQty
|
||||
|
||||
S.KitCassCnt = COUNT(KitData<3>,',') + (KitData<3> NE '')
|
||||
I.KitCassCnt = S.KitCassCnt
|
||||
|
||||
StageData = obj_Location('StageLocations',S.WONo)
|
||||
|
||||
SWAP CRLF$ WITH @VM IN StageData
|
||||
|
||||
S.StageLocation = StageData<1>
|
||||
I.StageLocation = S.StageLocation
|
||||
|
||||
S.StageQty = StageData<3>
|
||||
I.StageQty = S.StageQty
|
||||
|
||||
S.StageCassCnt = COUNT(S.StageQty,',') + (S.StageQty NE '')
|
||||
I.StageCassCnt = S.StageCassCnt
|
||||
|
||||
PTIData = obj_Location('PTILocations',S.WONo)
|
||||
|
||||
SWAP CRLF$ WITH @VM IN PTIData
|
||||
|
||||
S.PTILocation = PTIData<1>
|
||||
I.PTILocation = S.PTILocation
|
||||
|
||||
S.PTIQty = PTIData<3>
|
||||
I.PTIQty = S.PTIQty
|
||||
|
||||
S.PTICassCnt = COUNT(S.PTIQty,',') + (S.PTIQty NE '')
|
||||
I.PTICassCnt = S.PTICassCnt
|
||||
|
||||
|
||||
CassQueueCnt = I.KitCassCnt + I.StageCassCnt + I.PTICassCnt
|
||||
|
||||
|
||||
* TEST FOR CONTROL BREAK(S)
|
||||
|
||||
|
||||
IF (S.ReactNo NE Prev.ReactNo) OR ReactNo.Break THEN
|
||||
ReactNo = Prev.ReactNo
|
||||
Prev.ReactNo = S.ReactNo
|
||||
ReactNo.Break += 1
|
||||
END
|
||||
|
||||
IF FirstPass THEN
|
||||
FirstPass=0
|
||||
GOTO DETAIL
|
||||
END
|
||||
|
||||
* * * * * * *
|
||||
BREAKS:
|
||||
* * * * * * *
|
||||
|
||||
* Print Break Total(s) And Accumulate Total(s)
|
||||
|
||||
IF ReactNo.Break THEN
|
||||
|
||||
IF ReportParm = 'D' ELSE
|
||||
stat = Set_Printer('TEXT')
|
||||
END
|
||||
|
||||
/*
|
||||
ColData = ''
|
||||
ColData<1,1> = ''
|
||||
ColData<1,2> = ''
|
||||
ColData<1,3> = ''
|
||||
ColData<1,4> = ''
|
||||
ColData<1,5> = ''
|
||||
ColData<1,6> = ''
|
||||
ColData<1,7> = ''
|
||||
ColData<1,8> = ''
|
||||
ColData<1,9> = ''
|
||||
ColData<1,10> = ''
|
||||
|
||||
GOSUB PrintTable
|
||||
*/
|
||||
|
||||
|
||||
END
|
||||
|
||||
|
||||
* Perform Last Record Output If Done
|
||||
|
||||
IF LastRecord THEN
|
||||
|
||||
colData = ''
|
||||
|
||||
|
||||
GOTO Bail
|
||||
|
||||
END
|
||||
|
||||
|
||||
* * * * * * *
|
||||
DETAIL:
|
||||
* * * * * * *
|
||||
|
||||
* Do Conversion If Any
|
||||
|
||||
|
||||
IF ReportParm = 'T' OR CassQueueCnt < MinDemand THEN
|
||||
|
||||
IF S.REACTNO NE "" THEN S.REACTNO = OCONV(S.REACTNO,"MD0,")
|
||||
IF S.WONO NE "" THEN S.WONO = OCONV(S.WONO,"MD0")
|
||||
IF S.WO_QTY NE "" THEN S.WO_QTY = OCONV(S.WO_QTY,"MD0,")
|
||||
IF S.WO_RX_QTY NE "" THEN S.WO_RX_QTY = OCONV(S.WO_RX_QTY,"MD0,")
|
||||
IF S.WO_UNREL_QTY NE "" THEN S.WO_UNREL_QTY = OCONV(S.WO_UNREL_QTY,"MD0,")
|
||||
IF S.SCHED_DT NE "" THEN S.SCHED_DT = OCONV(S.SCHED_DT,"D4/")
|
||||
|
||||
* PRINT DETAIL LINE
|
||||
|
||||
* If @User4 EQ 'FRANCOIS_R' then
|
||||
|
||||
COLDATA = ''
|
||||
RowNumber = 0
|
||||
For each Location in S.PTILocation using @VM setting fPos
|
||||
LocationCassNos = S.PTIQty<0, fPos>
|
||||
FilteredCassList = ''
|
||||
|
||||
For each CassNo in LocationCassNos using ','
|
||||
WOMatKey = S.WoNo:'*':CassNo
|
||||
InvActions = Xlate('WO_MAT', WOMatKey, 'INV_ACTION', 'X')
|
||||
NumActions = DCount(InvActions, @VM)
|
||||
CurrAction = InvActions<0, NumActions>
|
||||
If CurrAction EQ 'PLACE' then
|
||||
FilteredCassList<0, -1> = CassNo
|
||||
end
|
||||
Next CassNo
|
||||
If ( (FilteredCassList NE '') and (Location NE '') ) or ( (FilteredCassList EQ '') and (Location EQ '') ) then
|
||||
|
||||
RowNumber += 1
|
||||
Convert @VM to ',' in FilteredCassList
|
||||
COLDATA<RowNumber,1> = S.ReactNo
|
||||
COLDATA<RowNumber,2> = S.WoNo
|
||||
COLDATA<RowNumber,3> = S.SubPartNo
|
||||
ColData<RowNumber,4> = S.EpiPartNo
|
||||
COLDATA<RowNumber,5> = S.WO_Qty
|
||||
COLDATA<RowNumber,6> = S.WO_RX_Qty
|
||||
COLDATA<RowNumber,7> = S.WO_UnRel_Qty
|
||||
COLDATA<RowNumber,8> = S.KitLocation
|
||||
COLDATA<RowNumber,9> = S.KitQty ; *ColFmt<1,9> = '_<1260'
|
||||
COLDATA<RowNumber,10> = S.StageLocation
|
||||
COLDATA<RowNumber,11> = S.StageQty ; *ColFmt<1,11> = '_<1260'
|
||||
COLDATA<RowNumber,12> = S.PTILocation<0, fPos>
|
||||
* COLDATA<fPos,13> = S.PTIQty<0, fPos> ; *ColFmt<1,13> = '_<1260'
|
||||
COLDATA<RowNumber,13> = FilteredCassList
|
||||
end
|
||||
Next Location
|
||||
* end else
|
||||
*
|
||||
* COLDATA = ''
|
||||
* COLDATA<1,1> = S.ReactNo
|
||||
* COLDATA<1,2> = S.WoNo
|
||||
* COLDATA<1,3> = S.SubPartNo
|
||||
* ColData<1,4> = S.EpiPartNo
|
||||
* COLDATA<1,5> = S.WO_Qty
|
||||
* COLDATA<1,6> = S.WO_RX_Qty
|
||||
* COLDATA<1,7> = S.WO_UnRel_Qty
|
||||
* COLDATA<1,8> = S.KitLocation
|
||||
* COLDATA<1,9> = S.KitQty ; *ColFmt<1,9> = '_<1260'
|
||||
* COLDATA<1,10> = S.StageLocation
|
||||
* COLDATA<1,11> = S.StageQty ; *ColFmt<1,11> = '_<1260'
|
||||
* COLDATA<1,12> = S.PTILocation
|
||||
* COLDATA<1,13> = S.PTIQty ; *ColFmt<1,13> = '_<1260'
|
||||
* end
|
||||
|
||||
* If @User4 EQ 'FRANCOIS_R' then
|
||||
If COLDATA NE '' then GoSub PrintTable
|
||||
* end else
|
||||
* GOSUB PrintTable
|
||||
* end
|
||||
|
||||
END
|
||||
|
||||
|
||||
GOTO ReadRecord
|
||||
|
||||
|
||||
* * * * * * *
|
||||
Bail:
|
||||
* * * * * * *
|
||||
|
||||
stat = Set_Printer('TERM',1)
|
||||
SRP_Stopwatch('Stop', 'Build Report')
|
||||
* If @UserName EQ 'FRANCOIS_R' then SRP_Stopwatch('ShowAll')
|
||||
RETURN
|
||||
|
||||
|
||||
|
||||
|
||||
* * * * * * *
|
||||
OIPrintErr:
|
||||
* * * * * * *
|
||||
|
||||
ErrMsg(ErrorTitle:@SVM:ErrorMsg)
|
||||
ErrMsg(ErrorTitle:@SVM:'Set_Printer returned errorcode ':stat)
|
||||
stat = Set_Printer('TERM',1)
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
* * * * * *
|
||||
PrintTable:
|
||||
* * * * * *
|
||||
|
||||
PageHeight = Get_Printer('PAGESIZE')<2>
|
||||
PrintableHeight = PageHeight - TopMargin - BottomMargin
|
||||
PrinterHeight = Get_Printer('POS')<2>
|
||||
|
||||
stat = Set_Printer('CALCTABLE',ColFmt:@FM:ColData)
|
||||
TableSize = Get_Printer('CALCTABLE')
|
||||
|
||||
|
||||
TableHeight = TableSize<2>
|
||||
|
||||
fontSpacing = 120
|
||||
|
||||
IF ( TableHeight + PrinterHeight >= PrintableHeight ) OR FirstLine THEN
|
||||
IF NOT(FirstLine) THEN
|
||||
stat = Set_Printer('PAGEBREAK')
|
||||
END
|
||||
FirstLine = 0
|
||||
font<2> = 10
|
||||
font<4> = 1 ;* Bold
|
||||
stat = Set_Printer('FONT',font,'100')
|
||||
|
||||
stat = Set_Printer('ADDTABLE',colFmt,colHead,'',LTGREY$,'',0,TB_ALL)
|
||||
|
||||
|
||||
font<4> = 0
|
||||
stat = Set_Printer('FONT',font,fontSpacing)
|
||||
|
||||
stat = Set_Printer('ADDTABLE',colFmt,'',colData,LTGREY$,'',0,7)
|
||||
|
||||
END ELSE
|
||||
font<2> = 10
|
||||
font<4> = 0
|
||||
stat = Set_Printer('FONT',font,fontSpacing)
|
||||
stat = Set_Printer('ADDTABLE',colFmt,'',colData,LTGREY$,'',1,TB_ALL)
|
||||
|
||||
END
|
||||
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
|
||||
|
@ -1,545 +0,0 @@
|
||||
COMPILE SUBROUTINE Print_Demand(ReportParm)
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
/*
|
||||
Print Material Demand Report
|
||||
10/27/2016 - John C Henry, J.C. Henry & Co., Inc. - Initial Coding
|
||||
10/05/2017 - Donald Bakke - No longer select SCHED_DET rows with an end date specified.
|
||||
10/24/2018 - Daniel Stieber - Patch added to resolve scheduling conflicts on the same day
|
||||
*/
|
||||
|
||||
DECLARE SUBROUTINE Utility, ErrMsg, Set_Status, Set_Printer, RList, SRP_Stopwatch
|
||||
DECLARE FUNCTION Set_Printer, Get_Printer, Msg, Get_Status, Printer_Select, obj_Install, Dialog_Box, obj_Location
|
||||
DECLARE FUNCTION Schedule_Services
|
||||
|
||||
$INSERT OIPRINT_EQUATES
|
||||
$INSERT SCHED_DET_EQUATES
|
||||
$INSERT WO_LOG_EQUATES
|
||||
$INSERT APPCOLORS
|
||||
$INSERT MSG_EQUATES
|
||||
$INSERT LOGICAL
|
||||
$INSERT SCHEDULE_EQU
|
||||
|
||||
EQU TAB$ TO \09\
|
||||
EQU TARGET_ACTIVELIST$ TO 5
|
||||
|
||||
ErrorTitle = 'Error in stored procedure Print_Demand'
|
||||
ErrCode = ''
|
||||
ErrorMsg = ''
|
||||
SRP_Stopwatch('Reset')
|
||||
SRP_Stopwatch('Start', 'Initializing')
|
||||
OPEN 'SCHED_DET' TO SchedDetTable ELSE
|
||||
ErrorMsg = 'Unable to open "SCHED_DET" table.'
|
||||
ErrMsg(ErrorTitle:@SVM:ErrorMsg)
|
||||
RETURN
|
||||
END
|
||||
|
||||
OPEN 'DICT.SCHED_DET' TO @DICT ELSE
|
||||
ErrorMsg = 'Unable to open "SCHED_DET" table.'
|
||||
ErrMsg(ErrorTitle:@SVM:ErrorMsg)
|
||||
RETURN
|
||||
END
|
||||
|
||||
// Two full week
|
||||
Today = OCONV(Date(),'D4/')
|
||||
*Today = OCONV(Date()-60,'D4/')
|
||||
EndDate = OCONV(Date()+13,'D4/')
|
||||
|
||||
|
||||
ReactList = ''
|
||||
WOList = ''
|
||||
SchedDetKeys = ''
|
||||
|
||||
* SelectSent = 'SELECT SCHED_DET WITH SCHED_DT GE ':QUOTE(Today):' AND WITH SCHED_DT LE ':QUOTE(EndDate):' BY REACT_NO'
|
||||
SelectSent = 'SELECT SCHED_DET WITH SCHED_DT GE ':QUOTE(Today):' BY REACT_NO'
|
||||
*SelectSent = 'SELECT SCHED_DET WITH SCHED_DT GE ':QUOTE(Today):' BY REACT_NO'
|
||||
|
||||
|
||||
SRP_Stopwatch('Stop', 'Initializing')
|
||||
SRP_Stopwatch('Start', 'Data Select')
|
||||
RList(SelectSent,TARGET_ACTIVELIST$,'','','')
|
||||
IF Get_Status(errCode) THEN
|
||||
ErrMsg(errCode)
|
||||
RETURN
|
||||
END
|
||||
SRP_Stopwatch('Stop', 'Data Select')
|
||||
SRP_Stopwatch('Start', 'Build Key List')
|
||||
Done = 0
|
||||
|
||||
LOOP
|
||||
READNEXT @ID ELSE Done = 1
|
||||
UNTIL Done
|
||||
ReactNo = @ID[1,'*']
|
||||
SchedDt = @ID[COL2()+1,'*']
|
||||
SeqNo = @ID[COL2()+1,'*']
|
||||
|
||||
READ SchedDetRec FROM SchedDetTable,@ID THEN
|
||||
|
||||
WONo = SchedDetRec<SCHED_DET_WO_NO$>
|
||||
|
||||
LOCATE ReactNo IN ReactList BY 'AR' USING @FM SETTING Pos ELSE
|
||||
ReactList = INSERT(ReactList,Pos,0,0,ReactNo)
|
||||
END
|
||||
|
||||
LOCATE WONo IN WOList<Pos> USING @VM SETTING WPos ELSE
|
||||
WOList = INSERT(WOList,Pos,-1,0,WONo)
|
||||
// Patch added on 10/24/18 to resolve scheduling conflicts on the same day for
|
||||
// the material track report. - djs
|
||||
PrevSchedDetKey = SchedDetKeys[-1, 'B':@FM]
|
||||
PrevReactNo = Field(PrevSchedDetKey, '*', 1)
|
||||
PrevSchedDt = Field(PrevSchedDetKey, '*', 2)
|
||||
If (PrevReactNo EQ ReactNo) and (PrevSchedDt EQ SchedDt) then
|
||||
PrevSeqNo = Field(PrevSchedDetKey, '*', 3)
|
||||
NumWO = DCount(WOList<Pos>, @VM)
|
||||
PrevWONo = WOList<Pos, NumWO - 1>
|
||||
SchedEvents = Schedule_Services('GetScheduleEventSummary', ReactNo, WONo, SchedDt, SeqNo, True$)
|
||||
StartDt = IConv(SchedEvents<SCHEDULE_ENTRY_DATE$>, 'D')
|
||||
PrevSchedEvents = Schedule_Services('GetScheduleEventSummary', ReactNo, PrevWONo, PrevSchedDt, PrevSeqNo, True$)
|
||||
PrevStartDt = IConv(PrevSchedEvents<SCHEDULE_ENTRY_DATE$>, 'D')
|
||||
If StartDt GT PrevStartDt then
|
||||
// This is the common case
|
||||
SchedDetKeys = INSERT(SchedDetKeys,-1,0,0,@ID)
|
||||
end else
|
||||
// Scheduling irregularity - Insert this key in the second to last position.
|
||||
NumKeys = DCount(SchedDetKeys, @FM)
|
||||
InsertPos = NumKeys
|
||||
SchedDetKeys = INSERT(SchedDetKeys,InsertPos,0,0,@ID)
|
||||
end
|
||||
end else
|
||||
SchedDetKeys = INSERT(SchedDetKeys,-1,0,0,@ID)
|
||||
end
|
||||
END
|
||||
END
|
||||
|
||||
REPEAT
|
||||
|
||||
CALL Make.List(0,SchedDetKeys,SchedDetTable,@DICT)
|
||||
SRP_Stopwatch('Stop', 'Build Key List')
|
||||
SRP_Stopwatch('Start', 'Build Report')
|
||||
IF ReportParm = 'T' THEN
|
||||
|
||||
* Tracking Report
|
||||
|
||||
Header = "'D'":@VM:obj_Install('Get_Prop','CompTitle'):' Material Tracking by Reactor':@VM:"Page 'P'"
|
||||
MinDemand = 0
|
||||
|
||||
END
|
||||
|
||||
IF ReportParm = 'D' THEN
|
||||
|
||||
* Demand Report
|
||||
|
||||
MinDemand = Msg(@WINDOW,'','MIN_DEMAND_QTY')
|
||||
Header = "'D'":@VM:obj_Install('Get_Prop','CompTitle'):' Material Demand with Reactor Queue < ':MinDemand:' Cassettes':@VM:"Page 'P'"
|
||||
|
||||
END
|
||||
|
||||
Set_Status(0)
|
||||
|
||||
/*
|
||||
Today = OCONV(Date(),'D4/')
|
||||
Tomorrow = OCONV(Date()+1,'D4/')
|
||||
|
||||
SelectSent = 'SELECT SCHED_DET WITH SCHED_DT = ':QUOTE(Today):' BY REACT_NO'
|
||||
|
||||
RList(SelectSent,TARGET_ACTIVELIST$,'','','')
|
||||
IF Get_Status(errCode) THEN
|
||||
ErrMsg(errCode)
|
||||
RETURN
|
||||
END
|
||||
*/
|
||||
|
||||
* Start of printing process
|
||||
|
||||
FileName = 'Print Material Demand'
|
||||
Title = 'Printing Material Demand'
|
||||
|
||||
TopMargin = 1.0
|
||||
BottomMargin = 0.75
|
||||
LeftMargin = 0.25
|
||||
RightMargin = 0.25
|
||||
|
||||
Margins = LeftMargin:@FM:TopMargin:@FM:RightMargin:@FM:BottomMargin
|
||||
|
||||
PageSetup = '1' ;* LandScape
|
||||
PrintSetup = '2' ;* Preview Normal
|
||||
PrintSetup<1,2> = '0' ;* All buttons
|
||||
PrintSetup<1,5> = '1' ;* Page Range
|
||||
PrintSetup<1,6> = 7 ;* full mouse and keyboard support
|
||||
|
||||
If @UserName EQ 'MESCATXMUSER' then
|
||||
PageSetup = '1' ;* Landscape
|
||||
PrintSetup = '0' ;* Print to specific location
|
||||
PrintPath = Printer_Select(PrinterID) ;* Select printer - Displays popup if PrinterPort not found
|
||||
end else
|
||||
* PrintPath = Printer_Select('',1) ;* Get Default printer path
|
||||
PrintPath = ''
|
||||
end
|
||||
stat = Set_Printer('INIT',FileName,Title,Margins,PageSetup,PrintSetup,PrintPath)
|
||||
|
||||
IF stat < 0 THEN
|
||||
ErrorMsg = 'Stat = ' : Stat : ', PrintPath = ' : PrintPath
|
||||
GOTO OIPrintErr
|
||||
end
|
||||
DateRange = 'Effective ':OCONV(Date(),'D4')
|
||||
|
||||
|
||||
*Header = "'D'":@VM:obj_Install('Get_Prop','CompTitle'):' Material Tracking by Reactor':@VM:"Page 'P'"
|
||||
Header<-1> = "'T'"
|
||||
Header<-1> = '' ;* Blank line following heading
|
||||
|
||||
font = 'Arial'
|
||||
font<2> = '10'
|
||||
font<4> = '0' ;* Bold
|
||||
|
||||
stat = Set_Printer('FONTHEADFOOT',font) ; IF stat < 0 THEN GOTO OIPrintErr
|
||||
stat = Set_Printer('HEADER',Header) ; IF stat < 0 THEN GOTO OIPrintErr
|
||||
|
||||
Footer = " 'D' 'T'":@VM:@VM:"Page: 'P'"
|
||||
stat = Set_Printer('FOOTER',Footer) ; IF stat < 0 THEN GOTO OIPrintErr
|
||||
|
||||
*
|
||||
@RECCOUNT = 0
|
||||
FirstPass = 1
|
||||
LastRecord = 0
|
||||
FirstLine = 1
|
||||
fontSpacing = 100
|
||||
|
||||
* Make Column Heading
|
||||
|
||||
ColHead = '' ; ColFmt = ''
|
||||
ColHead<1,1> = 'React No' ; ColFmt<1,1> = '+^720'
|
||||
ColHead<1,2> = 'React Type' ; ColFmt<1,2> = '+<^720'
|
||||
ColHead<1,3> = 'Wafer Size' ; ColFmt<1,3> = '+^1000'
|
||||
ColHead<1,4> = 'WO No' ; ColFmt<1,4> = '+^1000'
|
||||
ColHead<1,5> = 'Sub Part No' ; ColFmt<1,5> = '+<1200'
|
||||
ColHead<1,6> = 'Epi Part No' ; ColFmt<1,6> = '+<1200'
|
||||
ColHead<1,7> = 'WO Qty' ; ColFmt<1,7> = '+>720'
|
||||
ColHead<1,8> = 'RX Qty' ; ColFmt<1,8> = '+>720'
|
||||
ColHead<1,9> = 'UnRel Qty' ; ColFmt<1,9> = '+>720'
|
||||
ColHead<1,10> = 'Kit Location' ; ColFmt<1,10> = '+^1260'
|
||||
ColHead<1,11> = 'Kit Qty' ; ColFmt<1,11> = '+^720'
|
||||
ColHead<1,12> = '1K Stage Location' ; ColFmt<1,12> = '+^1260'
|
||||
ColHead<1,13> = 'Stage Qty' ; ColFmt<1,13> = '+^1260'
|
||||
ColHead<1,14> = 'PTI Location' ; ColFmt<1,14> = '+^1260'
|
||||
ColHead<1,15> = 'PTI RO' ; ColFmt<1,15> = '+^1260'
|
||||
|
||||
|
||||
* Zero Accumulators For Each Break
|
||||
|
||||
Prev.ReactNo = ''
|
||||
Last.ReactNo.Break = 1
|
||||
|
||||
|
||||
* * * * * * *
|
||||
ReadRecord:
|
||||
* * * * * * *
|
||||
|
||||
* Zero Break Flags To False
|
||||
|
||||
ReactNo.Break=0
|
||||
|
||||
|
||||
READNEXT @ID, Which.Value ELSE
|
||||
LastRecord = 1
|
||||
ReactNo.Break = 1
|
||||
ReactNo = Prev.ReactNo
|
||||
END
|
||||
|
||||
S.ATID = @ID
|
||||
|
||||
IF FirstPass AND LastRecord THEN
|
||||
GOTO Bail
|
||||
END
|
||||
|
||||
IF LastRecord THEN GOTO BREAKS
|
||||
|
||||
|
||||
READO @RECORD FROM SchedDetTable,@ID ELSE
|
||||
GOTO ReadRecord
|
||||
END
|
||||
|
||||
@RECCOUNT += 1
|
||||
|
||||
* Calculate Value(s) For Column(s)
|
||||
|
||||
S.ATID = {@ID}
|
||||
I.ATID = S.ATID
|
||||
S.ReactNo = {REACT_NO}
|
||||
I.ReactNo = S.ReactNo
|
||||
S.WoNo = {WO_NO}
|
||||
I.WoNo = S.WoNo
|
||||
S.SubPartNo = XLATE('WO_LOG',S.WoNo,'ORD_SUB_PART_NO','X')
|
||||
I.SubPartNo = S.SubPartNo
|
||||
S.EpiPartNo = XLATE('WO_LOG',S.WoNo,WO_LOG_EPI_PART_NO$,'X')
|
||||
I.EpiPartNo = S.EpiPartNo
|
||||
S.WO_Qty = {WO_QTY}
|
||||
I.WO_Qty = S.WO_Qty
|
||||
S.WO_RX_Qty = {WO_RX_QTY}
|
||||
I.WO_RX_Qty = S.WO_RX_Qty
|
||||
S.WO_UnRel_QTY = {WO_UNREL_QTY}
|
||||
I.WO_UnRel_QTY = S.WO_UnRel_QTY
|
||||
S.Sched_DT = {SCHED_DT}
|
||||
I.Sched_DT = S.Sched_DT
|
||||
*Changed Here JRO
|
||||
S.REACT_TYPE = {REACTOR_TYPE}
|
||||
S.WAFER_SIZE = {WAFER_SIZE}
|
||||
|
||||
KitData = obj_Location('KitLocations',S.WONo)
|
||||
|
||||
SWAP CRLF$ WITH @VM IN KitData
|
||||
|
||||
S.KitLocation = KitData<1>
|
||||
I.KitLocation = S.KitLocation
|
||||
|
||||
S.KitQty = OCONV(SUM(KitData<2>) * 25,'MD0,Z')
|
||||
I.KitQty = S.KitQty
|
||||
|
||||
S.KitCassCnt = COUNT(KitData<3>,',') + (KitData<3> NE '')
|
||||
I.KitCassCnt = S.KitCassCnt
|
||||
|
||||
StageData = obj_Location('StageLocations',S.WONo)
|
||||
|
||||
SWAP CRLF$ WITH @VM IN StageData
|
||||
|
||||
S.StageLocation = StageData<1>
|
||||
I.StageLocation = S.StageLocation
|
||||
|
||||
S.StageQty = StageData<3>
|
||||
I.StageQty = S.StageQty
|
||||
|
||||
S.StageCassCnt = COUNT(S.StageQty,',') + (S.StageQty NE '')
|
||||
I.StageCassCnt = S.StageCassCnt
|
||||
|
||||
PTIData = obj_Location('PTILocations',S.WONo)
|
||||
|
||||
SWAP CRLF$ WITH @VM IN PTIData
|
||||
|
||||
S.PTILocation = PTIData<1>
|
||||
I.PTILocation = S.PTILocation
|
||||
|
||||
S.PTIQty = PTIData<3>
|
||||
I.PTIQty = S.PTIQty
|
||||
|
||||
S.PTICassCnt = COUNT(S.PTIQty,',') + (S.PTIQty NE '')
|
||||
I.PTICassCnt = S.PTICassCnt
|
||||
|
||||
|
||||
CassQueueCnt = I.KitCassCnt + I.StageCassCnt + I.PTICassCnt
|
||||
|
||||
|
||||
* TEST FOR CONTROL BREAK(S)
|
||||
|
||||
|
||||
IF (S.ReactNo NE Prev.ReactNo) OR ReactNo.Break THEN
|
||||
ReactNo = Prev.ReactNo
|
||||
Prev.ReactNo = S.ReactNo
|
||||
ReactNo.Break += 1
|
||||
END
|
||||
|
||||
IF FirstPass THEN
|
||||
FirstPass=0
|
||||
GOTO DETAIL
|
||||
END
|
||||
|
||||
* * * * * * *
|
||||
BREAKS:
|
||||
* * * * * * *
|
||||
|
||||
* Print Break Total(s) And Accumulate Total(s)
|
||||
|
||||
IF ReactNo.Break THEN
|
||||
|
||||
IF ReportParm = 'D' ELSE
|
||||
stat = Set_Printer('TEXT')
|
||||
END
|
||||
|
||||
/*
|
||||
ColData = ''
|
||||
ColData<1,1> = ''
|
||||
ColData<1,2> = ''
|
||||
ColData<1,3> = ''
|
||||
ColData<1,4> = ''
|
||||
ColData<1,5> = ''
|
||||
ColData<1,6> = ''
|
||||
ColData<1,7> = ''
|
||||
ColData<1,8> = ''
|
||||
ColData<1,9> = ''
|
||||
ColData<1,10> = ''
|
||||
|
||||
GOSUB PrintTable
|
||||
*/
|
||||
|
||||
|
||||
END
|
||||
|
||||
|
||||
* Perform Last Record Output If Done
|
||||
|
||||
IF LastRecord THEN
|
||||
|
||||
colData = ''
|
||||
|
||||
|
||||
GOTO Bail
|
||||
|
||||
END
|
||||
|
||||
|
||||
* * * * * * *
|
||||
DETAIL:
|
||||
* * * * * * *
|
||||
|
||||
* Do Conversion If Any
|
||||
|
||||
|
||||
IF ReportParm = 'T' OR CassQueueCnt < MinDemand THEN
|
||||
|
||||
IF S.REACTNO NE "" THEN S.REACTNO = OCONV(S.REACTNO,"MD0,")
|
||||
IF S.WONO NE "" THEN S.WONO = OCONV(S.WONO,"MD0")
|
||||
IF S.WO_QTY NE "" THEN S.WO_QTY = OCONV(S.WO_QTY,"MD0,")
|
||||
IF S.WO_RX_QTY NE "" THEN S.WO_RX_QTY = OCONV(S.WO_RX_QTY,"MD0,")
|
||||
IF S.WO_UNREL_QTY NE "" THEN S.WO_UNREL_QTY = OCONV(S.WO_UNREL_QTY,"MD0,")
|
||||
IF S.SCHED_DT NE "" THEN S.SCHED_DT = OCONV(S.SCHED_DT,"D4/")
|
||||
|
||||
* PRINT DETAIL LINE
|
||||
|
||||
* If @User4 EQ 'FRANCOIS_R' then
|
||||
|
||||
COLDATA = ''
|
||||
RowNumber = 0
|
||||
For each Location in S.PTILocation using @VM setting fPos
|
||||
LocationCassNos = S.PTIQty<0, fPos>
|
||||
FilteredCassList = ''
|
||||
|
||||
For each CassNo in LocationCassNos using ','
|
||||
WOMatKey = S.WoNo:'*':CassNo
|
||||
InvActions = Xlate('WO_MAT', WOMatKey, 'INV_ACTION', 'X')
|
||||
NumActions = DCount(InvActions, @VM)
|
||||
CurrAction = InvActions<0, NumActions>
|
||||
If CurrAction EQ 'PLACE' then
|
||||
FilteredCassList<0, -1> = CassNo
|
||||
end
|
||||
Next CassNo
|
||||
If ( (FilteredCassList NE '') and (Location NE '') ) or ( (FilteredCassList EQ '') and (Location EQ '') ) then
|
||||
|
||||
RowNumber += 1
|
||||
Convert @VM to ',' in FilteredCassList
|
||||
COLDATA<RowNumber,1> = S.ReactNo
|
||||
COLDATA<RowNumber,2> = S.React_Type
|
||||
COLDATA<RowNumber,3> = S.Wafer_Size
|
||||
COLDATA<RowNumber,4> = S.WoNo
|
||||
COLDATA<RowNumber,5> = S.SubPartNo
|
||||
ColData<RowNumber,6> = S.EpiPartNo
|
||||
COLDATA<RowNumber,7> = S.WO_Qty
|
||||
COLDATA<RowNumber,8> = S.WO_RX_Qty
|
||||
COLDATA<RowNumber,9> = S.WO_UnRel_Qty
|
||||
COLDATA<RowNumber,10> = S.KitLocation
|
||||
COLDATA<RowNumber,11> = S.KitQty ; *ColFmt<1,9> = '_<1260'
|
||||
COLDATA<RowNumber,12> = S.StageLocation
|
||||
COLDATA<RowNumber,13> = S.StageQty ; *ColFmt<1,11> = '_<1260'
|
||||
COLDATA<RowNumber,14> = S.PTILocation<0, fPos>
|
||||
* COLDATA<fPos,13> = S.PTIQty<0, fPos> ; *ColFmt<1,13> = '_<1260'
|
||||
COLDATA<RowNumber,15> = FilteredCassList
|
||||
end
|
||||
Next Location
|
||||
* end else
|
||||
*
|
||||
* COLDATA = ''
|
||||
* COLDATA<1,1> = S.ReactNo
|
||||
* COLDATA<1,2> = S.WoNo
|
||||
* COLDATA<1,3> = S.SubPartNo
|
||||
* ColData<1,4> = S.EpiPartNo
|
||||
* COLDATA<1,5> = S.WO_Qty
|
||||
* COLDATA<1,6> = S.WO_RX_Qty
|
||||
* COLDATA<1,7> = S.WO_UnRel_Qty
|
||||
* COLDATA<1,8> = S.KitLocation
|
||||
* COLDATA<1,9> = S.KitQty ; *ColFmt<1,9> = '_<1260'
|
||||
* COLDATA<1,10> = S.StageLocation
|
||||
* COLDATA<1,11> = S.StageQty ; *ColFmt<1,11> = '_<1260'
|
||||
* COLDATA<1,12> = S.PTILocation
|
||||
* COLDATA<1,13> = S.PTIQty ; *ColFmt<1,13> = '_<1260'
|
||||
* end
|
||||
|
||||
* If @User4 EQ 'FRANCOIS_R' then
|
||||
If COLDATA NE '' then GoSub PrintTable
|
||||
* end else
|
||||
* GOSUB PrintTable
|
||||
* end
|
||||
|
||||
END
|
||||
|
||||
|
||||
GOTO ReadRecord
|
||||
|
||||
|
||||
* * * * * * *
|
||||
Bail:
|
||||
* * * * * * *
|
||||
|
||||
stat = Set_Printer('TERM',1)
|
||||
SRP_Stopwatch('Stop', 'Build Report')
|
||||
* If @UserName EQ 'FRANCOIS_R' then SRP_Stopwatch('ShowAll')
|
||||
RETURN
|
||||
debug
|
||||
|
||||
|
||||
|
||||
* * * * * * *
|
||||
OIPrintErr:
|
||||
* * * * * * *
|
||||
|
||||
ErrMsg(ErrorTitle:@SVM:ErrorMsg)
|
||||
ErrMsg(ErrorTitle:@SVM:'Set_Printer returned errorcode ':stat)
|
||||
stat = Set_Printer('TERM',1)
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
* * * * * *
|
||||
PrintTable:
|
||||
* * * * * *
|
||||
|
||||
PageHeight = Get_Printer('PAGESIZE')<2>
|
||||
PrintableHeight = PageHeight - TopMargin - BottomMargin
|
||||
PrinterHeight = Get_Printer('POS')<2>
|
||||
|
||||
stat = Set_Printer('CALCTABLE',ColFmt:@FM:ColData)
|
||||
TableSize = Get_Printer('CALCTABLE')
|
||||
|
||||
|
||||
TableHeight = TableSize<2>
|
||||
|
||||
fontSpacing = 120
|
||||
|
||||
IF ( TableHeight + PrinterHeight >= PrintableHeight ) OR FirstLine THEN
|
||||
IF NOT(FirstLine) THEN
|
||||
stat = Set_Printer('PAGEBREAK')
|
||||
END
|
||||
FirstLine = 0
|
||||
font<2> = 10
|
||||
font<4> = 1 ;* Bold
|
||||
stat = Set_Printer('FONT',font,'100')
|
||||
|
||||
stat = Set_Printer('ADDTABLE',colFmt,colHead,'',LTGREY$,'',0,TB_ALL)
|
||||
|
||||
|
||||
font<4> = 0
|
||||
stat = Set_Printer('FONT',font,fontSpacing)
|
||||
|
||||
stat = Set_Printer('ADDTABLE',colFmt,'',colData,LTGREY$,'',0,7)
|
||||
|
||||
END ELSE
|
||||
font<2> = 10
|
||||
font<4> = 0
|
||||
stat = Set_Printer('FONT',font,fontSpacing)
|
||||
stat = Set_Printer('ADDTABLE',colFmt,'',colData,LTGREY$,'',1,TB_ALL)
|
||||
|
||||
END
|
||||
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
|
||||
|
@ -39,7 +39,7 @@ $Insert PRS_PROP_EQUATES
|
||||
Options SpecTypes = 'CLEAN', 'SURFSCAN', 'THICK', 'THICKA', 'RES', 'SRES', 'CRES', 'CONC'
|
||||
|
||||
Declare function Database_Services, Psn_Services, obj_Prod_Spec, Error_Services, SRP_JSON, Cust_Epi_Part_Services
|
||||
Declare function Prod_Ver_Services, PRS_Stage_Services, SRP_Array, Tool_Class_Services
|
||||
Declare function Prod_Ver_Services, PRS_Stage_Services, SRP_Array, Tool_Class_Services, SRP_String
|
||||
Declare subroutine Database_Services, Psn_Services, Error_Services, SRP_JSON, Extract_Si_Keys
|
||||
|
||||
GoToService else
|
||||
@ -116,8 +116,11 @@ Service GetMetrologyRecipesAndPatterns(PSNo)
|
||||
Extract_Si_Keys('PRS_PROP', 'PS_NO', PSNo, PropKeys)
|
||||
for each PropKey in PropKeys using @VM setting pPos
|
||||
Recipe = Xlate('PRS_PROP', PropKey, PRS_PROP_RECIPE$, 'X')
|
||||
Recipe = SRP_String('Trim', Recipe, FB)
|
||||
Pattern = Xlate('PRS_PROP', PropKey, PRS_PROP_PATTERN$, 'X')
|
||||
Pattern = SRP_String('Trim', Pattern, FB)
|
||||
Tool = Xlate('PRS_PROP', PropKey, PRS_PROP_TOOL$, 'X')
|
||||
Tool = SRP_String('Trim', Tool, FB)
|
||||
Convert @LOWER_CASE to @UPPER_CASE in Tool
|
||||
|
||||
If Recipe NE '' and Pattern NE '' and Tool NE '' then
|
||||
@ -136,8 +139,11 @@ Service GetMetrologyRecipesAndPatterns(PSNo)
|
||||
for each PRSStageKey in PRSStageKeys using @VM setting sPos
|
||||
Recipes = Xlate('PRS_STAGE', PRSStageKey, PRS_STAGE_MET_RECIPE$, 'X')
|
||||
for each Recipe in Recipes using @VM setting rPos
|
||||
Recipe = SRP_String('Trim', Recipe, FB)
|
||||
Pattern = Xlate('PRS_STAGE', PRSStageKey, PRS_STAGE_MET_RECIPE_PATTERN$, 'X')<1, rPos>
|
||||
Pattern = SRP_String('Trim', Pattern, FB)
|
||||
Tool = Xlate('PRS_STAGE', PRSStageKey, PRS_STAGE_MET_TOOL_CLASS$, 'X')<1, rPos>
|
||||
Tool = SRP_String('Trim', Tool, FB)
|
||||
Convert @LOWER_CASE to @UPPER_CASE in Tool
|
||||
|
||||
If Recipe NE '' and Tool NE '' and Pattern NE '' then
|
||||
|
@ -3122,9 +3122,7 @@ Service SignUnloadStage(RDSNo, Username, ScanEntry)
|
||||
Lot_Services('MoveInLot', LotId, Username) ; // Move into POST_EPI operation
|
||||
// If no production wafers in this run, then move out of POST_EPI and close the lot.
|
||||
If Rds_Services('IsEpiProTestRun', RDSNo) then
|
||||
Lot_Services('MoveOutLot', LotId, Username) ; // Move out of POST_EPI operation
|
||||
Lot_Services('MoveInLot', LotId, Username) ; // Move into RDS_CLOSE operation
|
||||
Lot_Services('CloseLot', LotId)
|
||||
Lot_Services('AutoCloseLot', LotId, 'SYSTEM')
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -3844,3 +3842,4 @@ return
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -68,7 +68,7 @@ Declare function Tool_Parms_Services, Signature_Services, obj_WO_Mat_QA, Date
|
||||
Declare function Rds_Services, SRP_DateTime, SRP_Math, obj_WO_Mat, Lot_Services, SRP_Array
|
||||
Declare function Lot_Event_Services, GetTickCount, Work_Order_Services
|
||||
Declare subroutine Error_Services, Database_Services, Logging_Services, Service_Services, obj_WO_React
|
||||
Declare Subroutine Mona_Services
|
||||
Declare Subroutine Mona_Services, Work_Order_Services
|
||||
|
||||
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\RDS'
|
||||
LogDate = Oconv(Date(), 'D4/')
|
||||
@ -905,18 +905,23 @@ WRITE_RECORD:
|
||||
WMIKeys = {WM_IN_KEY}
|
||||
For each WMIKey in WMIKeys using @VM setting vPos
|
||||
CassNo = Field(WMIKey, '*', 3)
|
||||
Service_Services('PostProcedure', 'SCHEDULE_SERVICES', 'MarkCassProcessed':SD$:WONo:SD$:CassNo:SD$:DatetimeOut)
|
||||
Service_Services('PostProcedure', 'SCHEDULE_SERVICES', 'UpdateCassProcStatus':SD$:WONo:SD$:CassNo:SD$:DatetimeOut)
|
||||
Next WMIKey
|
||||
end else
|
||||
CassNo = Record<RDS_CASS_NO$>
|
||||
Service_Services('PostProcedure', 'SCHEDULE_SERVICES', 'MarkCassProcessed':SD$:WONo:SD$:CassNo:SD$:DatetimeOut)
|
||||
Service_Services('PostProcedure', 'SCHEDULE_SERVICES', 'UpdateCassProcStatus':SD$:WONo:SD$:CassNo:SD$:DatetimeOut)
|
||||
end
|
||||
end
|
||||
|
||||
OrigPocketChar = OrigRecord<RDS_POCKET_CHAR$>
|
||||
NewPocketChar = Record<RDS_POCKET_CHAR$>
|
||||
If (OrigPocketChar NE NewPocketChar) then
|
||||
Service_Services('PostProcedure', 'WORK_ORDER_SERVICES', 'UpdateScrappedQty':SD$:WONo)
|
||||
OrigScrapQty = Count(OrigPocketChar, 'TEST')
|
||||
NewScrapQty = Count(NewPocketChar, 'TEST')
|
||||
AdjustQty = NewScrapQty - OrigScrapQty
|
||||
If AdjustQty NE 0 then
|
||||
Work_Order_Services('AdjustScrappedQty', WONo, AdjustQty)
|
||||
end
|
||||
end
|
||||
|
||||
If {WO} NE '' then Service_Services('PostProcedure', 'RDS_SERVICES', 'VerifyWOLogRDSKeyIndex':SD$:Name)
|
||||
@ -1018,3 +1023,4 @@ Restore_System_Variables:
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
@ -131,11 +131,13 @@ EQU NEW_EXIST$ To 0 ; * Reduce Mode 0
|
||||
equ NEXT_CUR$ To 1
|
||||
equ ADD_EXIST$ to 2
|
||||
|
||||
Equ NUM_ATTEMPTS$ to 60
|
||||
|
||||
AutoDisplayErrors = FALSE$ ; // Set this to True$ when debugging so all errors will automatically display.
|
||||
|
||||
Declare subroutine SRP_Stopwatch, Error_Services, obj_Tables, Metrology_Services, obj_RDS_Test, SRP_JSON, Logging_Services
|
||||
Declare subroutine RTI_Set_Debugger, Database_Services, Btree.Extract, Extract_SI_Keys, Obj_WO_Mat, Obj_WO_Mat_Log
|
||||
Declare subroutine Dialog_Box, Obj_Notes, RList, Set_Status, Errmsg, Obj_React_Status, Reactor_Services
|
||||
Declare subroutine Dialog_Box, Obj_Notes, RList, Set_Status, Errmsg, Obj_React_Status, Reactor_Services, Delay
|
||||
Declare subroutine Rds_Services, Obj_Post_Log, Mona_Services, Transaction_Services, Reduce, Update_Index
|
||||
Declare function SRP_Sort_Array, Metrology_Services, obj_RDS_Test, obj_Test_Point_Map, Database_Services
|
||||
Declare function Work_Order_Services, SRP_JSON, Logging_Services, Environment_Services, SRP_Trim, Error_Services
|
||||
@ -752,32 +754,28 @@ end service
|
||||
|
||||
|
||||
Service IsValidSubLot(RDSNo, RDSType, SupplierLot)
|
||||
|
||||
|
||||
// Note: We need to use the Quote function before comparing values because OpenInsight
|
||||
// fails to compare strings that start with numbers.
|
||||
IsValid = False$
|
||||
rec = ''
|
||||
Begin Case
|
||||
|
||||
Case RDSType EQ 'SIC'
|
||||
compareLot = XLATE('RDS', RDSNo, RDS_LOT_NUM$, 'X')
|
||||
if compareLot EQ SupplierLot then
|
||||
IsValid = True$
|
||||
end
|
||||
CompareLot = Xlate('RDS', RDSNo, RDS_LOT_NUM$, 'X')
|
||||
If Quote(CompareLot) EQ Quote(SupplierLot) then IsValid = True$
|
||||
|
||||
Case RDSType EQ 'EPP'
|
||||
CONVERT '.' TO '*' IN RDSNo
|
||||
compareLot = XLATE('WM_IN', RDSNo, 'LOT_NO', 'X')
|
||||
if compareLot EQ SupplierLot then
|
||||
IsValid = True$
|
||||
end
|
||||
Convert '.' to '*' in RDSNo
|
||||
CompareLot = Xlate('WM_IN', RDSNo, 'LOT_NO', 'X')
|
||||
If Quote(CompareLot) EQ Quote(SupplierLot) then IsValid = True$
|
||||
|
||||
Case RDSType EQ 'GAN'
|
||||
CONVERT '.' TO '*' IN RDSNo
|
||||
compareLot = XLATE('WO_MAT', RDSNo, WO_MAT_LOT_NO$, 'X')
|
||||
if compareLot EQ SupplierLot then
|
||||
IsValid = True$
|
||||
end
|
||||
Convert '.' to '*' in RDSNo
|
||||
CompareLot = Xlate('WO_MAT', RDSNo, WO_MAT_LOT_NO$, 'X')
|
||||
If Quote(CompareLot) EQ Quote(SupplierLot) then IsValid = True$
|
||||
|
||||
End Case
|
||||
End Case
|
||||
|
||||
Response = IsValid
|
||||
|
||||
end service
|
||||
@ -1157,37 +1155,47 @@ Service CopyRDSLayerParameters(RDSNo)
|
||||
CopyRDSLayerKeys = Xlate('RDS', CopyRDSNo, 'RDS_LAYER_KEYS', 'X')
|
||||
If CopyRDSLayerKeys NE '' then
|
||||
For each CopyRDSLayerKey in CopyRDSLayerKeys
|
||||
Until ErrMsg NE ''
|
||||
// Copy RDS layer records
|
||||
LayerID = Field(CopyRDSLayerKey, '*', 2)
|
||||
DestRDSLayerKey = RDSNo:'*':LayerID
|
||||
CopyRDSLayerRec = Database_Services('ReadDataRow', 'RDS_LAYER', CopyRDSLayerKey)
|
||||
DestRDSLayerRec = Database_Services('ReadDataRow', 'RDS_LAYER', DestRDSLayerKey)
|
||||
|
||||
DestRDSLayerRec<RDS_LAYER_DOPANT$> = CopyRDSLayerRec<RDS_LAYER_DOPANT$>
|
||||
DestRDSLayerRec<RDS_LAYER_EPI_DILUENT$> = CopyRDSLayerRec<RDS_LAYER_EPI_DILUENT$>
|
||||
DestRDSLayerRec<RDS_LAYER_EPI_TIME$> = CopyRDSLayerRec<RDS_LAYER_EPI_TIME$>
|
||||
DestRDSLayerRec<RDS_LAYER_DILUENT_ADJ_PARAM$> = CopyRDSLayerRec<RDS_LAYER_DILUENT_ADJ_PARAM$>
|
||||
DestRDSLayerRec<RDS_LAYER_DOPANT_FLOW$> = CopyRDSLayerRec<RDS_LAYER_DOPANT_FLOW$>
|
||||
DestRDSLayerRec<RDS_LAYER_HCL_FLOW$> = CopyRDSLayerRec<RDS_LAYER_HCL_FLOW$>
|
||||
DestRDSLayerRec<RDS_LAYER_BAKE_TIME$> = CopyRDSLayerRec<RDS_LAYER_BAKE_TIME$>
|
||||
DestRDSLayerRec<RDS_LAYER_EPI_H2_FLOW$> = CopyRDSLayerRec<RDS_LAYER_EPI_H2_FLOW$>
|
||||
DestRDSLayerRec<RDS_LAYER_TCS_FLOW$> = CopyRDSLayerRec<RDS_LAYER_TCS_FLOW$>
|
||||
DestRDSLayerRec<RDS_LAYER_DCS_FLOW$> = CopyRDSLayerRec<RDS_LAYER_DCS_FLOW$>
|
||||
DestRDSLayerRec<RDS_LAYER_AUX1$> = CopyRDSLayerRec<RDS_LAYER_AUX1$>
|
||||
DestRDSLayerRec<RDS_LAYER_AUX2$> = CopyRDSLayerRec<RDS_LAYER_AUX2$>
|
||||
DestRDSLayerRec<RDS_LAYER_F_OFFSET$> = CopyRDSLayerRec<RDS_LAYER_F_OFFSET$>
|
||||
DestRDSLayerRec<RDS_LAYER_S_OFFSET$> = CopyRDSLayerRec<RDS_LAYER_S_OFFSET$>
|
||||
DestRDSLayerRec<RDS_LAYER_R_OFFSET$> = CopyRDSLayerRec<RDS_LAYER_R_OFFSET$>
|
||||
DestRDSLayerRec<RDS_LAYER_ETCH1$> = CopyRDSLayerRec<RDS_LAYER_ETCH1$>
|
||||
DestRDSLayerRec<RDS_LAYER_ETCH2$> = CopyRDSLayerRec<RDS_LAYER_ETCH2$>
|
||||
DestRDSLayerRec<RDS_LAYER_ETCH3$> = CopyRDSLayerRec<RDS_LAYER_ETCH3$>
|
||||
DestRDSLayerRec<RDS_LAYER_OVERGROW_REQ$> = CopyRDSLayerRec<RDS_LAYER_OVERGROW_REQ$>
|
||||
DestRDSLayerRec<RDS_LAYER_SUSC_ETCH$> = CopyRDSLayerRec<RDS_LAYER_SUSC_ETCH$>
|
||||
DestRDSLayerRec<RDS_LAYER_UL_TEMP$> = CopyRDSLayerRec<RDS_LAYER_UL_TEMP$>
|
||||
DestRDSLayerRec<RDS_LAYER_MODIFY_USER$, -1> = 'CopyService'
|
||||
DestRDSLayerRec<RDS_LAYER_MODIFY_DTM$, -1> = DateTime()
|
||||
Database_Services('WriteDataRow', 'RDS_LAYER', DestRDSLayerKey, DestRDSLayerRec, True$, True$, True$)
|
||||
|
||||
CopyRDSLayerRec = Database_Services('ReadDataRow', 'RDS_LAYER', CopyRDSLayerKey)
|
||||
if Error_Services('NoError') then
|
||||
DestRDSLayerRec = Database_Services('ReadDataRow', 'RDS_LAYER', DestRDSLayerKey)
|
||||
If Error_Services('NoError') then
|
||||
DestRDSLayerRec<RDS_LAYER_DOPANT$> = CopyRDSLayerRec<RDS_LAYER_DOPANT$>
|
||||
DestRDSLayerRec<RDS_LAYER_EPI_DILUENT$> = CopyRDSLayerRec<RDS_LAYER_EPI_DILUENT$>
|
||||
DestRDSLayerRec<RDS_LAYER_EPI_TIME$> = CopyRDSLayerRec<RDS_LAYER_EPI_TIME$>
|
||||
DestRDSLayerRec<RDS_LAYER_DILUENT_ADJ_PARAM$> = CopyRDSLayerRec<RDS_LAYER_DILUENT_ADJ_PARAM$>
|
||||
DestRDSLayerRec<RDS_LAYER_DOPANT_FLOW$> = CopyRDSLayerRec<RDS_LAYER_DOPANT_FLOW$>
|
||||
DestRDSLayerRec<RDS_LAYER_HCL_FLOW$> = CopyRDSLayerRec<RDS_LAYER_HCL_FLOW$>
|
||||
DestRDSLayerRec<RDS_LAYER_BAKE_TIME$> = CopyRDSLayerRec<RDS_LAYER_BAKE_TIME$>
|
||||
DestRDSLayerRec<RDS_LAYER_EPI_H2_FLOW$> = CopyRDSLayerRec<RDS_LAYER_EPI_H2_FLOW$>
|
||||
DestRDSLayerRec<RDS_LAYER_TCS_FLOW$> = CopyRDSLayerRec<RDS_LAYER_TCS_FLOW$>
|
||||
DestRDSLayerRec<RDS_LAYER_DCS_FLOW$> = CopyRDSLayerRec<RDS_LAYER_DCS_FLOW$>
|
||||
DestRDSLayerRec<RDS_LAYER_AUX1$> = CopyRDSLayerRec<RDS_LAYER_AUX1$>
|
||||
DestRDSLayerRec<RDS_LAYER_AUX2$> = CopyRDSLayerRec<RDS_LAYER_AUX2$>
|
||||
DestRDSLayerRec<RDS_LAYER_F_OFFSET$> = CopyRDSLayerRec<RDS_LAYER_F_OFFSET$>
|
||||
DestRDSLayerRec<RDS_LAYER_S_OFFSET$> = CopyRDSLayerRec<RDS_LAYER_S_OFFSET$>
|
||||
DestRDSLayerRec<RDS_LAYER_R_OFFSET$> = CopyRDSLayerRec<RDS_LAYER_R_OFFSET$>
|
||||
DestRDSLayerRec<RDS_LAYER_ETCH1$> = CopyRDSLayerRec<RDS_LAYER_ETCH1$>
|
||||
DestRDSLayerRec<RDS_LAYER_ETCH2$> = CopyRDSLayerRec<RDS_LAYER_ETCH2$>
|
||||
DestRDSLayerRec<RDS_LAYER_ETCH3$> = CopyRDSLayerRec<RDS_LAYER_ETCH3$>
|
||||
DestRDSLayerRec<RDS_LAYER_OVERGROW_REQ$> = CopyRDSLayerRec<RDS_LAYER_OVERGROW_REQ$>
|
||||
DestRDSLayerRec<RDS_LAYER_SUSC_ETCH$> = CopyRDSLayerRec<RDS_LAYER_SUSC_ETCH$>
|
||||
DestRDSLayerRec<RDS_LAYER_UL_TEMP$> = CopyRDSLayerRec<RDS_LAYER_UL_TEMP$>
|
||||
DestRDSLayerRec<RDS_LAYER_MODIFY_USER$, -1> = 'CopyService'
|
||||
DestRDSLayerRec<RDS_LAYER_MODIFY_DTM$, -1> = DateTime()
|
||||
Database_Services('WriteDataRow', 'RDS_LAYER', DestRDSLayerKey, DestRDSLayerRec, True$, True$, True$)
|
||||
If Error_Services('HasError') then
|
||||
ErrMsg = Error_Services('GetMessage')
|
||||
end
|
||||
end else
|
||||
ErrMsg = Error_Services('GetMessage')
|
||||
end
|
||||
end else
|
||||
ErrMsg = Error_Services('GetMessage')
|
||||
end
|
||||
Next CopyRDSLayerKey
|
||||
end
|
||||
end else
|
||||
@ -2253,10 +2261,9 @@ Service VerifyWOMatRDSNoIndex(RDSNo)
|
||||
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<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<2> = RDSNo
|
||||
LogData<4> = 'Begin ':Service
|
||||
Logging_Services('AppendLog', objVerifyRDSNoLog, LogData, @RM, @FM)
|
||||
@ -2267,35 +2274,48 @@ Service VerifyWOMatRDSNoIndex(RDSNo)
|
||||
WOMatKey = Xlate('RDS', RDSNo, 'WO_MAT_KEY', 'X')
|
||||
If WOMatKey NE '' then
|
||||
WOMatRDSNo = Xlate('WO_MAT', WOMatKey, 'RDS_NO', 'X')
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<3> = WOMatKey
|
||||
Logging_Services('AppendLog', objVerifyRDSNoLog, LogData, @RM, @FM)
|
||||
If WOMatRDSNo EQ '' then
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
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)
|
||||
Done = False$
|
||||
For AttemptNo = 1 to NUM_ATTEMPTS$
|
||||
If AttemptNo GT 1 then Delay(1)
|
||||
Lock BangTable, 0 then
|
||||
Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM
|
||||
PendingTrans := IndexTransactionRow
|
||||
Write PendingTrans on BangTable, 0 then
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<4> = 'Index transaction successfully added.'
|
||||
Logging_Services('AppendLog', objVerifyRDSNoLog, LogData, @RM, @FM)
|
||||
Done = True$
|
||||
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 write index transaction to !RDS. ':RDSNo
|
||||
If AttemptNo GE NUM_ATTEMPTS$ then
|
||||
ErrorMsg = 'Unable to Lock !RDS to add index transaction. ':RDSNo
|
||||
end
|
||||
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
|
||||
Until Done or ErrorMsg
|
||||
Next AttemptNo
|
||||
end else
|
||||
ErrorMsg = 'Unable to Open !RDS to add index transaction. ':RDSNo
|
||||
end
|
||||
end else
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<4> = 'Index ok. RDSNo not missing from WO_MAT record.'
|
||||
Logging_Services('AppendLog', objVerifyRDSNoLog, LogData, @RM, @FM)
|
||||
end
|
||||
end else
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<4> = 'WO_MAT key for RDS ':RDSNo:' is null. Nothing to update.'
|
||||
Logging_Services('AppendLog', objVerifyRDSNoLog, LogData, @RM, @FM)
|
||||
end
|
||||
@ -2303,10 +2323,12 @@ Service VerifyWOMatRDSNoIndex(RDSNo)
|
||||
end
|
||||
|
||||
If ErrorMsg NE '' then
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<4> = ErrorMsg
|
||||
Logging_Services('AppendLog', objVerifyRDSNoLog, LogData, @RM, @FM)
|
||||
end
|
||||
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<4> = 'End ':Service
|
||||
Logging_Services('AppendLog', objVerifyRDSNoLog, LogData, @RM, @FM)
|
||||
|
||||
@ -2317,16 +2339,15 @@ 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'
|
||||
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<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<2> = RDSNo
|
||||
LogData<4> = 'Begin ':Service
|
||||
Logging_Services('AppendLog', objVerifyRDSKeyLog, LogData, @RM, @FM)
|
||||
@ -2337,35 +2358,48 @@ Service VerifyWOStepRDSKeyIndex(RDSNo)
|
||||
WOStepKey = Xlate('RDS', RDSNo, 'WO_STEP_KEY', 'X')
|
||||
If WOStepKey NE '' then
|
||||
WOStepRDSKeys = Xlate('WO_STEP', WOStepKey, 'RDS_KEY', 'X')
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<3> = WOStepKey
|
||||
Logging_Services('AppendLog', objVerifyRDSKeyLog, LogData, @RM, @FM)
|
||||
Locate RDSNo in WOStepRDSKeys using @VM setting vPos then
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<4> = 'Index ok. RDSNo not missing from WO_STEP record.'
|
||||
Logging_Services('AppendLog', objVerifyRDSKeyLog, LogData, @RM, @FM)
|
||||
end else
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
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)
|
||||
Done = False$
|
||||
For AttemptNo = 1 to NUM_ATTEMPTS$
|
||||
If AttemptNo GT 1 then Delay(1)
|
||||
Lock BangTable, 0 then
|
||||
Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM
|
||||
PendingTrans := IndexTransactionRow
|
||||
Write PendingTrans on BangTable, 0 then
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<4> = 'Index transaction successfully added.'
|
||||
Logging_Services('AppendLog', objVerifyRDSKeyLog, LogData, @RM, @FM)
|
||||
Done = True$
|
||||
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 write index transaction to !RDS. ':RDSNo
|
||||
If AttemptNo GE NUM_ATTEMPTS$ then
|
||||
ErrorMsg = 'Unable to Lock !RDS to add index transaction. ':RDSNo
|
||||
end
|
||||
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
|
||||
Until Done or ErrorMsg
|
||||
Next AttemptNo
|
||||
end else
|
||||
ErrorMsg = 'Unable to Open !RDS to add index transaction. ':RDSNo
|
||||
end
|
||||
end
|
||||
end else
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<4> = 'WO_STEP key for RDS ':RDSNo:' is null. Nothing to update.'
|
||||
Logging_Services('AppendLog', objVerifyRDSKeyLog, LogData, @RM, @FM)
|
||||
end
|
||||
@ -2373,10 +2407,12 @@ Service VerifyWOStepRDSKeyIndex(RDSNo)
|
||||
end
|
||||
|
||||
If ErrorMsg NE '' then
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<4> = ErrorMsg
|
||||
Logging_Services('AppendLog', objVerifyRDSKeyLog, LogData, @RM, @FM)
|
||||
end
|
||||
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<4> = 'End ':Service
|
||||
Logging_Services('AppendLog', objVerifyRDSKeyLog, LogData, @RM, @FM)
|
||||
|
||||
@ -2393,10 +2429,9 @@ Service VerifyWOLogRDSKeyIndex(RDSNo)
|
||||
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<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<2> = RDSNo
|
||||
LogData<4> = 'Begin ':Service
|
||||
Logging_Services('AppendLog', objVerifyRDSWoIndexLog, LogData, @RM, @FM)
|
||||
@ -2411,32 +2446,44 @@ Service VerifyWOLogRDSKeyIndex(RDSNo)
|
||||
LogData<3> = WONo
|
||||
Logging_Services('AppendLog', objVerifyRDSWoIndexLog, LogData, @RM, @FM)
|
||||
Locate RDSNo in WOLogRDSKeys using @VM setting vPos then
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<4> = 'Index ok. RDSNo not missing from Btree index.'
|
||||
Logging_Services('AppendLog', objVerifyRDSWoIndexLog, LogData, @RM, @FM)
|
||||
end else
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
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)
|
||||
Done = False$
|
||||
For AttemptNo = 1 to NUM_ATTEMPTS$
|
||||
If AttemptNo GT 1 then Delay(1)
|
||||
Lock BangTable, 0 then
|
||||
Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM
|
||||
PendingTrans := IndexTransactionRow
|
||||
Write PendingTrans on BangTable, 0 then
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<4> = 'Index transaction successfully added.'
|
||||
Logging_Services('AppendLog', objVerifyRDSWoIndexLog, LogData, @RM, @FM)
|
||||
Done = True$
|
||||
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 write index transaction to !RDS. ':RDSNo
|
||||
If AttemptNo GE NUM_ATTEMPTS$ then
|
||||
ErrorMsg = 'Error in ':Service:' service. Unable to Lock !RDS to add index transaction. ':RDSNo
|
||||
end
|
||||
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
|
||||
Until Done or ErrorMsg
|
||||
Next AttemptNo
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Unable to Open !RDS to add index transaction. ':RDSNo
|
||||
end
|
||||
end
|
||||
end else
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<4> = 'WONo for RDS ':RDSNo:' is null. Nothing to update.'
|
||||
Logging_Services('AppendLog', objVerifyRDSWoIndexLog, LogData, @RM, @FM)
|
||||
end
|
||||
@ -2446,10 +2493,12 @@ Service VerifyWOLogRDSKeyIndex(RDSNo)
|
||||
end
|
||||
|
||||
If ErrorMsg NE '' then
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<4> = ErrorMsg
|
||||
Logging_Services('AppendLog', objVerifyRDSWoIndexLog, LogData, @RM, @FM)
|
||||
end
|
||||
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<4> = 'End ':Service
|
||||
Logging_Services('AppendLog', objVerifyRDSWoIndexLog, LogData, @RM, @FM)
|
||||
|
||||
@ -3380,4 +3429,3 @@ ClearCursors:
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
204
LSL2/STPROC/RDS_TEST_SERVICES.txt
Normal file
204
LSL2/STPROC/RDS_TEST_SERVICES.txt
Normal file
@ -0,0 +1,204 @@
|
||||
Compile function RDS_TEST_Services(@Service, @Params)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
Name : Rds_Test_Services
|
||||
|
||||
Description : Handler program for all RDS_TEST 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)
|
||||
09/26/2025 djs Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$Insert SERVICE_SETUP
|
||||
$insert APP_INSERTS
|
||||
$Insert RDS_EQUATES
|
||||
$Insert RDS_TEST_EQUATES
|
||||
$Insert PROD_SPEC_EQUATES
|
||||
$Insert RDS_LAYER_EQUATES
|
||||
$INSERT PRS_LAYER_EQU
|
||||
|
||||
Declare function Database_Services, Error_Services, obj_Prod_Spec
|
||||
Declare subroutine Database_Services, Error_Services
|
||||
|
||||
GoToService
|
||||
|
||||
Return Response or ""
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// SERVICES
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Service UpdateRDSTestSpecs(RdsNo)
|
||||
|
||||
ErrorMsg = ''
|
||||
If (RDSNo NE '') then
|
||||
If RowExists('RDS', RDSNo) then
|
||||
RDSRec = Database_Services('ReadDataRow', 'RDS', RDSNo)
|
||||
If Error_Services('NoError') then
|
||||
LayerKeys = RDSRec<RDS_RDS_LAYER_KEYS$>
|
||||
PSNId = RDSRec<RDS_PROD_SPEC_ID$>
|
||||
For each LayerKey in LayerKeys using @VM setting vPos
|
||||
LayerSet = Field(LayerKey, '*', 2, 1)
|
||||
LayerSpecs = obj_Prod_Spec('GetLayerProp',PSNId:@RM:LayerSet:@RM:1) ;* Last parameter specifies no output conversion on return data
|
||||
LayerSpecs = Field(LayerSpecs,@FM,2,99) ;* Returns with the layer set ID in the first field of each line
|
||||
ErrCode = ''
|
||||
If Not(Get_Status(ErrCode)) then
|
||||
WaferSize = Xlate('PROD_SPEC', PSNId, 'SUB_WAFER_SIZE', 'X')
|
||||
SubOrientation = Xlate('PROD_SPEC', PSNId, 'SUB_ORIENTATION', 'X')
|
||||
ResUnits = LayerSpecs<PRS_LAYER_RES_UNITS$>
|
||||
ReactorType = Xlate('PROD_SPEC', PSNId, PROD_SPEC_REACTOR_TYPE$, 'X')
|
||||
ThickFilmMet = Xlate('PROD_SPEC', PSNId, PROD_SPEC_THICKFILM_MET$, 'X') ;* Added 1/16/2009 JCH
|
||||
|
||||
RdsTestKeys = Database_Services('ReadDataColumn', 'RDS_LAYER', LayerKey, RDS_LAYER_RDS_TEST_KEYS$)
|
||||
If Error_Services('NoError') then
|
||||
For each RdsTestKey in RdsTestKeys using @VM setting RdsTestPos
|
||||
RdsTestRec = Database_Services('ReadDataRow', 'RDS_TEST', RdsTestKey)
|
||||
If Error_Services('NoError') then
|
||||
RDSTestRec<RDS_TEST_WAFER_SIZE$> = WaferSize
|
||||
RDSTestRec<RDS_TEST_SUB_ORIENTATION$> = SubOrientation
|
||||
RDSTestRec<RDS_TEST_SPEC_DOPANT$> = LayerSpecs<PRS_LAYER_DOPANT$>
|
||||
RDSTestRec<RDS_TEST_SPEC_RECIPE$> = LayerSpecs<PRS_LAYER_RECIPE$>
|
||||
RDSTestRec<RDS_TEST_SPEC_RECIPE_NAME$> = LayerSpecs<PRS_LAYER_RECIPE_NAME$>
|
||||
RDSTestRec<RDS_TEST_SPEC_THICK_MIN$> = LayerSpecs<PRS_LAYER_THICK_MIN$>
|
||||
RDSTestRec<RDS_TEST_SPEC_THICK_TARGET$> = LayerSpecs<PRS_LAYER_THICK_TARGET$>
|
||||
RDSTestRec<RDS_TEST_SPEC_THICK_MAX$> = LayerSpecs<PRS_LAYER_THICK_MAX$>
|
||||
RDSTestRec<RDS_TEST_SPEC_THICK_UNITS$> = LayerSpecs<PRS_LAYER_THICK_UNITS$>
|
||||
RDSTestRec<RDS_TEST_SPEC_RES_MIN$> = LayerSpecs<PRS_LAYER_RES_MIN$>
|
||||
RDSTestRec<RDS_TEST_SPEC_RES_TARGET$> = LayerSpecs<PRS_LAYER_RES_TARGET$>
|
||||
RDSTestRec<RDS_TEST_SPEC_RES_MAX$> = LayerSpecs<PRS_LAYER_RES_MAX$>
|
||||
RDSTestRec<RDS_TEST_SPEC_RES_UNITS$> = LayerSpecs<PRS_LAYER_RES_UNITS$>
|
||||
RDSTestRec<RDS_TEST_SPEC_CON_MIN$> = LayerSpecs<PRS_LAYER_CONC_MIN$>
|
||||
RDSTestRec<RDS_TEST_SPEC_CON_TARGET$> = LayerSpecs<PRS_LAYER_CONC_TARGET$>
|
||||
RDSTestRec<RDS_TEST_SPEC_CON_MAX$> = LayerSpecs<PRS_LAYER_CONC_MAX$>
|
||||
RDSTestRec<RDS_TEST_SPEC_CON_UNITS$> = LayerSpecs<PRS_LAYER_CONC_UNITS$>
|
||||
RDSTestRec<RDS_TEST_SPEC_STRESS_MIN$> = LayerSpecs<PRS_LAYER_STRESS_MIN$>
|
||||
RDSTestRec<RDS_TEST_SPEC_STRESS_MAX$> = LayerSpecs<PRS_LAYER_STRESS_MAX$>
|
||||
RDSTestRec<RDS_TEST_SPEC_TRANS$> = LayerSpecs<PRS_LAYER_TRANS_SPEC$>
|
||||
RDSTestRec<RDS_TEST_SPEC_CRES_MIN$> = LayerSpecs<PRS_LAYER_CRES_MIN$>
|
||||
RDSTestRec<RDS_TEST_SPEC_CRES_TARGET$> = LayerSpecs<PRS_LAYER_CRES_TARGET$>
|
||||
RDSTestRec<RDS_TEST_SPEC_CRES_MAX$> = LayerSpecs<PRS_LAYER_CRES_MAX$>
|
||||
RDSTestRec<RDS_TEST_SPEC_CRES_UNITS$> = LayerSpecs<PRS_LAYER_CRES_UNITS$>
|
||||
|
||||
For A = 11 to 19
|
||||
RDSTestRec<A> = LayerSpecs<PRS_LAYER_THICK_MEASUREMENT$,A-10>
|
||||
Next A
|
||||
|
||||
For A = 24 to 32
|
||||
RDSTestRec<A> = LayerSpecs<PRS_LAYER_RES_MEASUREMENT$,A-23>
|
||||
Next A
|
||||
|
||||
For A = 37 to 45
|
||||
RDSTestRec<A> = LayerSpecs<PRS_LAYER_CONC_MEASUREMENT$,A-36>
|
||||
Next A
|
||||
|
||||
For A = 50 to 58
|
||||
RDSTestRec<A> = LayerSpecs<PRS_LAYER_STRESS_MEASUREMENT$,A-49>
|
||||
Next A
|
||||
|
||||
For A = 121 to 129
|
||||
RDSTestRec<A> = LayerSpecs<PRS_LAYER_CRES_MEASUREMENT$,A-120>
|
||||
Next A
|
||||
|
||||
RDSTestRec<RDS_TEST_SPEC_THICK_MPATTERN$> = LayerSpecs<PRS_LAYER_THICK_MEASUREMENT$,PRS_MPATTERN$>
|
||||
RDSTestRec<RDS_TEST_SPEC_RES_MPATTERN$> = LayerSpecs<PRS_LAYER_RES_MEASUREMENT$,PRS_MPATTERN$>
|
||||
RDSTestRec<RDS_TEST_SPEC_CON_MPATTERN$> = LayerSpecs<PRS_LAYER_CONC_MEASUREMENT$,PRS_MPATTERN$>
|
||||
RDSTestRec<RDS_TEST_SPEC_STRESS_MPATTERN$> = LayerSpecs<PRS_LAYER_STRESS_MEASUREMENT$,PRS_MPATTERN$>
|
||||
RDSTestRec<RDS_TEST_SPEC_CRES_MPATTERN$> = LayerSpecs<PRS_LAYER_CRES_MEASUREMENT$,PRS_MPATTERN$>
|
||||
|
||||
RDSTestRec<RDS_TEST_REACTOR_TYPE$> = ReactorType
|
||||
|
||||
If ( (ReactorType EQ 'P') or (ReactorType EQ 'EPP') or (ThickFilmMet EQ True$) ) then
|
||||
SpecMap = XLATE('PROD_SPEC', PSNId, PROD_SPEC_TEST_POINT_MAP$, 'X') ;* Added 4/8/2009 JCH new field in PROD_SPEC
|
||||
If SpecMap NE '' then
|
||||
RDSTestRec<RDS_TEST_TEST_POINT_MAP$> = SpecMap
|
||||
end else
|
||||
;* Added ThickFilmMet check - 1/16/2009 JCH
|
||||
AllTargetThicks = XLATE('PROD_SPEC', PSNId, 'THICK_TARGET_ALL', 'X')
|
||||
TargetCnt = COUNT(AllTargetThicks,@VM) + (AllTargetThicks NE '')
|
||||
|
||||
Begin Case
|
||||
Case TargetCnt = 2
|
||||
CombinedThick = SUM(AllTargetThicks)
|
||||
|
||||
Case TargetCnt = 1 OR TargetCnt = 3
|
||||
CombinedThick = AllTargetThicks[-1,'B':@VM]
|
||||
|
||||
End Case
|
||||
|
||||
If OCONV(CombinedThick,'MD2') > '65.0' then
|
||||
RDSTestRec<RDS_TEST_TEST_POINT_MAP$> = 'FTIR_T'
|
||||
end else
|
||||
RDSTestRec<RDS_TEST_TEST_POINT_MAP$> = 'FTIR'
|
||||
end
|
||||
end
|
||||
|
||||
end else
|
||||
RDSTestRec<RDS_TEST_TEST_POINT_MAP$> = 'ASM17' ;* 17 Point linear test pattern until PROD_SPEC is updated support other types
|
||||
end
|
||||
Database_Services('WriteDataRow', 'RDS_TEST', RdsTestKey, RdsTestRec)
|
||||
If Error_Services('HasError') then
|
||||
ErrorMsg = 'Error in ':Service:' service. Error message: ':Error_Services('GetMessage')
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Error message: ':Error_Services('GetMessage')
|
||||
end
|
||||
Next RdsTestKey
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Error message: ':Error_Services('GetMessage')
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Error calling obj_Prod_Spec("GetLayerProp"). Error code: ':ErrCode
|
||||
end
|
||||
Next LayerKey
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Error message: ':Error_Services('GetMessage')
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. RDS ':RdsNo:' does not exist'
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Null RDSNo passed into service'
|
||||
end
|
||||
|
||||
If (ErrorMsg NE '') then Error_Services('Add', ErrorMsg)
|
||||
|
||||
End Service
|
||||
|
@ -58,9 +58,9 @@ $Insert NICA_ORDERS_EQUATES
|
||||
$Insert REACTOR_INJECTOR_SETTINGS_EQUATES
|
||||
$Insert REACTOR_RATIOS_EQUATES
|
||||
$Insert REACT_STATE_EQUATES
|
||||
$Insert TIME_INSERTS
|
||||
|
||||
Equ WOCust$ to 2
|
||||
Equ SECONDS_IN_DAY$ to 86400
|
||||
|
||||
// Uptime Percentage Equates
|
||||
Equ PRODUCTIVE$ to 1
|
||||
@ -4515,4 +4515,3 @@ ClearCursors:
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
133
LSL2/STPROC/REARCHIVE_API.txt
Normal file
133
LSL2/STPROC/REARCHIVE_API.txt
Normal file
@ -0,0 +1,133 @@
|
||||
Function Rearchive_API(@API)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : Rearchive_API
|
||||
|
||||
Description : API logic for the Rearchive resource.
|
||||
|
||||
Notes : All web APIs should include the API_SETUP insert. This will provide several useful variables:
|
||||
|
||||
HTTPMethod - The HTTP Method (Verb) submitted by the client (e.g., GET, POST, etc.)
|
||||
APIURL - The URL for the API entry point (e.g., api.mysite.com/v1).
|
||||
FullEndpointURL - The URL submitted by the client, including query params.
|
||||
FullEndpointURLNoQuery - The URL submitted by the client, excluding query params.
|
||||
EndpointSegment - The URL endpoint segment.
|
||||
ParentURL - The URL path preceeding the current endpoint.
|
||||
CurrentAPI - The name of this stored procedure.
|
||||
|
||||
Parameters :
|
||||
API [in] -- Web API to process. Format is [APIPattern].[HTTPMethod]:
|
||||
- APIPattern must follow this structure Rearchive[.ID.[<Property>]]
|
||||
- HTTPMethod can be any valid HTTP method, e.g., GET, POST, PUT, DELETE, etc.
|
||||
Examples:
|
||||
- Rearchive.POST
|
||||
- Rearchive.ID.PUT
|
||||
- Rearchive.ID.firstName.GET
|
||||
Response [out] -- Response to be sent back to the Controller (HTTP_MCP) or requesting procedure. Web API
|
||||
services do not rely upon anything being returned in the response. This is what the
|
||||
various services like SetResponseBody and SetResponseStatus services are for. A response
|
||||
value is only helpful if the developers want to use it for debug purposes.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
10/16/25 xxx Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert API_SETUP
|
||||
$insert HTTP_INSERTS
|
||||
$Insert IFX_EQUATES
|
||||
|
||||
Declare subroutine Service_Services, Logging_Services
|
||||
Declare function OI_Wizard_Services, Environment_Services, Logging_Services
|
||||
|
||||
GoToAPI else
|
||||
// The specific resource endpoint doesn't have a API handler yet.
|
||||
HTTP_Services('SetResponseStatus', 204, 'This is a valid endpoint but a web API handler has not yet been created.')
|
||||
end
|
||||
|
||||
Return Response OR ''
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Endpoint Handlers
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
API rearchive.ID.POST
|
||||
|
||||
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\Archive\ReArchiving'
|
||||
LogDate = Oconv(Date(), 'D4/')
|
||||
LogTime = Oconv(Time(), 'MTS')
|
||||
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' ArchiveService.csv'
|
||||
Headers = 'Logging DTM' : @FM : 'Message'
|
||||
objLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, Comma$, Headers, '', False$, False$)
|
||||
LoggingDTM = LogDate : ' ' : LogTime
|
||||
|
||||
ErrorMsg = ''
|
||||
OIWizardID = ''
|
||||
Cookies = HTTP_Services('GetHTTPCookie')
|
||||
For each Cookie in Cookies using ';'
|
||||
Key = Field(Cookie, '=', 1)
|
||||
If Key EQ 'sessionID' then
|
||||
OIWizardID = Field(Cookie, '=', 2)
|
||||
end
|
||||
Next Cookie
|
||||
|
||||
ValidSession = OI_Wizard_Services('ValidateSession', OIWizardID)
|
||||
|
||||
If ValidSession then
|
||||
ArchiveId = EndpointSegment
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM;
|
||||
LogData<2> = ArchiveId
|
||||
LogData<3> = 'Attempting to add re-archival to the process queue.'
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
swap '__' with '*' in ArchiveId
|
||||
If RowExists('ARCHIVE', ArchiveId) then
|
||||
Service_Services('PostProcedure', 'ARCHIVE_SERVICES', 'ReArchive':SD$:ArchiveId)
|
||||
If Error_Services('NoError') then
|
||||
Message = 'Successfully queued data for re-archive.'
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM;
|
||||
LogData<2> = ArchiveId
|
||||
LogData<3> = Message
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
end else
|
||||
ErrorMsg = 'Error queueing re-archiving.'
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM;
|
||||
LogData<2> = ArchiveId
|
||||
LogData<3> = ErrorMsg
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Archive record not found in database.'
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM;
|
||||
LogData<2> = ArchiveId
|
||||
LogData<3> = ErrorMsg
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
end
|
||||
|
||||
If ErrorMsg NE '' then
|
||||
HTTP_Services('SetResponseStatus', 500, ErrorMsg)
|
||||
end else
|
||||
HTTP_Services('SetResponseHeaderField', 'Content-Location', FullEndpointURL)
|
||||
If Assigned(Message) then
|
||||
HTTP_Services('SetResponseStatus', 201, Message)
|
||||
end else
|
||||
HTTP_Services('SetResponseStatus', 201)
|
||||
end
|
||||
end
|
||||
|
||||
end else
|
||||
HTTP_Services('SetResponseStatus', 500, 'Invalid session. Reauthentication required.')
|
||||
end
|
||||
|
||||
end api
|
@ -73,7 +73,7 @@ $Insert MATERIAL_REPORT_EQUATES
|
||||
// Reduce modes (for Select statement)
|
||||
Equ NEW_EXIST$ To 0
|
||||
Equ NEXT_CUR$ To 1
|
||||
Equ ADD_EXIST$ To 2
|
||||
Equ ADD_EXIST$ To 2
|
||||
|
||||
Declare subroutine Utility, ErrMsg, Set_Status, Set_Printer, RList, SRP_Stopwatch, Btree.Extract, Error_Services, V119
|
||||
Declare subroutine Push.Select, Pop.Select, Database_Services, SRP_JSON, Logging_Services, Reduce, FSMsg
|
||||
@ -632,23 +632,25 @@ Service GetMaterialTrackJSON()
|
||||
SRP_JSON(objRow, 'SetValue', 'SapProdNo', Row<MATERIAL_REPORT.PROD_ORD_NO$>)
|
||||
SRP_JSON(objRow, 'SetValue', 'SubPartNo', Row<MATERIAL_REPORT.SUB_PART_NO$>)
|
||||
SRP_JSON(objRow, 'SetValue', 'EpiPartNo', Row<MATERIAL_REPORT.EPI_PART_NO$>)
|
||||
WOQty = Row<MATERIAL_REPORT.WO_QTY$>
|
||||
WOQty = Row<MATERIAL_REPORT.WO_QTY$>
|
||||
Swap ',' with '' in WOQty
|
||||
SRP_JSON(objRow, 'SetValue', 'WoQty', WOQty)
|
||||
RxQty = Row<MATERIAL_REPORT.WO_RX_QTY$>
|
||||
RxQty = Row<MATERIAL_REPORT.WO_RX_QTY$>
|
||||
Swap ',' with '' in RxQty
|
||||
SRP_JSON(objRow, 'SetValue', 'RxQty', RxQty)
|
||||
UnRelQty = Row<MATERIAL_REPORT.WO_UNREL_QTY$>
|
||||
UnRelQty = Row<MATERIAL_REPORT.WO_UNREL_QTY$>
|
||||
Swap ',' with '' in UnRelQty
|
||||
SRP_JSON(objRow, 'SetValue', 'UnRelQty', UnRelQty)
|
||||
SRP_JSON(objRow, 'SetValue', 'KitLoc', Row<MATERIAL_REPORT.KIT_LOCATION$>)
|
||||
KitQty = Row<MATERIAL_REPORT.KIT_QTY$>
|
||||
KitQty = Row<MATERIAL_REPORT.KIT_QTY$>
|
||||
Swap ',' with '' in KitQty
|
||||
SRP_JSON(objRow, 'SetValue', 'KitQty', KitQty)
|
||||
SRP_JSON(objRow, 'SetValue', 'CassDelta', Row<MATERIAL_REPORT.CASS_DELTA$>)
|
||||
Swap ',' with ', ' in KitRunOrder
|
||||
SRP_JSON(objRow, 'SetValue', 'KitRunOrder', KitRunOrder)
|
||||
SRP_JSON(objRow, 'SetValue', 'KitDemand', Row<MATERIAL_REPORT.KIT_DEMAND$>)
|
||||
KitDemand = Row<MATERIAL_REPORT.KIT_DEMAND$>
|
||||
Swap ',' with ', ' in KitDemand
|
||||
SRP_JSON(objRow, 'SetValue', 'KitDemand', KitDemand)
|
||||
Swap ',' with ', ' in PTIRunOrder
|
||||
SRP_JSON(objRow, 'SetValue', 'PtiRunOrder', PTIRunOrder)
|
||||
Swap ',' with ', ' in LoadRunOrder
|
||||
@ -1080,7 +1082,9 @@ Service CalcDailyPerformanceData(DateOut)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service GenerateOrUpdateDailyReactorUptimeData()
|
||||
|
||||
//Generates new or updates existing Reactor uptime data for all reactors in the current day.
|
||||
hSysLists = Database_Services('GetTableHandle', 'SYSLISTS')
|
||||
Lock hSysLists, ServiceKeyID then
|
||||
@ -1104,9 +1108,12 @@ Service GenerateOrUpdateDailyReactorUptimeData()
|
||||
Database_Services('WriteDataRow', 'REACTOR_DAILY_UPTIME', ALLRecordKey, ALLUptimeRec, True$, False$, True$)
|
||||
Unlock hSysLists, ServiceKeyID else Null
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service GetDailyReactorUptimeDataJSON(ReportStartDt, ReportEndDt)
|
||||
|
||||
Response = ''
|
||||
Begin Case
|
||||
Case ReportStartDt EQ ''
|
||||
@ -1253,8 +1260,10 @@ Service GetDailyReactorUptimeDataJSON(ReportStartDt, ReportEndDt)
|
||||
SRP_Json(ReactorUptimeJson, "Release")
|
||||
Response = ResponseJson
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service GetDailyPerformanceDataJSON(DateOut)
|
||||
|
||||
Response = ''
|
||||
@ -1453,11 +1462,12 @@ Service GenerateMaterialTrackRows()
|
||||
OPEN 'DICT.SCHED_DET_NG' TO SchedDetDict then
|
||||
Today = Datetime()
|
||||
|
||||
ReactList = ''
|
||||
WOList = ''
|
||||
SchedDetKeys = ''
|
||||
PrevReactNo = ''
|
||||
PrevWO = ''
|
||||
ReactList = ''
|
||||
RemainingReactorDemandList = ''
|
||||
WOList = ''
|
||||
SchedDetKeys = ''
|
||||
PrevReactNo = ''
|
||||
PrevWO = ''
|
||||
|
||||
SelectSent = 'SELECT SCHED_DET_NG WITH STOP_DTM GE "':OCONV(Today, 'DT'):'" BY REACT_NO BY START_DTM'
|
||||
|
||||
@ -1468,6 +1478,10 @@ Service GenerateMaterialTrackRows()
|
||||
RETURN
|
||||
END
|
||||
|
||||
AsmDemand = Database_Services('ReadDataRow', 'APP_INFO', 'MATERIAL_REPORT*ASM_DEMAND')
|
||||
HtrDemand = Database_Services('ReadDataRow', 'APP_INFO', 'MATERIAL_REPORT*HTR_DEMAND')
|
||||
EppDemand = Database_Services('ReadDataRow', 'APP_INFO', 'MATERIAL_REPORT*EPP_DEMAND')
|
||||
|
||||
Done = 0
|
||||
CurrSchedDetKey = ''
|
||||
LOOP
|
||||
@ -1479,13 +1493,25 @@ Service GenerateMaterialTrackRows()
|
||||
WONo = SchedDetRec<SCHED_DET_NG.WO_NO$>
|
||||
If ReactNo NE '' then
|
||||
LOCATE ReactNo IN ReactList BY 'AR' USING @FM SETTING Pos ELSE
|
||||
ReactList = INSERT(ReactList,Pos,0,0,ReactNo)
|
||||
ReactType = Database_Services('ReadDataColumn', 'REACTOR', ReactNo, REACTOR_REACT_TYPE$)
|
||||
ReactList = Insert(ReactList,Pos,0,0,ReactNo)
|
||||
Begin Case
|
||||
Case IndexC(ReactType, 'ASM', 1)
|
||||
ReactTypeDemand = AsmDemand
|
||||
Case IndexC(ReactType, 'HTR', 1)
|
||||
ReactTypeDemand = HtrDemand
|
||||
Case IndexC(ReactType, 'EPP', 1)
|
||||
ReactTypeDemand = EppDemand
|
||||
Case Otherwise$
|
||||
ReactTypeDemand = 0
|
||||
End Case
|
||||
RemainingReactorDemandList = Insert(RemainingReactorDemandList, Pos, 0, 0, ReactTypeDemand)
|
||||
END
|
||||
END
|
||||
If WONo NE '' then
|
||||
LOCATE WONo IN WOList<Pos> USING @VM SETTING WPos ELSE
|
||||
WOList = INSERT(WOList,Pos,-1,0,WONo)
|
||||
SchedDetKeys = INSERT(SchedDetKeys,-1,0,0,CurrSchedDetKey)
|
||||
WOList = Insert(WOList,Pos,-1,0,WONo)
|
||||
SchedDetKeys = Insert(SchedDetKeys,-1,0,0,CurrSchedDetKey)
|
||||
END
|
||||
END
|
||||
END
|
||||
@ -1498,7 +1524,7 @@ Service GenerateMaterialTrackRows()
|
||||
|
||||
RowIndex = 0
|
||||
AllReportData = ''
|
||||
RecCount = 0
|
||||
RecCount = 0
|
||||
FirstPass = 1
|
||||
LastRecord = 0
|
||||
FirstLine = 1
|
||||
@ -1714,36 +1740,42 @@ Service GenerateMaterialTrackRows()
|
||||
PTICassList = SRP_Array('SortSimpleList', PTICassList, 'AscendingNumbers', ',')
|
||||
LoadedCassList = SRP_Array('SortSimpleList', LoadedCassList, 'AscendingNumbers', ',')
|
||||
|
||||
CassNeeded = ''
|
||||
EpiPartNo = Xlate('WO_LOG', S.WONo, 'EPI_PART_NO', 'X')
|
||||
If EpiPartNo NE '' then
|
||||
WPDAdjusted = Epi_Part_Services('GetAdjustedWafersPerDayScheduler', EpiPartNo, S.React_Type)
|
||||
If WPDAdjusted NE '' then
|
||||
CPDAdjusted = SRP_Math('CEILING', (WPDAdjusted/25) )
|
||||
CassInCR = DCount(KitCassList, ',') + DCount(PTICassList, ',') + DCount(LoadedCassList, ',')
|
||||
CassNeeded = CassInCR - CPDAdjusted
|
||||
end
|
||||
end
|
||||
Locate S.ReactNo in ReactList using @FM setting rPos then
|
||||
ThisReactorRemainingDemand = RemainingReactorDemandList<rPos>
|
||||
PTICassCount = DCount(PTICassList, ',')
|
||||
ThisReactorRemainingDemand -= PTICassCount
|
||||
If ThisReactorRemainingDemand LT 0 then ThisReactorRemainingDemand = 0
|
||||
RemainingReactorDemandList<rPos> = ThisReactorRemainingDemand
|
||||
If ThisReactorRemainingDemand GT 0 then
|
||||
KitDemand = Field(KitCassList, ',', 1, ThisReactorRemainingDemand)
|
||||
ThisReactorRemainingDemand -= DCount(KitDemand, ',')
|
||||
RemainingReactorDemandList<rPos> = ThisReactorRemainingDemand
|
||||
end else
|
||||
KitDemand = ''
|
||||
end
|
||||
end else
|
||||
KitDemand = ''
|
||||
end
|
||||
|
||||
RowIndex += 1
|
||||
Swap '.1' with '' in S.ProdOrdNo
|
||||
|
||||
AllReportData<RowIndex, 1> = S.ReactNo
|
||||
AllReportData<RowIndex, 2> = S.React_Type
|
||||
AllReportData<RowIndex, 3> = S.WONo
|
||||
AllReportData<RowIndex, 4> = S.ProdOrdNo
|
||||
AllReportData<RowIndex, 5> = S.SubPartNo
|
||||
AllReportData<RowIndex, 6> = S.EpiPartNo
|
||||
AllReportData<RowIndex, 7> = S.WO_Qty
|
||||
AllReportData<RowIndex, 8> = S.WO_RX_Qty
|
||||
AllReportData<RowIndex, 9> = S.WO_UnRel_Qty
|
||||
AllReportData<RowIndex, 10> = S.KitLocation
|
||||
AllReportData<RowIndex, 11> = S.KitQty
|
||||
AllReportData<RowIndex, 12> = CassNeeded
|
||||
AllReportData<RowIndex, 13> = KitCassList ; // Skip field 14, it is populated by users
|
||||
AllReportData<RowIndex, 15> = PTICassList
|
||||
AllReportData<RowIndex, 16> = LoadedCassList ; // Skip field 17, it is populated by users
|
||||
AllReportData<RowIndex, 18> = S.StartDtm
|
||||
AllReportData<RowIndex, MATERIAL_REPORT.REACT_NO$> = S.ReactNo
|
||||
AllReportData<RowIndex, MATERIAL_REPORT.REACT_TYPE$> = S.React_Type
|
||||
AllReportData<RowIndex, MATERIAL_REPORT.WO_NO$> = S.WONo
|
||||
AllReportData<RowIndex, MATERIAL_REPORT.PROD_ORD_NO$> = S.ProdOrdNo
|
||||
AllReportData<RowIndex, MATERIAL_REPORT.SUB_PART_NO$> = S.SubPartNo
|
||||
AllReportData<RowIndex, MATERIAL_REPORT.EPI_PART_NO$> = S.EpiPartNo
|
||||
AllReportData<RowIndex, MATERIAL_REPORT.WO_QTY$> = S.WO_Qty
|
||||
AllReportData<RowIndex, MATERIAL_REPORT.WO_RX_QTY$> = S.WO_RX_Qty
|
||||
AllReportData<RowIndex, MATERIAL_REPORT.WO_UNREL_QTY$> = S.WO_UnRel_Qty
|
||||
AllReportData<RowIndex, MATERIAL_REPORT.KIT_LOCATION$> = S.KitLocation
|
||||
AllReportData<RowIndex, MATERIAL_REPORT.KIT_QTY$> = S.KitQty
|
||||
AllReportData<RowIndex, MATERIAL_REPORT.KIT_RO$> = KitCassList
|
||||
AllReportData<RowIndex, MATERIAL_REPORT.KIT_DEMAND$> = KitDemand
|
||||
AllReportData<RowIndex, MATERIAL_REPORT.PTI_RO$> = PTICassList
|
||||
AllReportData<RowIndex, MATERIAL_REPORT.LOAD_RO$> = LoadedCassList
|
||||
AllReportData<RowIndex, MATERIAL_REPORT.START_DTM$> = S.StartDtm
|
||||
|
||||
end
|
||||
end else
|
||||
@ -1762,7 +1794,6 @@ Service GenerateMaterialTrackRows()
|
||||
Rec = Database_Services('ReadDataRow', 'MATERIAL_REPORT', Key)
|
||||
If Error_Services('NoError') then
|
||||
// Preserve user input fields
|
||||
Row<MATERIAL_REPORT.KIT_DEMAND$> = Rec<MATERIAL_REPORT.KIT_DEMAND$>
|
||||
Row<MATERIAL_REPORT.COMMENTS$> = Rec<MATERIAL_REPORT.COMMENTS$>
|
||||
Database_Services('WriteDataRow', 'MATERIAL_REPORT', Key, Row)
|
||||
end
|
||||
@ -1814,13 +1845,11 @@ Service UpdateMaterialTrackData(MaterialTrackJSON)
|
||||
For ArrayIndex = 1 to ArrayCount
|
||||
objRow = SRP_JSON(objArray, 'Get', '[':ArrayIndex:']')
|
||||
KeyId = SRP_JSON(objRow, 'GetValue', 'KeyId')
|
||||
KitDemand = SRP_JSON(objRow, 'GetValue', 'KitDemand', '')
|
||||
Comments = SRP_JSON(objRow, 'GetValue', 'Comments', '')
|
||||
HaveLock = Database_Services('GetKeyIDLock', 'MATERIAL_REPORT', KeyId, True$)
|
||||
If HaveLock then
|
||||
MatRepRec = Database_Services('ReadDataRow', 'MATERIAL_REPORT', KeyId)
|
||||
If Error_Services('NoError') then
|
||||
MatRepRec<MATERIAL_REPORT.KIT_DEMAND$> = KitDemand
|
||||
MatRepRec<MATERIAL_REPORT.COMMENTS$> = Comments
|
||||
Database_Services('WriteDataRow', 'MATERIAL_REPORT', KeyId, MatRepRec, True$, False$, False$)
|
||||
end
|
||||
@ -1839,508 +1868,6 @@ Service UpdateMaterialTrackData(MaterialTrackJSON)
|
||||
end service
|
||||
|
||||
|
||||
Service PrintMaterialTrackReport(RptColumns, LocationFilter, NoMatFlag, OldReport=BOOLEAN)
|
||||
|
||||
If OldReport EQ '' then OldReport = False$
|
||||
Abort = False$
|
||||
// All Possible Report Columns
|
||||
AllRptColumns = ''
|
||||
AllRptColumns<1, 1> = 'React No'
|
||||
AllRptColumns<1, 2> = 'React Type'
|
||||
AllRptColumns<1, 3> = 'WO No'
|
||||
AllRptColumns<1, 4> = 'SAP Prod No'
|
||||
AllRptColumns<1, 5> = 'Sub Part No'
|
||||
AllRptColumns<1, 6> = 'Epi Part No'
|
||||
AllRptColumns<1, 7> = 'WO Qty'
|
||||
AllRptColumns<1, 8> = 'RX Qty'
|
||||
AllRptColumns<1, 9> = 'UnRel Qty'
|
||||
AllRptColumns<1, 10> = 'Kit Location'
|
||||
AllRptColumns<1, 11> = 'Kit Qty'
|
||||
AllRptColumns<1, 12> = '+/-'
|
||||
AllRptColumns<1, 13> = 'Kit RO'
|
||||
AllRptColumns<1, 14> = 'PTI RO'
|
||||
AllRptColumns<1, 15> = 'Load'
|
||||
AllRptColumns<1, 16> = 'Comments'
|
||||
|
||||
If Index(RptColumns, 'Comments', 1) then
|
||||
AllColFmt = ''
|
||||
AllColFmt<1, 1> = '+^720'
|
||||
AllColFmt<1, 2> = '+<720'
|
||||
AllColFmt<1, 3> = '+^1000'
|
||||
AllColFmt<1, 4> = '+^1100'
|
||||
AllColFmt<1, 5> = '+^1300'
|
||||
AllColFmt<1, 6> = '+^1200'
|
||||
AllColFmt<1, 7> = '+>720'
|
||||
AllColFmt<1, 8> = '+>720'
|
||||
AllColFmt<1, 9> = '+>720'
|
||||
AllColFmt<1, 10> = '+^1260'
|
||||
AllColFmt<1, 11> = '+^720'
|
||||
AllColFmt<1, 12> = '+^500'
|
||||
AllColFmt<1, 13> = '+^1300'
|
||||
AllColFmt<1, 14> = '+^1300'
|
||||
AllColFmt<1, 15> = '+^700'
|
||||
AllColFmt<1, 16> = '+^1300'
|
||||
end else
|
||||
AllColFmt = ''
|
||||
AllColFmt<1, 1> = '+^720'
|
||||
AllColFmt<1, 2> = '+<720'
|
||||
AllColFmt<1, 3> = '+^1000'
|
||||
AllColFmt<1, 4> = '+^1100'
|
||||
AllColFmt<1, 5> = '+^1300'
|
||||
AllColFmt<1, 6> = '+^1200'
|
||||
AllColFmt<1, 7> = '+>720'
|
||||
AllColFmt<1, 8> = '+>720'
|
||||
AllColFmt<1, 9> = '+>720'
|
||||
AllColFmt<1, 10> = '+^1260'
|
||||
AllColFmt<1, 11> = '+^720'
|
||||
AllColFmt<1, 12> = '+^500'
|
||||
AllColFmt<1, 13> = '+^1800'
|
||||
AllColFmt<1, 14> = '+^1800'
|
||||
AllColFmt<1, 15> = '+^1100'
|
||||
AllColFmt<1, 16> = ''
|
||||
end
|
||||
|
||||
ErrorTitle = 'Error in service ':Service
|
||||
ErrCode = ''
|
||||
ErrorMsg = ''
|
||||
|
||||
SchedDetTable = ''
|
||||
SchedDetDict = ''
|
||||
|
||||
OPEN 'SCHED_DET_NG' TO SchedDetTable then
|
||||
OPEN 'DICT.SCHED_DET_NG' TO SchedDetDict then
|
||||
Today = Datetime()
|
||||
|
||||
ReactList = ''
|
||||
WOList = ''
|
||||
SchedDetKeys = ''
|
||||
PrevReactNo = ''
|
||||
PrevWO = ''
|
||||
|
||||
If OldReport then
|
||||
SelectSent = 'SELECT SCHED_DET_NG WITH STOP_DTM GE ':Today:' BY REACT_NO BY START_DTM'
|
||||
end else
|
||||
SelectSent = 'SELECT SCHED_DET_NG WITH STOP_DTM GE "':OCONV(Today, 'DT'):'" BY REACT_NO BY START_DTM'
|
||||
end
|
||||
|
||||
RList(SelectSent,TARGET_ACTIVELIST$,'','','')
|
||||
IF Get_Status(errCode) THEN
|
||||
ErrMsg(errCode)
|
||||
RETURN
|
||||
END
|
||||
|
||||
Done = 0
|
||||
CurrSchedDetKey = ''
|
||||
LOOP
|
||||
PrevSchedDetKey = CurrSchedDetKey
|
||||
READNEXT CurrSchedDetKey ELSE Done = 1
|
||||
UNTIL Done
|
||||
READ SchedDetRec FROM SchedDetTable,CurrSchedDetKey THEN
|
||||
ReactNo = SchedDetRec<SCHED_DET_NG.REACT_NO$>
|
||||
WONo = SchedDetRec<SCHED_DET_NG.WO_NO$>
|
||||
If ReactNo NE '' then
|
||||
LOCATE ReactNo IN ReactList BY 'AR' USING @FM SETTING Pos ELSE
|
||||
ReactList = INSERT(ReactList,Pos,0,0,ReactNo)
|
||||
END
|
||||
END
|
||||
If WONo NE '' then
|
||||
LOCATE WONo IN WOList<Pos> USING @VM SETTING WPos ELSE
|
||||
WOList = INSERT(WOList,Pos,-1,0,WONo)
|
||||
SchedDetKeys = INSERT(SchedDetKeys,-1,0,0,CurrSchedDetKey)
|
||||
END
|
||||
END
|
||||
END
|
||||
|
||||
REPEAT
|
||||
|
||||
CALL Make.List(0,SchedDetKeys,SchedDetTable,SchedDetDict)
|
||||
|
||||
Header = "'D'":@VM:obj_Install('Get_Prop','CompTitle'):' Material Tracking by Reactor':@VM:"Page 'P'"
|
||||
MinDemand = 0
|
||||
Set_Status(0)
|
||||
|
||||
* Start of printing process
|
||||
FileName = 'Print Material Demand'
|
||||
Title = 'Printing Material Demand'
|
||||
|
||||
TopMargin = 1.0
|
||||
BottomMargin = 0.75
|
||||
LeftMargin = 0.25
|
||||
RightMargin = 0.25
|
||||
|
||||
Margins = LeftMargin:@FM:TopMargin:@FM:RightMargin:@FM:BottomMargin
|
||||
|
||||
PageSetup = '1' ;* LandScape
|
||||
PrintSetup = '2' ;* Preview Normal
|
||||
PrintSetup<1,2> = '0' ;* All buttons
|
||||
PrintSetup<1,5> = '1' ;* Page Range
|
||||
PrintSetup<1,6> = 7 ;* full mouse and keyboard support
|
||||
|
||||
PrintPath = ''
|
||||
stat = Set_Printer('INIT',FileName,Title,Margins,PageSetup,PrintSetup,PrintPath)
|
||||
|
||||
If Stat GE 0 THEN
|
||||
DateRange = 'Effective ':OCONV(Date(),'D4')
|
||||
|
||||
Header<-1> = "'T'"
|
||||
Header<-1> = '' ;* Blank line following heading
|
||||
|
||||
font = 'Arial'
|
||||
font<2> = '10'
|
||||
font<4> = '0' ;* Bold
|
||||
|
||||
stat = Set_Printer('FONTHEADFOOT',font)
|
||||
If Stat GE 0 then
|
||||
stat = Set_Printer('HEADER',Header)
|
||||
If Stat GE 0 then
|
||||
Footer = " 'D' 'T'":@VM:@VM:"Page: 'P'"
|
||||
stat = Set_Printer('FOOTER',Footer)
|
||||
If Stat GE 0 then
|
||||
RecCount = 0
|
||||
FirstPass = 1
|
||||
LastRecord = 0
|
||||
FirstLine = 1
|
||||
fontSpacing = 100
|
||||
|
||||
* Make Column Heading
|
||||
ColHead = ''
|
||||
ColFmt = ''
|
||||
|
||||
For each Column in RptColumns using @VM setting rcPos
|
||||
Locate Column in AllRptColumns using @VM setting dataPos then
|
||||
ColHead<0, -1> = Column
|
||||
ColFmt<0, -1> = AllColFmt<0, dataPos>
|
||||
end
|
||||
Next Column
|
||||
|
||||
* Zero Accumulators For Each Break
|
||||
|
||||
Prev.ReactNo = ''
|
||||
Last.ReactNo.Break = 1
|
||||
|
||||
CurrSchedDetRec = ''
|
||||
|
||||
Loop
|
||||
|
||||
* Zero Break Flags To False
|
||||
|
||||
ReactNo.Break = 0
|
||||
|
||||
READNEXT CurrSchedDetKey, Which.Value ELSE
|
||||
LastRecord = 1
|
||||
ReactNo.Break = 1
|
||||
ReactNo = Prev.ReactNo
|
||||
END
|
||||
|
||||
S.ATID = CurrSchedDetKey
|
||||
Abort = (FirstPass AND LastRecord)
|
||||
IF Not(Abort) THEN
|
||||
|
||||
IF Not(LastRecord) then
|
||||
READO CurrSchedDetRec FROM SchedDetTable,CurrSchedDetKey then
|
||||
|
||||
RecCount += 1
|
||||
|
||||
* Calculate Value(s) For Column(s)
|
||||
S.ATID = CurrSchedDetKey
|
||||
I.ATID = S.ATID
|
||||
S.ReactNo = CurrSchedDetRec<SCHED_DET_NG.REACT_NO$>
|
||||
I.ReactNo = S.ReactNo
|
||||
S.WoNo = CurrSchedDetRec<SCHED_DET_NG.WO_NO$>
|
||||
I.WoNo = S.WoNo
|
||||
S.SubPartNo = XLATE('WO_LOG', S.WoNo, 'ORD_SUB_PART_NO', 'X')
|
||||
I.SubPartNo = S.SubPartNo
|
||||
S.EpiPartNo = XLATE('WO_LOG', S.WoNo, WO_LOG_EPI_PART_NO$, 'X')
|
||||
I.EpiPartNo = S.EpiPartNo
|
||||
S.WO_Qty = Xlate('WO_LOG', S.WoNo, WO_LOG_WO_QTY$, 'X')
|
||||
I.WO_Qty = S.WO_Qty
|
||||
S.WO_RX_Qty = Xlate('WO_LOG', S.WoNo, 'RX_QTY', 'X')
|
||||
I.WO_RX_Qty = S.WO_RX_Qty
|
||||
S.WO_UnRel_QTY = Xlate('WO_LOG', S.WoNo, 'UNREL_QTY', 'X')
|
||||
I.WO_UnRel_QTY = S.WO_UnRel_QTY
|
||||
S.REACT_TYPE = Xlate('WO_LOG', S.WoNo, 'REACT_TYPE', 'X')
|
||||
S.ProdOrdNo = Xlate('WO_LOG', S.WoNo, 'PROD_ORD_NO', 'X')
|
||||
|
||||
If OldReport then
|
||||
|
||||
Locate 'SR*KTR]' in LocationFilter using @VM setting vPos then
|
||||
KitData = Location_Services('GetLocationCassInfo', S.WONo, 'SR*KTR]')
|
||||
SWAP CRLF$ WITH @VM IN KitData
|
||||
end else
|
||||
KitData = ''
|
||||
end
|
||||
|
||||
S.KitLocation = KitData<1>
|
||||
I.KitLocation = S.KitLocation
|
||||
|
||||
S.KitQty = OCONV(SUM(KitData<2>) * 25,'MD0,Z')
|
||||
I.KitQty = S.KitQty
|
||||
|
||||
S.KitCassCnt = COUNT(KitData<3>,',') + (KitData<3> NE '')
|
||||
I.KitCassCnt = S.KitCassCnt
|
||||
|
||||
KitCassList = KitData<3>
|
||||
|
||||
Locate '1K*PTI' in LocationFilter using @VM setting vPos then
|
||||
PTIData = Location_Services('GetLocationCassInfo', S.WONo, '1K*PTI')
|
||||
SWAP CRLF$ WITH @VM IN PTIData
|
||||
end else
|
||||
PTIData = ''
|
||||
end
|
||||
|
||||
end else
|
||||
|
||||
Locate 'SR*KTR]' in LocationFilter using @VM setting vPos then
|
||||
KitData = Database_Services('ReadDataRow', 'WO_LOC', S.WONo:'*':'SR*KTR]')
|
||||
end else
|
||||
KitData = ''
|
||||
end
|
||||
|
||||
Swap @VM with ',' in KitData
|
||||
|
||||
S.KitLocation = KitData<1>
|
||||
I.KitLocation = S.KitLocation
|
||||
|
||||
S.KitCassCnt = COUNT(KitData<3>,',') + (KitData<3> NE '')
|
||||
I.KitCassCnt = S.KitCassCnt
|
||||
|
||||
KitCassList = KitData<3>
|
||||
S.KitQty = 0
|
||||
For each CassNo in KitCassList using ','
|
||||
S.KitQty += Xlate('WO_MAT', S.WONo:'*':CassNo, 'WAFER_QTY', 'X')
|
||||
Next CassNo
|
||||
I.KitQty = S.KitQty
|
||||
|
||||
Locate '1K*PTI' in LocationFilter using @VM setting vPos then
|
||||
PTIData = Database_Services('ReadDataRow', 'WO_LOC', S.WONo:'*':'1K*PTI')
|
||||
end else
|
||||
PTIData = ''
|
||||
end
|
||||
PTICassList = PTIData<3>
|
||||
|
||||
Swap @VM with ',' in PTIData
|
||||
|
||||
end
|
||||
|
||||
PTICassList = PTIData<3>
|
||||
|
||||
CRLocs = ''
|
||||
CRLocs<0, -1> = 'CR*BE'
|
||||
CRLocs<0, -1> = 'CR*BO'
|
||||
CRLocs<0, -1> = 'CR*TUN'
|
||||
CRLocs<0, -1> = 'CR*EPR'
|
||||
CRLocs<0, -1> = 'CR*FE'
|
||||
CRLocs<0, -1> = 'CR*FEH'
|
||||
CRLocs<0, -1> = 'CR*FO'
|
||||
CRLocs<0, -1> = 'CR*FOH'
|
||||
|
||||
LoadedData = ''
|
||||
LocQueryList = ''
|
||||
For each Loc in CRLocs using @VM setting crPos
|
||||
Locate Loc in LocationFilter using @VM setting vPos then
|
||||
LocQueryList<0, -1> = Loc
|
||||
end
|
||||
Next Loc
|
||||
LoadedCassList = ''
|
||||
ReactType = Xlate('WO_LOG', S.WONo, 'REACT_TYPE', 'X')
|
||||
If ReactType NE 'EPP' then
|
||||
If LocQueryList NE '' then
|
||||
If OldReport then
|
||||
LoadedData = Location_Services('GetLocationCassInfo', S.WONo, LocQueryList)
|
||||
Swap CRLF$ with @VM in LoadedData
|
||||
CassList = LoadedData<3>
|
||||
Swap @VM with ',' in CassList
|
||||
For each CassNo in CassList using ','
|
||||
If ( (S.WONo NE '') and (CassNo NE '') ) then
|
||||
WOMatKey = S.WONo:'*':CassNo
|
||||
UnloadSigComp = Signature_Services('CheckSignature', WOMatKey, 'UNLOAD')
|
||||
OnHold = Xlate('WO_MAT', WOMatKey, 'HOLD', 'X')
|
||||
CurrStatus = Xlate('WO_MAT', WOMatKey, 'CURR_STATUS', 'X')
|
||||
If Not(UnloadSigComp or OnHold or (CurrStatus EQ 'REJ') ) then
|
||||
LoadedCassList<0, -1> = CassNo
|
||||
end
|
||||
end
|
||||
Next CassNo
|
||||
end else
|
||||
For each CRLoc in LocQueryList using @VM
|
||||
CRLocInfo = Database_Services('ReadDataRow', 'WO_LOC', S.WONo:'*':CRLoc)
|
||||
CRLocCassList = CRLocInfo<3>
|
||||
LoadedCassList = SRP_Array('Join', LoadedCassList, CRLocCassList, 'OR', @VM)
|
||||
Next CRLoc
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
If Not(OldReport) then LoadedCassList = SRP_Array('Clean', LoadedCassList, 'TrimAndMakeUnique', @VM)
|
||||
* TEST FOR CONTROL BREAK(S)
|
||||
|
||||
IF (S.ReactNo NE Prev.ReactNo) OR ReactNo.Break THEN
|
||||
ReactNo = Prev.ReactNo
|
||||
Prev.ReactNo = S.ReactNo
|
||||
ReactNo.Break += 1
|
||||
END
|
||||
|
||||
IF ReactNo.Break THEN stat = Set_Printer('TEXT')
|
||||
|
||||
IF FirstPass THEN FirstPass = False$
|
||||
|
||||
* Do Conversion If Any
|
||||
|
||||
IF S.REACTNO NE "" THEN S.REACTNO = OCONV(S.REACTNO,"MD0,")
|
||||
IF S.WONO NE "" THEN S.WONO = OCONV(S.WONO,"MD0")
|
||||
IF S.WO_QTY NE "" THEN S.WO_QTY = OCONV(S.WO_QTY,"MD0,")
|
||||
IF S.WO_RX_QTY NE "" THEN S.WO_RX_QTY = OCONV(S.WO_RX_QTY,"MD0,")
|
||||
IF S.WO_UNREL_QTY NE "" THEN S.WO_UNREL_QTY = OCONV(S.WO_UNREL_QTY,"MD0,")
|
||||
|
||||
* PRINT DETAIL LINE
|
||||
|
||||
COLDATA = ''
|
||||
RowNumber = 0
|
||||
|
||||
/* ascending sort */
|
||||
Convert @VM to ',' in KitCassList
|
||||
Convert @VM to ',' in PTICassList
|
||||
Convert @VM to ',' in LoadedCassList
|
||||
KitCassList = SRP_Array('SortSimpleList', KitCassList, 'AscendingNumbers', ',')
|
||||
PTICassList = SRP_Array('SortSimpleList', PTICassList, 'AscendingNumbers', ',')
|
||||
LoadedCassList = SRP_Array('SortSimpleList', LoadedCassList, 'AscendingNumbers', ',')
|
||||
|
||||
Convert ',' to @VM in KitCassList
|
||||
Convert ',' to @VM in PTICassList
|
||||
Convert ',' to @VM in LoadedCassList
|
||||
|
||||
NumKitCass = DCount(KitCassList, @VM)
|
||||
If NumKitCass GT 4 then
|
||||
For CassIndex = 4 to NumKitCass Step 4
|
||||
CassNo = KitCassList<0, CassIndex>
|
||||
CassNo := CRLF$
|
||||
KitCassList<0, CassIndex> = CassNo
|
||||
Next CassIndex
|
||||
end
|
||||
NumPTICass = DCount(PTICassList, @VM)
|
||||
If NumPTICass GT 4 then
|
||||
For CassIndex = 4 to NumPTICass Step 4
|
||||
CassNo = PTICassList<0, CassIndex>
|
||||
CassNo := CRLF$
|
||||
PTICassList<0, CassIndex> = CassNo
|
||||
Next CassIndex
|
||||
end
|
||||
NumLoadedCass = DCount(LoadedCassList, @VM)
|
||||
If NumLoadedCass GT 2 then
|
||||
For CassIndex = 2 to NumLoadedCass Step 2
|
||||
CassNo = LoadedCassList<0, CassIndex>
|
||||
CassNo := CRLF$
|
||||
LoadedCassList<0, CassIndex> = CassNo
|
||||
Next CassIndex
|
||||
end
|
||||
Convert @VM to ',' in KitCassList
|
||||
Convert @VM to ',' in PTICassList
|
||||
Convert @VM to ',' in LoadedCassList
|
||||
|
||||
CassNeeded = ''
|
||||
EpiPartNo = Xlate('WO_LOG', S.WONo, 'EPI_PART_NO', 'X')
|
||||
If EpiPartNo NE '' then
|
||||
WPDAdjusted = Epi_Part_Services('GetAdjustedWafersPerDayScheduler', EpiPartNo, S.React_Type)
|
||||
If WPDAdjusted NE '' then
|
||||
CPDAdjusted = SRP_Math('CEILING', (WPDAdjusted/25) )
|
||||
CassInCR = DCount(KitCassList, ',') + DCount(PTICassList, ',') + DCount(LoadedCassList, ',')
|
||||
CassNeeded = CassInCR - CPDAdjusted
|
||||
end
|
||||
end
|
||||
|
||||
Swap '.1' with '' in S.ProdOrdNo
|
||||
AllReportData = ''
|
||||
AllReportData<1> = S.ReactNo
|
||||
AllReportData<2> = S.React_Type
|
||||
AllReportData<3> = S.WONo
|
||||
AllReportData<4> = S.ProdOrdNo
|
||||
AllReportData<5> = S.SubPartNo
|
||||
AllReportData<6> = S.EpiPartNo
|
||||
AllReportData<7> = S.WO_Qty
|
||||
AllReportData<8> = S.WO_RX_Qty
|
||||
AllReportData<9> = S.WO_UnRel_Qty
|
||||
AllReportData<10> = S.KitLocation
|
||||
AllReportData<11> = S.KitQty
|
||||
AllReportData<12> = CassNeeded
|
||||
AllReportData<13> = KitCassList
|
||||
AllReportData<14> = PTICassList
|
||||
AllReportData<15> = LoadedCassList
|
||||
AllReportData<16> = ''
|
||||
|
||||
If ( (KitCassList NE '') or (PTICassList NE '') or (LoadedCassList NE '') or (NoMatFlag EQ True$) ) then
|
||||
RowNumber += 1
|
||||
For each RptColumn in RptColumns using @VM setting rcPos
|
||||
Locate RptColumn in AllRptColumns using @VM setting dataPos then
|
||||
COLDATA<RowNumber,rcPos> = AllReportData<dataPos>
|
||||
end
|
||||
Next RptColumn
|
||||
If COLDATA NE '' then
|
||||
// Print the data
|
||||
PageHeight = Get_Printer('PAGESIZE')<2>
|
||||
PrintableHeight = PageHeight - TopMargin - BottomMargin
|
||||
PrinterHeight = Get_Printer('POS')<2>
|
||||
stat = Set_Printer('CALCTABLE',ColFmt:@FM:ColData)
|
||||
TableSize = Get_Printer('CALCTABLE')
|
||||
TableHeight = TableSize<2>
|
||||
fontSpacing = 120
|
||||
|
||||
IF ( TableHeight + PrinterHeight >= PrintableHeight ) OR FirstLine THEN
|
||||
IF NOT(FirstLine) THEN
|
||||
stat = Set_Printer('PAGEBREAK')
|
||||
END
|
||||
FirstLine = 0
|
||||
font<2> = 10
|
||||
font<4> = 1 ;* Bold
|
||||
stat = Set_Printer('FONT',font,'100')
|
||||
stat = Set_Printer('ADDTABLE',colFmt,colHead,'',LTGREY$,'',0,TB_ALL)
|
||||
font<4> = 0
|
||||
stat = Set_Printer('FONT',font,fontSpacing)
|
||||
stat = Set_Printer('ADDTABLE',colFmt,'',colData,LTGREY$,'',0,7)
|
||||
END ELSE
|
||||
font<2> = 10
|
||||
font<4> = 0
|
||||
stat = Set_Printer('FONT',font,fontSpacing)
|
||||
stat = Set_Printer('ADDTABLE',colFmt,'',colData,LTGREY$,'',1,TB_ALL)
|
||||
END
|
||||
end
|
||||
END
|
||||
end
|
||||
end else
|
||||
// Last record -> Finish printing
|
||||
colData = ''
|
||||
stat = Set_Printer('TERM',1)
|
||||
end
|
||||
END else
|
||||
// No records selected -> Bail
|
||||
stat = Set_Printer('TERM',1)
|
||||
end
|
||||
Until (LastRecord or Abort)
|
||||
Repeat
|
||||
end else
|
||||
GoSub OipiPrintError
|
||||
end
|
||||
end else
|
||||
GoSub OipiPrintError
|
||||
end
|
||||
end else
|
||||
GoSub OipiPrintError
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Stat = ' : Stat : ', PrintPath = ' : PrintPath
|
||||
GoSub OipiPrintError
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Unable to open "SCHED_DET_NG" table.'
|
||||
ErrMsg(ErrorTitle:@SVM:ErrorMsg)
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Unable to open "SCHED_DET_NG" table.'
|
||||
ErrMsg(ErrorTitle:@SVM:ErrorMsg)
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service GetOpenNCRReportJson()
|
||||
|
||||
ErrorMessage = ''
|
||||
|
@ -93,7 +93,7 @@ Service CreateReturnToFabRecord(CassId, UserId)
|
||||
end
|
||||
If NGLotId NE '' then
|
||||
//Assign default return to fab operations and move in.
|
||||
Return_To_Fab_Services('AddDefaultRTFOperations', NGLotId, UserId)
|
||||
Return_To_Fab_Services('AddDefaultRTFOperations', NGLotId)
|
||||
If Error_Services('NoError') then
|
||||
//Move in the lot
|
||||
Lot_Services('MoveInLot', NGLotId, UserId)
|
||||
@ -165,48 +165,51 @@ Service CreateReturnToFabRecord(CassId, UserId)
|
||||
|
||||
End Service
|
||||
|
||||
Service AddDefaultRTFOperations(LotId, UserId)
|
||||
Service AddDefaultRTFOperations(LotId)
|
||||
|
||||
ErrorMessage = ''
|
||||
// Todo: add these to a configuration for return to fab.
|
||||
CurrentOperationsSeq = Lot_Services('GetLotOperationSequence', LotId)
|
||||
if CurrentOperationsSeq EQ '' then
|
||||
CurrSeq = 0
|
||||
If LotId NE '' then
|
||||
// Todo: add these to a configuration for return to fab.
|
||||
CurrentOperationsSeq = Lot_Services('GetLotOperationSequence', LotId)
|
||||
if CurrentOperationsSeq EQ '' then
|
||||
CurrSeq = 0
|
||||
end else
|
||||
CurrSeq = DCount(CurrentOperationsSeq, @FM)
|
||||
end
|
||||
Lot_Operation_Services('AddOperationToLot', LotId, 'RTF_START', CurrSeq + 1, 'SYSTEM')
|
||||
If Error_Services('NoError') then
|
||||
Lot_Operation_Services('AddOperationToLot', LotId, 'RTF_ASSIGN_REASON', CurrSeq + 2, 'SYSTEM')
|
||||
end else
|
||||
ErrorMessage = Error_Services('GetMessage')
|
||||
end
|
||||
If Error_Services('NoError') then
|
||||
Lot_Operation_Services('AddOperationToLot', LotId, 'RTF_ASSIGN_OPERATIONS', CurrSeq + 3, 'SYSTEM')
|
||||
end else
|
||||
ErrorMessage = Error_Services('GetMessage')
|
||||
end
|
||||
If Error_Services('NoError') then
|
||||
Lot_Operation_Services('AddOperationToLot', LotId, 'RTF_INIT_BIN_TO_BIN', CurrSeq + 4, 'SYSTEM')
|
||||
end else
|
||||
ErrorMessage = Error_Services('GetMessage')
|
||||
end
|
||||
If Error_Services('NoError') then
|
||||
Lot_Operation_Services('AddOperationToLot', LotId, 'RTF_DISPO', CurrSeq + 5, 'SYSTEM')
|
||||
end else
|
||||
ErrorMessage = Error_Services('GetMessage')
|
||||
end
|
||||
If Error_Services('NoError') then
|
||||
Lot_Operation_Services('AddOperationToLot', LotId, 'RTF_FINAL_BIN_TO_BIN', CurrSeq + 6, 'SYSTEM')
|
||||
end else
|
||||
ErrorMessage = Error_Services('GetMessage')
|
||||
end
|
||||
If Error_Services('NoError') then
|
||||
Lot_Operation_Services('AddOperationToLot', LotId, 'RTF_CLOSE', CurrSeq + 7, 'SYSTEM')
|
||||
end else
|
||||
ErrorMessage = Error_Services('GetMessage')
|
||||
end
|
||||
end else
|
||||
CurrSeq = DCount(CurrentOperationsSeq, @FM)
|
||||
ErrorMessage = 'LotID Parameter was null.'
|
||||
end
|
||||
Lot_Operation_Services('AddOperationToLot', LotId, 'RTF_START', CurrSeq + 1, UserId)
|
||||
If Error_Services('NoError') then
|
||||
Lot_Operation_Services('AddOperationToLot', LotId, 'RTF_ASSIGN_REASON', CurrSeq + 2, UserId)
|
||||
end else
|
||||
ErrorMessage = Error_Services('GetMessage')
|
||||
end
|
||||
If Error_Services('NoError') then
|
||||
Lot_Operation_Services('AddOperationToLot', LotId, 'RTF_ASSIGN_OPERATIONS', CurrSeq + 3, UserId)
|
||||
end else
|
||||
ErrorMessage = Error_Services('GetMessage')
|
||||
end
|
||||
If Error_Services('NoError') then
|
||||
Lot_Operation_Services('AddOperationToLot', LotId, 'RTF_INIT_BIN_TO_BIN', CurrSeq + 4, UserId)
|
||||
end else
|
||||
ErrorMessage = Error_Services('GetMessage')
|
||||
end
|
||||
If Error_Services('NoError') then
|
||||
Lot_Operation_Services('AddOperationToLot', LotId, 'RTF_DISPO', CurrSeq + 5, UserId)
|
||||
end else
|
||||
ErrorMessage = Error_Services('GetMessage')
|
||||
end
|
||||
If Error_Services('NoError') then
|
||||
Lot_Operation_Services('AddOperationToLot', LotId, 'RTF_FINAL_BIN_TO_BIN', CurrSeq + 6, UserId)
|
||||
end else
|
||||
ErrorMessage = Error_Services('GetMessage')
|
||||
end
|
||||
If Error_Services('NoError') then
|
||||
Lot_Operation_Services('AddOperationToLot', LotId, 'RTF_CLOSE', CurrSeq + 7, UserId)
|
||||
end else
|
||||
ErrorMessage = Error_Services('GetMessage')
|
||||
end
|
||||
|
||||
If ErrorMessage NE '' then
|
||||
Error_Services('Add', ErrorMessage)
|
||||
end
|
||||
@ -1268,7 +1271,7 @@ Service MigrateLegacyRTFRecord(RTFRecordId)
|
||||
LotId = Lot_Services('CreateNewLot', CassType, '', '', '', '', '', 'SYSTEM', '', CassId)
|
||||
end
|
||||
If LotId NE '' then
|
||||
Return_To_Fab_Services('AddDefaultRTFOperations', LotId, 'SYSTEM')
|
||||
Return_To_Fab_Services('AddDefaultRTFOperations', LotId)
|
||||
If Error_Services('NoError') then
|
||||
//Now get all the created lot Operation records
|
||||
LotOperationIds = Lot_Services('GetLotOperationSequence', LotId)
|
||||
@ -1321,3 +1324,4 @@ Service MigrateLegacyRTFRecord(RTFRecordId)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
|
@ -990,7 +990,7 @@ Service ProcessScanData(ScanID, ScanJSON)
|
||||
ScannedSuppLot = ScansRow<SCANS.SUPPLIER_LOT$>
|
||||
RDSSuppLot = RDSRec<RDS_LOT_NUM$>
|
||||
If (ScannedSuppLot NE '') then
|
||||
If (ScannedSuppLot _EQC RDSSuppLot) then
|
||||
If (ScannedSuppLot _EQSC RDSSuppLot) then
|
||||
IsTWLoggingReqd = RDS_Services('IsTWLoggingReqd', RDSNo)
|
||||
If IsTWLoggingReqd NE True$ OR TestWaferLotData NE '' then
|
||||
WaferCountAckReq = Xlate('RDS', RDSNo, 'WAFER_COUNT_ACK_REQ', 'X')
|
||||
@ -999,32 +999,38 @@ Service ProcessScanData(ScanID, ScanJSON)
|
||||
LoadStageReady = ''
|
||||
PreStageReady = QA_Services('PreEpiSignatureReady', RDSNo, Username, WaferQty, Reactor)
|
||||
If PreStageReady EQ True$ then
|
||||
LoadStageReady = QA_Services('LoadSignatureReady', RDSNo, Username, WaferQty, LLSide, True$, Reactor)
|
||||
If (LoadStageReady NE True$) then
|
||||
// Why is it not ready?
|
||||
ErrMsg = Error_Services('GetMessage')
|
||||
Begin Case
|
||||
Case IndexC(ErrMsg, 'supplement', 1)
|
||||
// Clear the error to return a JSON payload and handle the acknowledgements.
|
||||
Error_Services('Clear')
|
||||
Scan_Services('AddNotAcceptableReason', ErrMsg)
|
||||
Case IndexC(ErrMsg, 'ROTR', 1)
|
||||
ROTRBlock = Database_Services('ReadDataColumn', 'REACTOR', Reactor, REACTOR_ROTR_STATUS$, True$, 0, False$)
|
||||
ROTRBlockReason = Database_Services('ReadDataColumn', 'REACTOR', Reactor, REACTOR_ROTR_STATUS_REASON$, True$, 0, False$)
|
||||
ROTREnabled = Database_Services('ReadDataColumn', 'REACTOR', Reactor, REACTOR_ENABLE_ROTR$, True$, 0, False$)
|
||||
If ( (ROTRBlock NE 'P') AND (ROTREnabled EQ True$) ) then
|
||||
// Clear the error to return a JSON payload and allow for OVERRIDE scan.
|
||||
ScansRow<SCANS.OVERRIDE_REQD$> = True$
|
||||
ScansRow<SCANS.OVERRIDE_REASON$> = ROTRBlockReason
|
||||
ScansRow<SCANS.OVERRIDE_TYPE$> = 'ROTR'
|
||||
RDSLayerAckReq = Xlate('RDS', RDSNo, 'RDS_LAYER_ACK_REQ', 'X')
|
||||
If RDSLayerAckReq EQ False$ then
|
||||
LoadStageReady = QA_Services('LoadSignatureReady', RDSNo, Username, WaferQty, LLSide, True$, Reactor)
|
||||
If (LoadStageReady NE True$) then
|
||||
// Why is it not ready?
|
||||
ErrMsg = Error_Services('GetMessage')
|
||||
Begin Case
|
||||
Case IndexC(ErrMsg, 'supplement', 1)
|
||||
// Clear the error to return a JSON payload and handle the acknowledgements.
|
||||
Error_Services('Clear')
|
||||
Scan_Services('AddNotAcceptableReason', "ROTR Load Block Enabled")
|
||||
end else
|
||||
ScansRow<SCANS.OVERRIDE_REQD$> = False$
|
||||
ScansRow<SCANS.OVERRIDE_REASON$> = ''
|
||||
ScansRow<SCANS.OVERRIDE_TYPE$> = ''
|
||||
end
|
||||
End Case
|
||||
Scan_Services('AddNotAcceptableReason', ErrMsg)
|
||||
Case IndexC(ErrMsg, 'ROTR', 1)
|
||||
ROTRBlock = Database_Services('ReadDataColumn', 'REACTOR', Reactor, REACTOR_ROTR_STATUS$, True$, 0, False$)
|
||||
ROTRBlockReason = Database_Services('ReadDataColumn', 'REACTOR', Reactor, REACTOR_ROTR_STATUS_REASON$, True$, 0, False$)
|
||||
ROTREnabled = Database_Services('ReadDataColumn', 'REACTOR', Reactor, REACTOR_ENABLE_ROTR$, True$, 0, False$)
|
||||
If ( (ROTRBlock NE 'P') AND (ROTREnabled EQ True$) ) then
|
||||
// Clear the error to return a JSON payload and allow for OVERRIDE scan.
|
||||
ScansRow<SCANS.OVERRIDE_REQD$> = True$
|
||||
ScansRow<SCANS.OVERRIDE_REASON$> = ROTRBlockReason
|
||||
ScansRow<SCANS.OVERRIDE_TYPE$> = 'ROTR'
|
||||
Error_Services('Clear')
|
||||
ErrMsg = ''
|
||||
Scan_Services('AddNotAcceptableReason', "ROTR Load Block Enabled")
|
||||
end else
|
||||
ScansRow<SCANS.OVERRIDE_REQD$> = False$
|
||||
ScansRow<SCANS.OVERRIDE_REASON$> = ''
|
||||
ScansRow<SCANS.OVERRIDE_TYPE$> = ''
|
||||
end
|
||||
End Case
|
||||
end
|
||||
end else
|
||||
Scan_Services('AddNotAcceptableReason', 'RDS layer parameters must be reviewed for accuracy and acknowledged before the load operation can be signed.')
|
||||
end
|
||||
end else
|
||||
// Why is it not ready?
|
||||
@ -1062,7 +1068,7 @@ Service ProcessScanData(ScanID, ScanJSON)
|
||||
ScannedSuppLot = ScansRow<SCANS.SUPPLIER_LOT$>
|
||||
RDSSuppLot = RDSRec<RDS_LOT_NUM$>
|
||||
If (ScannedSuppLot NE '') then
|
||||
If (ScannedSuppLot _EQC RDSSuppLot) then
|
||||
If (ScannedSuppLot _EQSC RDSSuppLot) then
|
||||
IsTWLoggingReqd = RDS_Services('IsTWLoggingReqd', RDSNo)
|
||||
If IsTWLoggingReqd NE True$ OR TestWaferLotData NE '' then
|
||||
// Scheduled tool verification (only supports reactors at the moment)
|
||||
@ -1096,6 +1102,7 @@ Service ProcessScanData(ScanID, ScanJSON)
|
||||
ScansRow<SCANS.OVERRIDE_REASON$> = ROTRBlockReason
|
||||
ScansRow<SCANS.OVERRIDE_TYPE$> = 'ROTR'
|
||||
Error_Services('Clear')
|
||||
ErrMsg = ''
|
||||
Scan_Services('AddNotAcceptableReason', "ROTR Load Block Enabled")
|
||||
end else
|
||||
ScansRow<SCANS.OVERRIDE_REQD$> = False$
|
||||
@ -1111,8 +1118,7 @@ Service ProcessScanData(ScanID, ScanJSON)
|
||||
Scan_Services('AddNotAcceptableReason', 'The LWI stage engineering instructions must be acknowledged before the load operation can be signed.')
|
||||
end
|
||||
end else
|
||||
ErrMsg = 'RDS layer parameters must be reviewed for accuracy and acknowledged before the load operation can be signed.'
|
||||
Scan_Services('AddNotAcceptableReason', ErrMsg)
|
||||
Scan_Services('AddNotAcceptableReason', 'RDS layer parameters must be reviewed for accuracy and acknowledged before the load operation can be signed.')
|
||||
end
|
||||
end else
|
||||
ErrMsg = 'Scanned tool ':ScanTool:' does not match the scheduled tool ':SchedTool:'. (':RDSNo:')'
|
||||
@ -2097,7 +2103,7 @@ Service ConvertMVScanToJSON(ScanID, mvScan, itemURL)
|
||||
SRP_JSON(objRDS, 'SetValue', 'waferCountInst' , WaferCountInst , 'String')
|
||||
SRP_JSON(objRDS, 'SetValue', 'rdsLayerInstAckReq' , RDSLayerInstAckReq , 'Boolean')
|
||||
SRP_JSON(objRDS, 'SetValue', 'rdsLayerInstAck' , RDSRec<RDS_RDS_LAYER_ACK$> , 'Boolean')
|
||||
|
||||
|
||||
OverrideRequired = @Record<SCANS.OVERRIDE_REQD$>
|
||||
OverrideType = @Record<SCANS.OVERRIDE_TYPE$>
|
||||
OverrideReason = @Record<SCANS.OVERRIDE_REASON$>
|
||||
@ -2419,7 +2425,3 @@ ClearCursors:
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -30,22 +30,23 @@ Function Schedule_Services(@Service, @Params)
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert SERVICE_SETUP
|
||||
$insert RLIST_EQUATES
|
||||
$insert REACTOR_EQUATES
|
||||
$insert SCHED_DET_NG_EQUATES
|
||||
$insert WO_LOG_EQUATES
|
||||
$Insert APP_INSERTS
|
||||
$Insert SERVICE_SETUP
|
||||
$Insert RLIST_EQUATES
|
||||
$Insert REACTOR_EQUATES
|
||||
$Insert SCHED_DET_NG_EQUATES
|
||||
$Insert WO_LOG_EQUATES
|
||||
$Insert WO_MAT_EQUATES
|
||||
$insert WO_SCHEDULE_NG_EQUATES
|
||||
$insert COMPANY_EQUATES
|
||||
$insert PROD_VER_EQUATES
|
||||
$insert PRS_LAYER_EQU
|
||||
$insert SCHEDULE_EVENT_SUMMMARY_EQUATES
|
||||
$insert EPI_PART_EQUATES
|
||||
$insert PROD_SPEC_EQUATES
|
||||
$insert SCHED_HIST_EQUATES
|
||||
$Insert WO_SCHEDULE_NG_EQUATES
|
||||
$Insert COMPANY_EQUATES
|
||||
$Insert PROD_VER_EQUATES
|
||||
$Insert PRS_LAYER_EQU
|
||||
$Insert SCHEDULE_EVENT_SUMMMARY_EQUATES
|
||||
$Insert EPI_PART_EQUATES
|
||||
$Insert PROD_SPEC_EQUATES
|
||||
$Insert SCHED_HIST_EQUATES
|
||||
$Insert RDS_EQUATES
|
||||
$Insert WM_IN_EQUATES
|
||||
|
||||
Equ new_exist$ To 0 ; * Reduce Mode 0
|
||||
Equ next_cur$ To 1
|
||||
@ -59,7 +60,7 @@ Declare subroutine Mona_Services
|
||||
Declare function SRP_Array, Schedule_Services, Memory_Services, Database_Services, SRP_Sort_Array, Datetime
|
||||
Declare function Epi_Part_Services, SRP_Math, SRP_Hash, obj_Prod_Spec, Logging_Services, Environment_Services
|
||||
Declare function Work_Order_Services, RTI_CreateGUID, Reactor_Services, Schedule_Services, NextKey, SRP_Datetime
|
||||
Declare function SRP_Time, Lsl_Users_Services, GetTickCount
|
||||
Declare function SRP_Time, Lsl_Users_Services, GetTickCount, obj_WO_Mat
|
||||
|
||||
Date = Oconv(Date(), 'D4/')
|
||||
LogFileName = Date[7, 4] : '-' : Date[1, 2] : '-' : Date[4, 2] : ' Scheduler Log.csv'
|
||||
@ -1245,14 +1246,57 @@ Service AdjustScheduleEvents(ReactNo)
|
||||
LogData<3> = 'Event quantity: ':EventRec<SCHED_DET_NG.EVENT_TOTAL_WFRS$>
|
||||
Schedule_Services('LogActivity', ReactNo, LogData)
|
||||
LogData<3> = 'Event complete: ':OConv(EventRec<SCHED_DET_NG.EVENT_COMP$>, "Btrue,false")
|
||||
Schedule_Services('LogActivity', ReactNo, LogData)
|
||||
LogData<3> = 'Event unprocessed cassettes: ':EventRec<SCHED_DET_NG.UNPROCESSED_CASS$>
|
||||
Schedule_Services('LogActivity', ReactNo, LogData)
|
||||
LogData<3> = 'Event processed cassettes: ':EventRec<SCHED_DET_NG.PROCESSED_CASS$>
|
||||
Schedule_Services('LogActivity', ReactNo, LogData)
|
||||
|
||||
EventAdjustment = Schedule_Services('GetEventAdjustment', EventKey)
|
||||
UnprocessedCass = EventRec<SCHED_DET_NG.UNPROCESSED_CASS$>
|
||||
ProcessedCass = EventRec<SCHED_DET_NG.PROCESSED_CASS$>
|
||||
AllCassList = SRP_Array('Join', UnprocessedCass, ProcessedCass, 'OR', @VM)
|
||||
AllCassList = SRP_Array('SortSimpleList', AllCassList, 'AscendingNumbers', @VM)
|
||||
EventComp = (UnprocessedCass EQ '')
|
||||
|
||||
// Check each cassette to see if it was voided
|
||||
VoidedQty = 0
|
||||
WONo = EventRec<SCHED_DET_NG.WO_NO$>
|
||||
EventWfrs = EventRec<SCHED_DET_NG.EVENT_TOTAL_WFRS$>
|
||||
VoidedCassList = ''
|
||||
VoidedWfrQty = 0
|
||||
For each CassNo in AllCassList using @VM
|
||||
If Epipro then
|
||||
WmInKey = WoNo:'*1*':CassNo
|
||||
Voided = Xlate('WM_IN', WmInKey, 'VOID', 'X')
|
||||
CassQty = Xlate('WM_IN', WmInKey, 'WFR_CNT', 'X')
|
||||
end else
|
||||
WOMatKey = WoNo:'*':CassNo
|
||||
Voided = Xlate('WO_MAT', WOMatKey, 'VOID', 'X')
|
||||
CassQty = Xlate('WO_MAT', WOMatKey, 'WAFER_QTY', 'X')
|
||||
end
|
||||
If Voided then
|
||||
VoidedCassList<0, -1> = CassNo
|
||||
VoidedWfrQty += CassQty
|
||||
end
|
||||
Next CassNo
|
||||
UnprocessedCass = SRP_Array('Join', UnprocessedCass, VoidedCassList, 'NOT', @VM)
|
||||
ProcessedCass = SRP_Array('Join', ProcessedCass, VoidedCassList, 'NOT', @VM)
|
||||
AllCassList = SRP_Array('Join', AllCassList, VoidedCassList, 'NOT', @VM)
|
||||
EventWfrs -= VoidedWfrQty
|
||||
EventRec<SCHED_DET_NG.UNPROCESSED_CASS$> = UnprocessedCass
|
||||
EventRec<SCHED_DET_NG.PROCESSED_CASS$> = ProcessedCass
|
||||
EventRec<SCHED_DET_NG.EVENT_TOTAL_WFRS$> = EventWfrs
|
||||
Database_Services('WriteDataRow', 'SCHED_DET_NG', EventKey, EventRec, True$, False$, True$)
|
||||
|
||||
// Check each cassette in the event to see if it is now processed or unprocessed (i.e., unload un-signed)
|
||||
Schedule_Services('UpdateEventCassLists', EventKey)
|
||||
|
||||
EventRec = Schedule_Services('GetScheduleDetail', EventKey)
|
||||
UnprocessedCass = EventRec<SCHED_DET_NG.UNPROCESSED_CASS$>
|
||||
ProcessedCass = EventRec<SCHED_DET_NG.PROCESSED_CASS$>
|
||||
AllCassList = SRP_Array('Join', UnprocessedCass, ProcessedCass, 'OR', @VM)
|
||||
AllCassList = SRP_Array('SortSimpleList', AllCassList, 'AscendingNumbers', @VM)
|
||||
EventAdjustment = Schedule_Services('GetEventAdjustment', EventKey)
|
||||
EventComp = (UnprocessedCass EQ '')
|
||||
|
||||
If Not(EventRec<SCHED_DET_NG.EVENT_COMP$>) and EventComp then
|
||||
LogData = ''
|
||||
@ -1263,9 +1307,7 @@ Service AdjustScheduleEvents(ReactNo)
|
||||
end
|
||||
|
||||
EventRec<SCHED_DET_NG.EVENT_COMP$> = EventComp
|
||||
WONo = EventRec<SCHED_DET_NG.WO_NO$>
|
||||
ReactNo = EventRec<SCHED_DET_NG.REACT_NO$>
|
||||
EventWfrs = EventRec<SCHED_DET_NG.EVENT_TOTAL_WFRS$>
|
||||
WOQty = Xlate('WO_LOG', WONo, 'QTY', 'X')
|
||||
// If work order event is engaged then set start DTM to first cassette DTM in.
|
||||
// If previous event end time overlaps (e.g. soft block finished sooner than scheduled)
|
||||
@ -2256,8 +2298,9 @@ end service
|
||||
// Saves the event to the database.
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service AddSchedEvent(ReactorNo, WorkOrderNo, StartDTM, StopDTM, Description, WaferQty)
|
||||
|
||||
|
||||
// Create a unique key ID for the new event
|
||||
ErrorMsg = ''
|
||||
NewEventKeyID = RTI_CreateGUID()
|
||||
NewEventRec = ''
|
||||
NewEventRec<SCHED_DET_NG.REACT_NO$> = ReactorNo
|
||||
@ -2267,16 +2310,17 @@ Service AddSchedEvent(ReactorNo, WorkOrderNo, StartDTM, StopDTM, Description, Wa
|
||||
NewEventRec<SCHED_DET_NG.EVENT_TOTAL_WFRS$> = WaferQty
|
||||
EpiPro = (Xlate('WO_LOG', WorkOrderNo, 'REACT_TYPE', 'X') EQ 'EPP')
|
||||
CurrDTM = Datetime()
|
||||
EventProcCassList = ''
|
||||
EventUnprocCassList = ''
|
||||
LastLoadedRDS = ''
|
||||
LastUnloadedRDS = ''
|
||||
EventProcCassList = ''
|
||||
EventUnprocCassList = ''
|
||||
LastLoadedRDS = ''
|
||||
LastUnloadedRDS = ''
|
||||
// Determine start cassette and slot number
|
||||
PrevSchedQty = Schedule_Services('GetScheduledWfrQty', WorkOrderNo)
|
||||
StartCass = SRP_Math('CEILING', ( (PrevSchedQty + 1) / 25))
|
||||
If StartCass EQ 0 then StartCass = 1
|
||||
PrevSchedQty = Schedule_Services('GetScheduledWfrQty', WorkOrderNo)
|
||||
VoidedQty = Work_Order_Services('GetVoidedWaferCount', WorkOrderNo)
|
||||
StartCass = SRP_Math('CEILING', ( (PrevSchedQty + VoidedQty + 1) / 25))
|
||||
If StartCass EQ 0 then StartCass = 1
|
||||
StartSlot = Mod(PrevSchedQty, 25) + 1
|
||||
TotalSchedQty = PrevSchedQty + WaferQty
|
||||
TotalSchedQty = PrevSchedQty + WaferQty + VoidedQty
|
||||
StopCass = SRP_Math('CEILING', ( TotalSchedQty / 25 ) )
|
||||
StopSlot = Mod(TotalSchedQty, 25)
|
||||
If StopSlot EQ 0 then StopSlot = 25
|
||||
@ -2284,128 +2328,192 @@ Service AddSchedEvent(ReactorNo, WorkOrderNo, StartDTM, StopDTM, Description, Wa
|
||||
RDSKeys = ''
|
||||
If EpiPro then
|
||||
For CassNo = StartCass to StopCass
|
||||
WMIKey = WorkOrderNo:'*1*':CassNo
|
||||
WMIRdsList = Xlate('WM_IN', WMIKey, 'RDS_NO', 'X')
|
||||
If WMIRdsList NE '' then
|
||||
Begin Case
|
||||
Case ( (CassNo EQ StartCass) and (CassNo EQ StopCass) )
|
||||
StartIndex = StartSlot
|
||||
StopIndex = StopSlot
|
||||
Case CassNo EQ StartCass
|
||||
StartIndex = StartSlot
|
||||
StopIndex = 25
|
||||
Case CassNo EQ StopCass
|
||||
StartIndex = 1
|
||||
StopIndex = StopSlot
|
||||
Case Otherwise$
|
||||
StartIndex = 1
|
||||
StopIndex = 25
|
||||
End Case
|
||||
For SlotIndex = StartIndex to StopIndex
|
||||
RDSKeys<0, -1> = WMIRdsList<0, SlotIndex>
|
||||
Next SlotIndex
|
||||
WMIKey = WorkOrderNo:'*1*':CassNo
|
||||
If RowExists('WM_IN', WMIKey) then
|
||||
WMIRec = Database_Services('ReadDataRow', 'WM_IN', WMIKey)
|
||||
end else
|
||||
// No RDS keys exist for this cassette yet, so it's unprocessed
|
||||
EventUnprocCassList<0, -1> = CassNo
|
||||
// Material not received yet
|
||||
WMIRec = ''
|
||||
end
|
||||
If Error_Services('NoError') then
|
||||
Voided = WMIRec<WM_IN_VOID$>
|
||||
If Not(Voided) then
|
||||
WMIRdsList = WMIRec<WM_IN_RDS_NO$>
|
||||
If WMIRdsList NE '' then
|
||||
Begin Case
|
||||
Case ( (CassNo EQ StartCass) and (CassNo EQ StopCass) )
|
||||
StartIndex = StartSlot
|
||||
StopIndex = StopSlot
|
||||
Case CassNo EQ StartCass
|
||||
StartIndex = StartSlot
|
||||
StopIndex = 25
|
||||
Case CassNo EQ StopCass
|
||||
StartIndex = 1
|
||||
StopIndex = StopSlot
|
||||
Case Otherwise$
|
||||
StartIndex = 1
|
||||
StopIndex = 25
|
||||
End Case
|
||||
For SlotIndex = StartIndex to StopIndex
|
||||
RDSKeys<0, -1> = WMIRdsList<0, SlotIndex>
|
||||
Next SlotIndex
|
||||
end else
|
||||
// No RDS keys exist for this cassette yet, so it's unprocessed
|
||||
EventUnprocCassList<0, -1> = CassNo
|
||||
end
|
||||
end
|
||||
end else
|
||||
ErrorMsg = Error_Services('GetMessage')
|
||||
end
|
||||
Until (ErrorMsg NE '')
|
||||
Next CassNo
|
||||
|
||||
If RDSKeys NE '' then
|
||||
RDSKeys = SRP_Array('Clean', RDSKeys, 'TrimAndMakeUnique', @VM)
|
||||
For each RDSKey in RDSKeys using @VM setting vPos
|
||||
DtmOut = Xlate('RDS', RDSKey, 'DATETIME_OUT', 'X')
|
||||
WMIKeys = Xlate('RDS', RDSKey, 'WM_IN_KEY', 'X')
|
||||
For each WMIKey in WMIKeys using @VM
|
||||
CassNo = Field(WMIKey, '*', 3)
|
||||
If DtmOut NE '' then
|
||||
LastUnloadedRDS = RDSKey
|
||||
Locate CassNo in EventProcCassList using @VM setting Dummy else
|
||||
EventProcCassList<0, -1> = CassNo
|
||||
end
|
||||
If (ErrorMsg EQ '') then
|
||||
If RDSKeys NE '' then
|
||||
RDSKeys = SRP_Array('Clean', RDSKeys, 'TrimAndMakeUnique', @VM)
|
||||
For each RDSKey in RDSKeys using @VM setting vPos
|
||||
RDSRec = Database_Services('ReadDataRow', 'RDS', RDSKey)
|
||||
If Error_Services('NoError') then
|
||||
DateOut = RDSRec<RDS_DATE_OUT$>
|
||||
TimeOut = RDSRec<RDS_TIME_OUT$>
|
||||
TimeOut = TimeOut/86400
|
||||
TimeOut = SRP_Math('ROUND', TimeOut, 5)
|
||||
TimeOut = TimeOut[2, 6]
|
||||
DtmOut = DateOut:TimeOut
|
||||
end else
|
||||
Locate CassNo in EventUnprocCassList using @VM setting Dummy else
|
||||
EventUnprocCassList<0, -1> = CassNo
|
||||
end
|
||||
ErrorMsg = Error_Services('GetMessage')
|
||||
end
|
||||
Next WMIKey
|
||||
Next RDSKey
|
||||
If (ErrorMsg EQ '' ) then
|
||||
WMIKeys = Xlate('RDS', RDSKey, 'WM_IN_KEY', 'X')
|
||||
For each WMIKey in WMIKeys using @VM
|
||||
CassNo = Field(WMIKey, '*', 3)
|
||||
If DtmOut NE '' then
|
||||
LastUnloadedRDS = RDSKey
|
||||
Locate CassNo in EventProcCassList using @VM setting Dummy else
|
||||
EventProcCassList<0, -1> = CassNo
|
||||
end
|
||||
end else
|
||||
Locate CassNo in EventUnprocCassList using @VM setting Dummy else
|
||||
EventUnprocCassList<0, -1> = CassNo
|
||||
end
|
||||
end
|
||||
Next WMIKey
|
||||
end
|
||||
Until (ErrorMsg NE '')
|
||||
Next RDSKey
|
||||
end
|
||||
|
||||
EventUnprocCassList = SRP_Array('SortSimpleList', EventUnprocCassList, 'AscendingNumbers', @VM)
|
||||
// This line ensures EpiPro cassettes are not recorded as both processed and unprocessed.
|
||||
EventProcCassList = SRP_Array('Join', EventProcCassList, EventUnprocCassList, 'NOT', @VM)
|
||||
end
|
||||
|
||||
EventUnprocCassList = SRP_Array('SortSimpleList', EventUnprocCassList, 'AscendingNumbers', @VM)
|
||||
// This line ensures EpiPro cassettes are not recorded as both processed and unprocessed.
|
||||
EventProcCassList = SRP_Array('Join', EventProcCassList, EventUnprocCassList, 'NOT', @VM)
|
||||
|
||||
end else
|
||||
|
||||
For CassNo = StartCass to StopCass
|
||||
WOMatKey = WorkOrderNo:'*':CassNo
|
||||
RDSKey = Xlate('WO_MAT', WOMatKey, 'RDS_NO', 'X')
|
||||
DtmOut = Xlate('RDS', RDSKey, 'DATETIME_OUT', 'X')
|
||||
If DtmOut NE '' then
|
||||
LastUnloadedRDS = RDSKey
|
||||
Locate CassNo in EventProcCassList using @VM setting Dummy else
|
||||
EventProcCassList<0, -1> = CassNo
|
||||
DtmOut = ''
|
||||
WOMatKey = WorkOrderNo:'*':CassNo
|
||||
If RowExists('WO_MAT', WOMatKey) then
|
||||
WOMatRec = Database_Services('ReadDataRow', 'WO_MAT', WOMatKey)
|
||||
end else
|
||||
// Material not received yet
|
||||
WOMatRec = ''
|
||||
end
|
||||
If Error_Services('NoError') then
|
||||
Voided = WOMatRec<WO_MAT_VOID$>
|
||||
If Not(Voided) then
|
||||
RDSKey = WOMatRec<WO_MAT_RDS_NO$>
|
||||
If (RDSKey NE '') then
|
||||
RDSRec = Database_Services('ReadDataRow', 'RDS', RDSKey)
|
||||
If Error_Services('NoError') then
|
||||
DateOut = RDSRec<RDS_DATE_OUT$>
|
||||
TimeOut = RDSRec<RDS_TIME_OUT$>
|
||||
TimeOut = TimeOut/86400
|
||||
TimeOut = SRP_Math('ROUND', TimeOut, 5)
|
||||
TimeOut = TimeOut[2, 6]
|
||||
DtmOut = DateOut:TimeOut
|
||||
end else
|
||||
ErrorMsg = Error_Services('GetMessage')
|
||||
end
|
||||
end
|
||||
end
|
||||
end else
|
||||
Locate CassNo in EventUnprocCassList using @VM setting Dummy else
|
||||
EventUnprocCassList<0, -1> = CassNo
|
||||
ErrorMsg = Error_Services('GetMessage')
|
||||
end
|
||||
|
||||
If (ErrorMsg EQ '') then
|
||||
If (DtmOut NE '') then
|
||||
LastUnloadedRDS = RDSKey
|
||||
Locate CassNo in EventProcCassList using @VM setting Dummy else
|
||||
EventProcCassList<0, -1> = CassNo
|
||||
end
|
||||
end else
|
||||
Locate CassNo in EventUnprocCassList using @VM setting Dummy else
|
||||
EventUnprocCassList<0, -1> = CassNo
|
||||
end
|
||||
end
|
||||
end
|
||||
Until (ErrorMsg NE '')
|
||||
Next CassNo
|
||||
end
|
||||
|
||||
EventComp = (EventUnprocCassList EQ '')
|
||||
If EventComp then StopDtm = Xlate('RDS', LastUnloadedRDS, 'DATETIME_OUT', 'X')
|
||||
If (ErrorMsg EQ '') then
|
||||
|
||||
// Update event
|
||||
NewEventRec<SCHED_DET_NG.EVENT_COMP$> = EventComp
|
||||
NewEventRec<SCHED_DET_NG.PROCESSED_CASS$> = EventProcCassList
|
||||
NewEventRec<SCHED_DET_NG.UNPROCESSED_CASS$> = EventUnprocCassList
|
||||
NewEventRec<SCHED_DET_NG.STOP_DTM$> = StopDtm
|
||||
Database_Services('WriteDataRow', 'SCHED_DET_NG', NewEventKeyID, NewEventRec)
|
||||
|
||||
If Error_Services('NoError') then
|
||||
// Determine where to insert the event in the REACTOR record linked list
|
||||
// Add the event to the REACTOR record event list
|
||||
ReactRec = Database_Services('ReadDataRow', 'REACTOR', ReactorNo)
|
||||
ReactSchedEvents = ReactRec<REACTOR_SCHED_EVENTS$>
|
||||
CurrNumEvents = DCount(ReactSchedEvents, @VM)
|
||||
// Add our new event key ID to the reactor event list
|
||||
NewNumEvents = CurrNumEvents + 1
|
||||
InsertPos = ''
|
||||
For EventIndex = 1 to CurrNumEvents Step 1
|
||||
ThisEventKey = ReactSchedEvents<0, EventIndex>
|
||||
ThisStartDTM = Xlate('SCHED_DET_NG', ThisEventKey, 'START_DTM', 'X')
|
||||
IF ThisStartDTM GT StartDTM then
|
||||
// We found our location
|
||||
InsertPos = EventIndex
|
||||
end
|
||||
Until InsertPos NE ''
|
||||
Next EventIndex
|
||||
If InsertPos EQ '' then InsertPos = NewNumEvents
|
||||
ReactSchedEvents = Insert(ReactSchedEvents, 0, InsertPos, 0, NewEventKeyID)
|
||||
ReactRec<REACTOR_SCHED_EVENTS$> = ReactSchedEvents
|
||||
Database_Services('WriteDataRow', 'REACTOR', ReactorNo, ReactRec)
|
||||
EventComp = (EventUnprocCassList EQ '')
|
||||
If EventComp then StopDtm = Xlate('RDS', LastUnloadedRDS, 'DATETIME_OUT', 'X')
|
||||
|
||||
// Check if there is an overlap with the previous event. If so, then set previous event's stop DTM to this event's
|
||||
// start DTM.
|
||||
If NewNumEvents GT 1 then
|
||||
PrevEventKey = ReactSchedEvents<0, (NewNumEvents - 1)>
|
||||
If PrevEventKey NE '' then
|
||||
PrevEventRec = Database_Services('ReadDataRow', 'SCHED_DET_NG', PrevEventKey)
|
||||
PrevEventStopDTM = PrevEventRec<SCHED_DET_NG.STOP_DTM$>
|
||||
If PrevEventStopDTM GT StartDTM then
|
||||
PrevEventStopDTM = StartDTM
|
||||
PrevEventRec<SCHED_DET_NG.STOP_DTM$> = PrevEventStopDTM
|
||||
Database_Services('WriteDataRow', 'SCHED_DET_NG', PrevEventKey, PrevEventRec, True$, False$, True$)
|
||||
// Update event
|
||||
NewEventRec<SCHED_DET_NG.EVENT_COMP$> = EventComp
|
||||
NewEventRec<SCHED_DET_NG.PROCESSED_CASS$> = EventProcCassList
|
||||
NewEventRec<SCHED_DET_NG.UNPROCESSED_CASS$> = EventUnprocCassList
|
||||
NewEventRec<SCHED_DET_NG.STOP_DTM$> = StopDtm
|
||||
Database_Services('WriteDataRow', 'SCHED_DET_NG', NewEventKeyID, NewEventRec)
|
||||
|
||||
If Error_Services('NoError') then
|
||||
// Determine where to insert the event in the REACTOR record linked list
|
||||
// Add the event to the REACTOR record event list
|
||||
ReactRec = Database_Services('ReadDataRow', 'REACTOR', ReactorNo)
|
||||
ReactSchedEvents = ReactRec<REACTOR_SCHED_EVENTS$>
|
||||
CurrNumEvents = DCount(ReactSchedEvents, @VM)
|
||||
// Add our new event key ID to the reactor event list
|
||||
NewNumEvents = CurrNumEvents + 1
|
||||
InsertPos = ''
|
||||
For EventIndex = 1 to CurrNumEvents Step 1
|
||||
ThisEventKey = ReactSchedEvents<0, EventIndex>
|
||||
ThisStartDTM = Xlate('SCHED_DET_NG', ThisEventKey, 'START_DTM', 'X')
|
||||
IF ThisStartDTM GT StartDTM then
|
||||
// We found our location
|
||||
InsertPos = EventIndex
|
||||
end
|
||||
Until InsertPos NE ''
|
||||
Next EventIndex
|
||||
If InsertPos EQ '' then InsertPos = NewNumEvents
|
||||
ReactSchedEvents = Insert(ReactSchedEvents, 0, InsertPos, 0, NewEventKeyID)
|
||||
ReactRec<REACTOR_SCHED_EVENTS$> = ReactSchedEvents
|
||||
Database_Services('WriteDataRow', 'REACTOR', ReactorNo, ReactRec)
|
||||
|
||||
// Check if there is an overlap with the previous event. If so, then set previous event's stop DTM to this event's
|
||||
// start DTM.
|
||||
If NewNumEvents GT 1 then
|
||||
PrevEventKey = ReactSchedEvents<0, (NewNumEvents - 1)>
|
||||
If PrevEventKey NE '' then
|
||||
PrevEventRec = Database_Services('ReadDataRow', 'SCHED_DET_NG', PrevEventKey)
|
||||
PrevEventStopDTM = PrevEventRec<SCHED_DET_NG.STOP_DTM$>
|
||||
If PrevEventStopDTM GT StartDTM then
|
||||
PrevEventStopDTM = StartDTM
|
||||
PrevEventRec<SCHED_DET_NG.STOP_DTM$> = PrevEventStopDTM
|
||||
Database_Services('WriteDataRow', 'SCHED_DET_NG', PrevEventKey, PrevEventRec, True$, False$, True$)
|
||||
end
|
||||
end
|
||||
end
|
||||
// Record schedule change in SCHED_HIST table
|
||||
Schedule_Services('AddSchedHist', NewEventKeyID, ReactorNo, 'ADD', @User4)
|
||||
Response = NewEventKeyID
|
||||
end
|
||||
// Record schedule change in SCHED_HIST table
|
||||
Schedule_Services('AddSchedHist', NewEventKeyID, ReactorNo, 'ADD', @User4)
|
||||
Response = NewEventKeyID
|
||||
end
|
||||
|
||||
If ErrorMsg NE '' then Error_Services('Add', ErrorMsg)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -2439,7 +2547,7 @@ end service
|
||||
// Modifies an event's details.
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service ModifySchedEvent(SchedDetNGKey, ReactorNo, WorkOrderNo, StartDTM, StopDTM, Description, WaferQty, AdjustNextEvent=BOOLEAN)
|
||||
|
||||
|
||||
Response = False$
|
||||
If SchedDetNGKey NE '' then
|
||||
EventRec = Database_Services('ReadDataRow', 'SCHED_DET_NG', SchedDetNGKey)
|
||||
@ -3151,73 +3259,155 @@ Service GetAvailableWorkOrders(ReactorType, SusceptorSize, ReactorNo)
|
||||
end service
|
||||
|
||||
|
||||
Service MarkCassProcessed(WONo, CassNo, ProcessedDTM)
|
||||
|
||||
Service UpdateCassProcStatus(WONo, CassNo, ProcessedDTM)
|
||||
|
||||
ErrorMsg = ''
|
||||
If ((WONo NE '') and (CassNo NE '') and (ProcessedDTM NE '') ) then
|
||||
If Num(ProcessedDTM) then ProcessedDTM = OConv(ProcessedDTM, 'DT2/^H')
|
||||
// Find the SCHED_DET_NG event record that contains the cassette number
|
||||
Query = 'SELECT SCHED_DET_NG WITH WO_NO EQ ':WONo:' AND WITH START_DTM LE "':ProcessedDTM:'" '
|
||||
Query := 'AND WITH UNPROCESSED_CASS EQ ':CassNo:' BY START_DTM'
|
||||
Query := 'AND WITH UNPROCESSED_CASS EQ ':CassNo:' OR WITH PROCESSED_CASS EQ ':CassNo:' BY START_DTM'
|
||||
GoSub ClearCursors
|
||||
RList(Query, TARGET_ACTIVELIST$, '', '', '')
|
||||
EOF = False$
|
||||
Done = False$
|
||||
Loop
|
||||
Readnext SchedDetNGKey else EOF = True$
|
||||
Until EOF = True$
|
||||
SchedDetNGRec = Database_Services('ReadDataRow', 'SCHED_DET_NG', SchedDetNGKey)
|
||||
CassComp = False$
|
||||
ReactType = Xlate('WO_LOG', WONo, 'REACT_TYPE', 'X')
|
||||
Until EOF
|
||||
Schedule_Services('UpdateEventCassProcStatus', WONo, CassNo, SchedDetNGKey)
|
||||
If Error_Services('HasError') then ErrorMsg = Error_Services('GetMessage')
|
||||
Done = True$
|
||||
Until Done
|
||||
Repeat
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. WONo, CassNo, and ProcessedDTM cannot be null'
|
||||
end
|
||||
|
||||
If ErrorMsg NE '' then Error_Services('Add', ErrorMsg)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service UpdateEventCassProcStatus(WONo, CassNo, SchedDetNGKey)
|
||||
|
||||
ErrorMsg = ''
|
||||
If ( (WONo NE '') and (CassNo NE '') and (SchedDetNGKey NE '') ) then
|
||||
SchedDetNGRec = Database_Services('ReadDataRow', 'SCHED_DET_NG', SchedDetNGKey)
|
||||
If Error_Services('NoError') then
|
||||
RecChanged = False$
|
||||
CassComp = False$
|
||||
UnprocCassList = SchedDetNGRec<SCHED_DET_NG.UNPROCESSED_CASS$>
|
||||
ProcCassList = SchedDetNGRec<SCHED_DET_NG.PROCESSED_CASS$>
|
||||
AllSchedCass = SRP_Array('Join', UnprocCassList, ProcCassList, 'OR', @VM)
|
||||
AllSchedCass = SRP_Array('SortSimpleList', AllSchedCass, 'AscendingNumbers', @VM)
|
||||
ReactType = Xlate('WO_LOG', WONo, 'REACT_TYPE', 'X')
|
||||
If ReactType EQ 'EPP' then
|
||||
// Since EpiPro splits WM_IN cassettes out into RDS runs, we need to determine if the
|
||||
// cassette has been emptied out or if enough wafers have been consumed such that
|
||||
// the wafer count equals the split work order event quantity.
|
||||
StopDtm = SchedDetNGRec<SCHED_DET_NG.STOP_DTM$>
|
||||
SchedWfrQty = Schedule_Services('GetScheduledWfrQty', WONo, StopDtm)
|
||||
// Determine the cassette and slot this event should end on. This will be used to identify
|
||||
// cassettes that should be marked as complete when the event ends in the middle of the cassette.
|
||||
// That is, the EpiPro work order events should end on an RDS when they are split around block
|
||||
// out events.
|
||||
UnprocCassList = SchedDetNGRec<SCHED_DET_NG.UNPROCESSED_CASS$>
|
||||
ProcCassList = SchedDetNGRec<SCHED_DET_NG.PROCESSED_CASS$>
|
||||
AllSchedCass = SRP_Array('Join', UnprocCassList, ProcCassList, 'OR', @VM)
|
||||
AllSchedCass = SRP_Array('SortSimpleList', AllSchedCass, 'AscendingNumbers', @VM)
|
||||
NumSchedCass = DCount(AllSchedCass, @VM)
|
||||
EndCassNo = AllSchedCass<0, NumSchedCass>
|
||||
EndSlotNo = Mod(SchedWfrQty, 25)
|
||||
If EndSlotNo EQ 0 then EndSlotNo = 25
|
||||
WMIKey = WONo:'*1*':CassNo
|
||||
WMIRdsList = Xlate('WM_IN', WMIKey, 'RDS_NO', 'X')
|
||||
UnloadDtms = Xlate('RDS', WMIRdsList, 'DATETIME_OUT', 'X')
|
||||
NumUnloadedWfrs = 0
|
||||
If UnloadDtms NE '' then
|
||||
For each UnloadDtm in UnloadDtms using @VM
|
||||
NumUnloadedWfrs += (UnloadDtm NE '')
|
||||
Next UnloadDtm
|
||||
end
|
||||
CassRemWfrs = Xlate('WM_IN', WMIKey, 'REM_WFRS', 'X')
|
||||
If ( (NumUnloadedWfrs EQ 25) or ( (CassNo EQ EndCassNo) and (NumUnloadedWfrs GE EndSlotNo) ) or (CassRemWfrs EQ 0) ) then
|
||||
CassComp = True$
|
||||
If RowExists('WM_IN', WMIKey) then
|
||||
// Since EpiPro splits WM_IN cassettes out into RDS runs, we need to determine if the
|
||||
// cassette has been emptied out or if enough wafers have been consumed such that
|
||||
// the wafer count equals the split work order event quantity.
|
||||
StopDtm = SchedDetNGRec<SCHED_DET_NG.STOP_DTM$>
|
||||
SchedWfrQty = Schedule_Services('GetScheduledWfrQty', WONo, StopDtm)
|
||||
// Determine the cassette and slot this event should end on. This will be used to identify
|
||||
// cassettes that should be marked as complete when the event ends in the middle of the cassette.
|
||||
// That is, the EpiPro work order events should end on an RDS when they are split around block
|
||||
// out events.
|
||||
NumSchedCass = DCount(AllSchedCass, @VM)
|
||||
EndCassNo = AllSchedCass<0, NumSchedCass>
|
||||
EndSlotNo = Mod(SchedWfrQty, 25)
|
||||
If EndSlotNo EQ 0 then EndSlotNo = 25
|
||||
WMIRdsList = Xlate('WM_IN', WMIKey, 'RDS_NO', 'X')
|
||||
UnloadDtms = Xlate('RDS', WMIRdsList, 'DATETIME_OUT', 'X')
|
||||
NumUnloadedWfrs = 0
|
||||
If UnloadDtms NE '' then
|
||||
For each UnloadDtm in UnloadDtms using @VM
|
||||
NumUnloadedWfrs += (UnloadDtm NE '')
|
||||
Next UnloadDtm
|
||||
end
|
||||
CassRemWfrs = Xlate('WM_IN', WMIKey, 'REM_WFRS', 'X')
|
||||
If ( (NumUnloadedWfrs EQ 25) or ( (CassNo EQ EndCassNo) and (NumUnloadedWfrs GE EndSlotNo) ) or (CassRemWfrs EQ 0) ) then
|
||||
CassComp = True$
|
||||
end
|
||||
end
|
||||
end else
|
||||
CassComp = True$
|
||||
end
|
||||
UnprocessedCassettes = SchedDetNGRec<SCHED_DET_NG.UNPROCESSED_CASS$>
|
||||
If CassComp then
|
||||
Locate CassNo in UnprocessedCassettes using @VM setting vPos then
|
||||
UnprocessedCassettes = Delete(UnprocessedCassettes, 0, vPos, 0)
|
||||
ProcessedCassettes = SchedDetNGRec<SCHED_DET_NG.PROCESSED_CASS$>
|
||||
ProcessedCassettes<0, -1> = CassNo
|
||||
SchedDetNGRec<SCHED_DET_NG.UNPROCESSED_CASS$> = UnprocessedCassettes
|
||||
SchedDetNGRec<SCHED_DET_NG.PROCESSED_CASS$> = ProcessedCassettes
|
||||
Database_Services('WriteDataRow', 'SCHED_DET_NG', SchedDetNGKey, SchedDetNGRec, True$, False$, True$)
|
||||
Done = True$
|
||||
WOMatKey = WoNo:'*':CassNo
|
||||
If RowExists('WO_MAT', WOMatKey) then
|
||||
CurrWaferCount = obj_WO_Mat('CurrWaferCnt', WOMatKey)
|
||||
RDSNo = Xlate('WO_MAT', WOMatKey, 'RDS_NO', 'X')
|
||||
DateOut = Xlate('RDS', RDSNo, 'DATE_OUT', 'X')
|
||||
CassComp = ( (CurrWaferCount EQ 0) or (DateOut NE '') )
|
||||
end
|
||||
end
|
||||
Until Done EQ True$
|
||||
Repeat
|
||||
|
||||
If CassComp then
|
||||
Locate CassNo in UnprocCassList using @VM setting vPos then
|
||||
UnprocCassList = Delete(UnprocCassList, 0, vPos, 0)
|
||||
RecChanged = True$
|
||||
end
|
||||
Locate CassNo in ProcCassList using @VM setting vPos else
|
||||
ProcCassList<0, -1> = CassNo
|
||||
ProcCassList = SRP_Array('Clean', ProcCassList, 'TrimAndMakeUnique', @VM)
|
||||
ProcCassList = SRP_Array('SortSimpleList', ProcCassList, 'AscendingNumbers', @VM)
|
||||
RecChanged = True$
|
||||
end
|
||||
end else
|
||||
Locate CassNo in ProcCassList using @VM setting vPos then
|
||||
ProcCassList = Delete(ProcCassList, 0, vPos, 0)
|
||||
RecChanged = True$
|
||||
end
|
||||
Locate CassNo in UnprocCassList using @VM setting vPos else
|
||||
UnprocCassList<0, -1> = CassNo
|
||||
UnprocCassList = SRP_Array('Clean', UnprocCassList, 'TrimAndMakeUnique', @VM)
|
||||
UnprocCassList = SRP_Array('SortSimpleList', UnprocCassList, 'AscendingNumbers', @VM)
|
||||
RecChanged = True$
|
||||
end
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Error message: ':Error_Services('GetMessage')
|
||||
end
|
||||
If RecChanged then
|
||||
SchedDetNGRec<SCHED_DET_NG.UNPROCESSED_CASS$> = UnprocCassList
|
||||
SchedDetNGRec<SCHED_DET_NG.PROCESSED_CASS$> = ProcCassList
|
||||
Database_Services('WriteDataRow', 'SCHED_DET_NG', SchedDetNGKey, SchedDetNGRec, True$, False$, True$)
|
||||
If Error_Services('HasError') then ErrorMsg = Error_Services('GetMessage')
|
||||
end
|
||||
end
|
||||
|
||||
If ErrorMsg NE '' then Error_Services('Add', ErrorMsg)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service UpdateEventCassLists(SchedDetNGKey)
|
||||
|
||||
ErrorMsg = ''
|
||||
If (SchedDetNGKey NE '') then
|
||||
If RowExists('SCHED_DET_NG', SchedDetNGKey) then
|
||||
SchedDetNGRec = Database_Services('ReadDataRow', 'SCHED_DET_NG', SchedDetNGKey)
|
||||
If Error_Services('NoError') then
|
||||
UnprocCassList = SchedDetNGRec<SCHED_DET_NG.UNPROCESSED_CASS$>
|
||||
ProcCassList = SchedDetNGRec<SCHED_DET_NG.PROCESSED_CASS$>
|
||||
AllSchedCass = SRP_Array('Join', UnprocCassList, ProcCassList, 'OR', @VM)
|
||||
AllSchedCass = SRP_Array('SortSimpleList', AllSchedCass, 'AscendingNumbers', @VM)
|
||||
WONo = SchedDetNGRec<SCHED_DET_NG.WO_NO$>
|
||||
For each CassNo in AllSchedCass using @VM
|
||||
Schedule_Services('UpdateEventCassProcStatus', WONo, CassNo, SchedDetNGKey)
|
||||
If Error_Services('HasError') then ErrorMsg = Error_Services('GetMessage')
|
||||
Until (ErrorMsg NE '')
|
||||
Next CassNo
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Error message: ':Error_Services('GetMessage')
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. SCHED_DET_NG ':SchedDetNGKey:' does not exist.'
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. SchedDetNGKey cannot be null.'
|
||||
end
|
||||
|
||||
If ErrorMsg NE '' then Error_Services('Add', ErrorMsg)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -3529,6 +3719,226 @@ Service SendRefreshMessage()
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service AdjustWorkOrderScheduleQty(WONo, ModifyQty)
|
||||
|
||||
ErrorMsg = ''
|
||||
Begin Case
|
||||
Case (WONo EQ '')
|
||||
ErrorMsg = 'Error in ':Service:' service. WONo cannot be null.'
|
||||
Case (ModifyQty EQ '')
|
||||
ErrorMsg = 'Error in ':Service:' service. ModifyQty cannot be null.'
|
||||
End Case
|
||||
|
||||
If (ErrorMsg EQ '') then
|
||||
|
||||
WOQty = Xlate('WO_LOG', WONo, 'WO_QTY', 'X')
|
||||
OrigQty = WOQty - ModifyQty
|
||||
NewQty = WOQty + ModifyQty
|
||||
|
||||
SchedDetNGKey = ''
|
||||
|
||||
Begin Case
|
||||
Case ModifyQty GT 0
|
||||
|
||||
LogData = ''
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<2> = 'WO_LOG_ACTIONS'
|
||||
LogData<3> = 'Work order ':WONo:' quantity increased from ':OrigQty:' to ':NewQty:'.'
|
||||
Schedule_Services('LogActivity', '', LogData, False$)
|
||||
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<3> = 'Searching for a scheduled event to increase the quantity.'
|
||||
Schedule_Services('LogActivity', '', LogData, False$)
|
||||
|
||||
// Search schedule for most recent event and increase that event quantity by the difference.
|
||||
Query = 'SELECT SCHED_DET_NG WITH WO_NO EQ ':WONo:' BY-DSND STOP_DTM'
|
||||
GoSub ClearCursors
|
||||
Set_Status(0)
|
||||
RList(Query, TARGET_ACTIVELIST$, '', '', False$)
|
||||
errCode = ''
|
||||
If Get_Status(errCode) then
|
||||
|
||||
ErrorMsg = 'Error retrieving event list in WO_LOG_Actions. RList error code ':errCode:'.'
|
||||
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<3> = ErrorMsg
|
||||
Schedule_Services('LogActivity', '', LogData, False$)
|
||||
|
||||
Error_Services('Add', ErrorMsg)
|
||||
|
||||
end else
|
||||
|
||||
EOF = False$
|
||||
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<3> = 'Query successful. Number of keys found: ':@RecCount:'.'
|
||||
Schedule_Services('LogActivity', '', LogData, False$)
|
||||
|
||||
ReadNext SchedDetNGKey else EOF = True$
|
||||
If SchedDetNGKey NE '' then
|
||||
EventRec = Database_Services('ReadDataRow', 'SCHED_DET_NG', SchedDetNGKey)
|
||||
StopDTM = EventRec<SCHED_DET_NG.STOP_DTM$>
|
||||
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<3> = 'Work order record ':WONo:' quantity increased from ':OrigQty:' to ':NewQty:'.'
|
||||
Schedule_Services('LogActivity', EventRec<SCHED_DET_NG.REACT_NO$>, LogData, False$)
|
||||
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<3> = 'Scheduled event ':SchedDetNGKey:' found.'
|
||||
Schedule_Services('LogActivity', EventRec<SCHED_DET_NG.REACT_NO$>, LogData, False$)
|
||||
|
||||
// Only modify the event if it is still running or is scheduled in the future.
|
||||
If StopDTM GT Datetime() then
|
||||
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<3> = 'Event stop DTM ':OConv(StopDtm, 'DT2/^H'):' less than current DTM, so increasing event quantity.'
|
||||
Schedule_Services('LogActivity', EventRec<SCHED_DET_NG.REACT_NO$>, LogData, False$)
|
||||
|
||||
ReactNo = EventRec<SCHED_DET_NG.REACT_NO$>
|
||||
WONo = EventRec<SCHED_DET_NG.WO_NO$>
|
||||
StartDTM = EventRec<SCHED_DET_NG.START_DTM$>
|
||||
Desc = EventRec<SCHED_DET_NG.DESC$>
|
||||
EventQty = EventRec<SCHED_DET_NG.EVENT_TOTAL_WFRS$>
|
||||
NewEventQty = EventQty + ModifyQty
|
||||
Schedule_Services('ModifySchedEvent', SchedDetNGKey, ReactNo, WONo, StartDTM, StopDTM, Desc, NewEventQty)
|
||||
// Adjust reactor events as needed.
|
||||
Schedule_Services('AdjustScheduleEvents', ReactNo)
|
||||
|
||||
end else
|
||||
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<3> = 'Event stop DTM ':OConv(StopDtm, 'DT2/^H'):' greater than current DTM.'
|
||||
Schedule_Services('LogActivity', EventRec<SCHED_DET_NG.REACT_NO$>, LogData, False$)
|
||||
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<3> = 'Event quantity not increased.'
|
||||
Schedule_Services('LogActivity', EventRec<SCHED_DET_NG.REACT_NO$>, LogData, False$)
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
GoSub ClearCursors
|
||||
Case ModifyQty LT 0
|
||||
|
||||
LogData = ''
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<2> = 'WO_LOG_ACTIONS'
|
||||
LogData<3> = 'Work order ':WONo:' quantity decreased from ':OrigQty:' to ':NewQty:'.'
|
||||
Schedule_Services('LogActivity', '', LogData, False$)
|
||||
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<3> = 'Searching for a scheduled event to decrease the quantity.'
|
||||
Schedule_Services('LogActivity', '', LogData, False$)
|
||||
|
||||
// Search schedule for most recent events and decrease/delete those events as needed.
|
||||
Query = 'SELECT SCHED_DET_NG WITH WO_NO EQ ':WONo:' BY-DSND STOP_DTM'
|
||||
GoSub ClearCursors
|
||||
Set_Status(0)
|
||||
RList(Query, TARGET_ACTIVELIST$, '', '', False$)
|
||||
errCode = ''
|
||||
|
||||
If Get_Status(errCode) then
|
||||
|
||||
ErrorMsg = 'Error retrieving event list in WO_LOG_Actions. RList error code ':errCode:'.'
|
||||
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<3> = ErrorMsg
|
||||
Schedule_Services('LogActivity', '', LogData, False$)
|
||||
|
||||
Error_Services('Add', ErrorMsg)
|
||||
|
||||
end else
|
||||
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<3> = 'Query successful. Number of keys found: ':@RecCount:'.'
|
||||
Schedule_Services('LogActivity', '', LogData, False$)
|
||||
|
||||
EOF = False$
|
||||
Done = False$
|
||||
UpdateReq = False$
|
||||
Loop
|
||||
ReadNext SchedDetNGKey else EOF = True$
|
||||
Until EOF EQ True$
|
||||
If SchedDetNGKey NE '' then
|
||||
EventRec = Database_Services('ReadDataRow', 'SCHED_DET_NG', SchedDetNGKey)
|
||||
StopDTM = EventRec<SCHED_DET_NG.STOP_DTM$>
|
||||
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<3> = 'Work order record ':WONo:' quantity decreased from ':OrigQty:' to ':NewQty:'.'
|
||||
Schedule_Services('LogActivity', EventRec<SCHED_DET_NG.REACT_NO$>, LogData, False$)
|
||||
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<3> = 'Scheduled event ':SchedDetNGKey:' found.'
|
||||
Schedule_Services('LogActivity', EventRec<SCHED_DET_NG.REACT_NO$>, LogData, False$)
|
||||
|
||||
// Only modify the event if it is still running or is scheduled in the future.
|
||||
If StopDTM GT Datetime() then
|
||||
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<3> = 'Event stop DTM ':OConv(StopDtm, 'DT2/^H'):' less than current DTM, so decreasing event quantity.'
|
||||
Schedule_Services('LogActivity', EventRec<SCHED_DET_NG.REACT_NO$>, LogData, False$)
|
||||
|
||||
UpdateReq = True$
|
||||
ReactNo = EventRec<SCHED_DET_NG.REACT_NO$>
|
||||
WONo = EventRec<SCHED_DET_NG.WO_NO$>
|
||||
StartDTM = EventRec<SCHED_DET_NG.START_DTM$>
|
||||
Desc = EventRec<SCHED_DET_NG.DESC$>
|
||||
EventQty = EventRec<SCHED_DET_NG.EVENT_TOTAL_WFRS$>
|
||||
If EventQty GT Abs(ModifyQty) then
|
||||
|
||||
// This event has enough wafers, so just reduce the quantity.
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<3> = 'Event quantity ':EventQty:' greater than quantity reduction ':ModifyQty:', so decreasing event quantity.'
|
||||
Schedule_Services('LogActivity', EventRec<SCHED_DET_NG.REACT_NO$>, LogData, False$)
|
||||
|
||||
Done = True$
|
||||
NewEventQty = EventQty + ModifyQty
|
||||
Schedule_Services('ModifySchedEvent', SchedDetNGKey, ReactNo, WONo, StartDTM, StopDTM, Desc, NewEventQty)
|
||||
|
||||
end else
|
||||
|
||||
// This event has fewer wafers than are being removed. Delete this event and continue
|
||||
// onto the next event.
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<3> = 'Event quantity ':EventQty:' less than quantity reduction ':ModifyQty:', so canceling event.'
|
||||
Schedule_Services('LogActivity', EventRec<SCHED_DET_NG.REACT_NO$>, LogData, False$)
|
||||
|
||||
Schedule_Services('CancelScheduleEvent', SchedDetNGKey, True$)
|
||||
ModifyQty += EventQty
|
||||
|
||||
end
|
||||
end else
|
||||
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<3> = 'Event stop DTM ':OConv(StopDtm, 'DT2/^H'):' greater than current DTM.'
|
||||
Schedule_Services('LogActivity', EventRec<SCHED_DET_NG.REACT_NO$>, LogData, False$)
|
||||
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<3> = 'Event quantity not decreased.'
|
||||
Schedule_Services('LogActivity', EventRec<SCHED_DET_NG.REACT_NO$>, LogData, False$)
|
||||
|
||||
end
|
||||
end
|
||||
Until Done EQ True$
|
||||
Repeat
|
||||
If UpdateReq then
|
||||
// Adjust reactor events as needed.
|
||||
Schedule_Services('AdjustScheduleEvents', ReactNo)
|
||||
end
|
||||
end
|
||||
GoSub ClearCursors
|
||||
|
||||
Case Otherwise$
|
||||
Null
|
||||
End Case
|
||||
|
||||
end
|
||||
|
||||
If ErrorMsg NE '' then Error_Services('Add', ErrorMsg)
|
||||
|
||||
end service
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Internal GoSubs
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -179,3 +179,27 @@ Test ScanNumDataPointsMatchesRdsTestSpecThickMPatternEpiProWithCorrectArgsShould
|
||||
Matches = Metrology_Services('ScanNumDataPointsMatchesRdsTestSpecThickMPattern', '650028', '2', 9, '1722253':@VM:'1722259', 'FTIR', 2)
|
||||
Assert Matches equals True$
|
||||
end test
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// AllowImport Tests
|
||||
//-----------------------------------------------------------------------------
|
||||
Test AllowImportWithFeatureFlagTurnedOffShouldReturnTrue
|
||||
RunData = ''
|
||||
RunData<99> = 1
|
||||
AllowImport = Metrology_Services('AllowImport', RunData)
|
||||
Assert AllowImport equals True$
|
||||
end test
|
||||
|
||||
Test AllowImportWithFeatureFlagTurnedOnAndImportFlagTrueShouldReturnTrue
|
||||
RunData = ''
|
||||
RunData<99> = 1
|
||||
AllowImport = Metrology_Services('AllowImport', RunData)
|
||||
Assert AllowImport equals True$
|
||||
end test
|
||||
|
||||
Test AllowImportWithFeatureFlagTurnedOnAndImportFlagFalseShouldReturnFalse
|
||||
RunData = ''
|
||||
RunData<99> = 'not valid'
|
||||
AllowImport = Metrology_Services('AllowImport', RunData)
|
||||
Assert AllowImport equals False$
|
||||
end test
|
||||
|
@ -155,17 +155,23 @@ WRITE_RECORD_PRE:
|
||||
return
|
||||
|
||||
WRITE_RECORD:
|
||||
|
||||
OrigQty = OrigRecord<TW_USE_TW_QTY$>
|
||||
NewQty = Record<TW_USE_TW_QTY$>
|
||||
NewQty = Record<TW_USE_TW_QTY$>
|
||||
OrigSig = OrigRecord<TW_USE_SIGNATURE$>
|
||||
NewSig = OrigRecord<TW_USE_SIGNATURE$>
|
||||
NewSig = OrigRecord<TW_USE_SIGNATURE$>
|
||||
|
||||
If OrigRecord EQ '' or OrigQty NE NewQty or OrigSig NE NewSig then
|
||||
If ( (OrigRecord EQ '') or (OrigQty NE NewQty) or (OrigSig NE NewSig) ) then
|
||||
MetrologyID = Field(Name, '*', 1)
|
||||
RDSNo = Xlate('RDS_TEST', MetrologyID, RDS_TEST_RDS_NO$, 'X')
|
||||
|
||||
Service_Services('PostProcedure', 'RDS_SERVICES', 'AllTWUseSigned':SD$:RDSNo)
|
||||
end
|
||||
|
||||
If (OrigQty NE NewQty) then
|
||||
ScrapAdj = NewQty - OrigQty
|
||||
Work_Order_Services('AdjustScrappedQty', {WO_NO}, ScrapAdj)
|
||||
end
|
||||
|
||||
return
|
||||
|
||||
DELETE_RECORD_PRE:
|
||||
@ -180,6 +186,11 @@ DELETE_RECORD:
|
||||
LogData<3> = Name
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
|
||||
|
||||
OrigQty = OrigRecord<TW_USE_TW_QTY$>
|
||||
NewQty = 0
|
||||
ScrapAdj = NewQty - OrigQty
|
||||
Work_Order_Services('AdjustScrappedQty', {WO_NO}, ScrapAdj)
|
||||
|
||||
return
|
||||
|
||||
|
||||
@ -228,3 +239,4 @@ Restore_System_Variables:
|
||||
@FILE.ERROR = OrigFileError
|
||||
return
|
||||
|
||||
|
||||
|
70
LSL2/STPROC/TW_USE_SERVICES.txt
Normal file
70
LSL2/STPROC/TW_USE_SERVICES.txt
Normal file
@ -0,0 +1,70 @@
|
||||
Compile function TW_Use_Services(@Service, @Params)
|
||||
#pragma precomp SRP_PreCompiler
|
||||
$Insert SERVICE_SETUP
|
||||
$Insert LOGICAL
|
||||
$Insert TW_USE_EQUATES
|
||||
|
||||
Declare subroutine Error_Services, Delay, Update_Index
|
||||
|
||||
Equ NUM_ATTEMPTS$ to 10
|
||||
|
||||
GoToService
|
||||
|
||||
Return Response or ""
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// SERVICES
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Service VerifyRelationalIndexes(TWUseKey)
|
||||
ErrorMsg = ''
|
||||
If TWUseKey NE '' then
|
||||
RDSTestKey = Field(TWUseKey, '*', 1, 1)
|
||||
If RDSTestKey NE '' then
|
||||
// Add index transaction to update TW_USE relational index (target RDS_TEST table)
|
||||
If RowExists('TW_USE', TWUseKey) then
|
||||
IndexTransactionRow = 'RDS_TEST*TW_USE_ID*AR':@FM:TWUseKey:@FM:"":@FM:RDSTestKey:@FM
|
||||
end else
|
||||
IndexTransactionRow = 'RDS_TEST*TW_USE_ID*AR':@FM:TWUseKey:@FM:RDSTestKey:@FM:"":@FM
|
||||
end
|
||||
Done = False$
|
||||
For AttemptNo = 1 to NUM_ATTEMPTS$
|
||||
If AttemptNo GT 1 then Delay(1)
|
||||
Open "!TW_USE" to BangTable then
|
||||
Lock BangTable, 0 then
|
||||
Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM
|
||||
PendingTrans := IndexTransactionRow
|
||||
Write PendingTrans on BangTable, 0 then
|
||||
Done = True$
|
||||
end else
|
||||
If AttemptNo GE NUM_ATTEMPTS$ then
|
||||
ErrorMsg = 'Error in ':Service:' service. Unable to write index transaction to !TW_USE. ':TWUseKey
|
||||
end
|
||||
end
|
||||
Unlock BangTable, 0 else ErrorMsg = 'Error in ':Service:' service. Unable to Open !TW_USE to add index transaction. ':TWUseKey
|
||||
end else
|
||||
If AttemptNo GE NUM_ATTEMPTS$ then
|
||||
ErrorMsg = 'Error in ':Service:' service. Unable to Lock !TW_USE to add index transaction. ':TWUseKey
|
||||
end
|
||||
end
|
||||
end else
|
||||
If AttemptNo GE NUM_ATTEMPTS$ then
|
||||
ErrorMsg = 'Error in ':Service:' service. Unable to Open !TW_USE to add index transaction. ':TWUseKey
|
||||
end
|
||||
end
|
||||
Until Done or ErrorMsg
|
||||
Next AttemptNo
|
||||
If Done then
|
||||
ErrCode = ''
|
||||
Update_Index('TW_USE', 'MET_NO', False$, True$)
|
||||
If Get_Status(ErrCode) then
|
||||
ErrorMsg = 'Error in ':Service:' service. Update_Index call failed. Error code: ':ErrCode
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
If ErrorMsg NE '' then Error_Services('Add', ErrorMsg)
|
||||
|
||||
End Service
|
||||
|
@ -25,18 +25,29 @@ Event WINDOW.CREATE(CreateParam)
|
||||
|
||||
OIWizardBaseUrl = Environment_Services('GetOIWizardBaseUrl')
|
||||
Set_Property(@Window, '@BASE_URL', OIWizardBaseUrl)
|
||||
InitNavPage = CreateParam
|
||||
InitNavPage = CreateParam
|
||||
Set_Property(@Window, '@INIT_NAV_PAGE', InitNavPage)
|
||||
Set_Property(@Window, '@FIRST_RENDER', True$)
|
||||
Set_Property(@Window:'.WEBVIEW_MAIN', 'AUTOSIZEHEIGHT', True$)
|
||||
Set_Property(@Window:'.WEBVIEW_MAIN', 'AUTOSIZEWIDTH', True$)
|
||||
PlaceDialog(-2, -2)
|
||||
ScreenSize = Get_Property('SYSTEM', 'SIZE')
|
||||
ClientWidth = ScreenSize<3>
|
||||
ClientHeight = ScreenSize<4>
|
||||
FormSize = Get_Property(@Window, 'SIZE')
|
||||
FormWidth = Int(ClientWidth * (3/4))
|
||||
FormHeight = Int(ClientHeight * (3/4))
|
||||
FormSize<1> = Int( (ClientWidth - FormWidth ) / 2 )
|
||||
FormSize<2> = Int( (ClientHeight - FormHeight ) / 2 )
|
||||
FormSize<3> = FormWidth
|
||||
FormSize<4> = FormHeight
|
||||
FormSize<5> = True$
|
||||
Set_Property(@Window, 'SIZE', FormSize)
|
||||
|
||||
End Event
|
||||
|
||||
|
||||
Event WEBVIEW_MAIN.WEBVIEWCREATED()
|
||||
|
||||
|
||||
OIWizardURL = Get_Property(@Window, '@BASE_URL')
|
||||
NavPage = Get_Property(@Window, '@INIT_NAV_PAGE')
|
||||
NavTo = OIWizardURL:NavPage
|
||||
@ -49,7 +60,7 @@ end event
|
||||
|
||||
|
||||
Event WEBVIEW_MAIN.WEBNAVIGATED(NavID, URI, Redirected, UserInitiated, StatusInfo, FrameID)
|
||||
|
||||
|
||||
FirstRender = Get_Property(@Window, '@FIRST_RENDER')
|
||||
If FirstRender then
|
||||
SuccessFlag = Exec_Method(CtrlEntID, "DELETECOOKIES", '*')
|
||||
@ -103,4 +114,3 @@ Event WINDOW.TIMER()
|
||||
|
||||
end event
|
||||
|
||||
|
||||
|
@ -165,7 +165,7 @@ WRITE_RECORD:
|
||||
CassNo = Field(Name, '*', 3)
|
||||
ProcessedDTM = Datetime()
|
||||
// This service will determine if the cassette needs to be marked as complete.
|
||||
Service_Services('PostProcedure', 'SCHEDULE_SERVICES', 'MarkCassProcessed':SD$:WONo:SD$:CassNo:SD$:ProcessedDtm)
|
||||
Service_Services('PostProcedure', 'SCHEDULE_SERVICES', 'UpdateCassProcStatus':SD$:WONo:SD$:CassNo:SD$:ProcessedDtm)
|
||||
|
||||
WfrCount = DCount(Record<WM_IN_SLOT_NO$>, @VM)
|
||||
If WfrCount LT 25 then
|
||||
|
@ -60,6 +60,8 @@ $Insert CUST_EPI_PART_EQUATES
|
||||
$Insert QUOTE_SPEC_EQU
|
||||
$Insert WO_STEP_EQUATES
|
||||
|
||||
Equ NUM_ATTEMPTS$ to 60
|
||||
|
||||
EQU PI$LEFT TO 1
|
||||
EQU PI$TOP TO 2
|
||||
EQU PI$RIGHT TO 3
|
||||
@ -77,7 +79,7 @@ EQU PS$PATTERN TO 11
|
||||
Declare function PSN_Services, SRP_Rotate_Array, Datetime, Database_Services, Environment_Services, Logging_Services
|
||||
Declare function obj_Install, SRP_Json
|
||||
Declare subroutine Database_Services, Set_Status, obj_Wo_Mat_Log, Logging_Services, Extract_Si_Keys, Btree.Extract
|
||||
Declare subroutine SRP_Json
|
||||
Declare subroutine SRP_Json, Update_Index, Delay
|
||||
|
||||
GoToService else
|
||||
Error_Services('Set', Service : ' is not a valid service request within the ' : ServiceModule : ' services module.')
|
||||
@ -218,19 +220,27 @@ Service VerifyWoStepWMIKeyIndex(WMIKey)
|
||||
// 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)
|
||||
Done = False$
|
||||
For AttemptNo = 1 to NUM_ATTEMPTS$
|
||||
If AttemptNo GT 1 then Delay(1)
|
||||
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)
|
||||
Done = True$
|
||||
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 write index transaction to !WM_IN. ':WMIKey
|
||||
If AttemptNo GE NUM_ATTEMPTS$ then
|
||||
ErrorMsg = 'Unable to Lock !WM_IN to add index transaction. ':WMIKey
|
||||
end
|
||||
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
|
||||
Until Done or ErrorMsg
|
||||
Next AttemptNo
|
||||
end else
|
||||
ErrorMsg = 'Unable to Open !WM_IN to add index transaction. ':WMIKey
|
||||
end
|
||||
@ -263,10 +273,9 @@ Service VerifyWOLogWMIKeyIndex(WMIKey)
|
||||
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<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<2> = WMIKey
|
||||
LogData<4> = 'Begin ':Service
|
||||
Logging_Services('AppendLog', objVerifyWMIWoIndexLog, LogData, @RM, @FM)
|
||||
@ -278,32 +287,44 @@ Service VerifyWOLogWMIKeyIndex(WMIKey)
|
||||
If WONo NE '' then
|
||||
WOLogRDSKeys = ''
|
||||
Extract_Si_Keys('WM_IN', 'WO_NO', WONo, WOLogRDSKeys)
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<3> = WONo
|
||||
Logging_Services('AppendLog', objVerifyWMIWoIndexLog, LogData, @RM, @FM)
|
||||
Locate WMIKey in WOLogRDSKeys using @VM setting vPos else
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
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)
|
||||
Done = False$
|
||||
For AttemptNo = 1 to NUM_ATTEMPTS$
|
||||
If AttemptNo GT 1 then Delay(1)
|
||||
Lock BangTable, 0 then
|
||||
Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM
|
||||
PendingTrans := IndexTransactionRow
|
||||
Write PendingTrans on BangTable, 0 then
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<4> = 'Index transaction successfully added.'
|
||||
Logging_Services('AppendLog', objVerifyWMIWoIndexLog, LogData, @RM, @FM)
|
||||
Done = True$
|
||||
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 write index transaction to !WM_IN. ':WMIKey
|
||||
If AttemptNo GE NUM_ATTEMPTS$ then
|
||||
ErrorMsg = 'Error in ':Service:' service. Unable to Lock !WM_IN to add index transaction. ':WMIKey
|
||||
end
|
||||
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
|
||||
Until Done or ErrorMsg
|
||||
Next AttemptNo
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Unable to Open !WM_IN to add index transaction. ':WMIKey
|
||||
end
|
||||
end
|
||||
end else
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<4> = 'WONo for WM_IN ':WMIKey:' is null. Nothing to update.'
|
||||
Logging_Services('AppendLog', objVerifyWMIWoIndexLog, LogData, @RM, @FM)
|
||||
end
|
||||
@ -313,10 +334,12 @@ Service VerifyWOLogWMIKeyIndex(WMIKey)
|
||||
end
|
||||
|
||||
If ErrorMsg NE '' then
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<4> = ErrorMsg
|
||||
Logging_Services('AppendLog', objVerifyWMIWoIndexLog, LogData, @RM, @FM)
|
||||
end
|
||||
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<4> = 'End ':Service
|
||||
Logging_Services('AppendLog', objVerifyWMIWoIndexLog, LogData, @RM, @FM)
|
||||
|
||||
@ -333,10 +356,9 @@ Service VerifyWOMatWMIKeyIndex(WMIKey)
|
||||
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<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<2> = WMIKey
|
||||
LogData<4> = 'Begin ':Service
|
||||
Logging_Services('AppendLog', objVerifyWoMatWmiKeyLog, LogData, @RM, @FM)
|
||||
@ -347,32 +369,44 @@ Service VerifyWOMatWMIKeyIndex(WMIKey)
|
||||
WOMatKey = Field(WMIKey, '*', 1, 1):'*':Field(WMIKey, '*', 3, 1)
|
||||
If WOMatKey NE '' then
|
||||
WOMatWMIKey = Xlate('WO_MAT', WOMatKey, 'WMI_KEY', 'X')
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<3> = WOMatKey
|
||||
Logging_Services('AppendLog', objVerifyWoMatWmiKeyLog, LogData, @RM, @FM)
|
||||
If WOMatWMIKey EQ '' then
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
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)
|
||||
Done = False$
|
||||
For AttemptNo = 1 to NUM_ATTEMPTS$
|
||||
If AttemptNo GT 1 then Delay(1)
|
||||
Lock BangTable, 0 then
|
||||
Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM
|
||||
PendingTrans := IndexTransactionRow
|
||||
Write PendingTrans on BangTable, 0 then
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<4> = 'Index transaction successfully added.'
|
||||
Logging_Services('AppendLog', objVerifyWoMatWmiKeyLog, LogData, @RM, @FM)
|
||||
Done = True$
|
||||
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 write index transaction to !WM_IN. ':WMIKey
|
||||
If AttemptNo GE NUM_ATTEMPTS$ then
|
||||
ErrorMsg = 'Unable to Lock !WM_IN to add index transaction. ':WMIKey
|
||||
end
|
||||
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
|
||||
Until Done or ErrorMsg
|
||||
Next AttemptNo
|
||||
end else
|
||||
ErrorMsg = 'Unable to Open !WM_IN to add index transaction. ':WMIKey
|
||||
end
|
||||
end
|
||||
end else
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<4> = 'WO_MAT key for WM_IN ':WMIKey:' is null. Nothing to update.'
|
||||
Logging_Services('AppendLog', objVerifyWoMatWmiKeyLog, LogData, @RM, @FM)
|
||||
end
|
||||
@ -380,10 +414,12 @@ Service VerifyWOMatWMIKeyIndex(WMIKey)
|
||||
end
|
||||
|
||||
If ErrorMsg NE '' then
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<4> = ErrorMsg
|
||||
Logging_Services('AppendLog', objVerifyWoMatWmiKeyLog, LogData, @RM, @FM)
|
||||
end
|
||||
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<4> = 'End ':Service
|
||||
Logging_Services('AppendLog', objVerifyWoMatWmiKeyLog, LogData, @RM, @FM)
|
||||
|
||||
|
@ -57,21 +57,23 @@ $Insert WO_MAT_EQUATES
|
||||
$Insert WO_LOG_EQUATES
|
||||
$Insert COMPANY_EQUATES
|
||||
$Insert RETURN_TO_FAB_LOTS_EQUATES
|
||||
$INSERT PROD_SPEC_EQUATES
|
||||
$INSERT WO_STEP_EQUATES
|
||||
$INSERT EPI_PART_EQUATES
|
||||
$INSERT CUST_EPI_PART_EQUATES
|
||||
$INSERT PRS_STAGE_EQUATES
|
||||
$insert UNIT_EQUATES
|
||||
$Insert PROD_SPEC_EQUATES
|
||||
$Insert WO_STEP_EQUATES
|
||||
$Insert EPI_PART_EQUATES
|
||||
$Insert CUST_EPI_PART_EQUATES
|
||||
$Insert PRS_STAGE_EQUATES
|
||||
$Insert UNIT_EQUATES
|
||||
|
||||
Equ NUM_ATTEMPTS$ to 60
|
||||
|
||||
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, 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, Btree.Extract
|
||||
Declare subroutine Logging_Services, Btree.Extract, Update_Index, Delay
|
||||
|
||||
GoToService else
|
||||
Error_Services('Set', Service : ' is not a valid service request within the ' : ServiceModule : ' services module.')
|
||||
Error_Services('Set', Service : ' is not a valid service request within the ' : ServiceModule : ' services module.')
|
||||
end
|
||||
|
||||
Return Response else ''
|
||||
@ -93,15 +95,15 @@ Service GetComments(WMOutNo)
|
||||
|
||||
CommentArray = ''
|
||||
WMOutRow = Database_Services('ReadDataRow', 'WM_OUT', WMOutNo)
|
||||
|
||||
CommentDates = Oconv(WMOutRow<WM_OUT_EPP_COMMENT_DATE$>, 'DT')
|
||||
|
||||
CommentDates = Oconv(WMOutRow<WM_OUT_EPP_COMMENT_DATE$>, 'DT')
|
||||
CommentUsers = WMOutRow<WM_OUT_EPP_COMMENT_USER$>
|
||||
Comments = WMOutRow<WM_OUT_EPP_COMMENT_NOTE$>
|
||||
|
||||
|
||||
CommentList = CommentDates :@FM: CommentUsers :@FM: Comments
|
||||
CommentArray = SRP_Rotate_Array(CommentList)
|
||||
Response = CommentArray
|
||||
|
||||
|
||||
End Service
|
||||
|
||||
|
||||
@ -119,35 +121,35 @@ Service AddComment(WMOutNo, Comment, UsernameOpt)
|
||||
WMOutRow = Database_Services('ReadDataRow', 'WM_OUT', WMOutNo)
|
||||
UserName = @USER4
|
||||
If Assigned(UsernameOpt) then
|
||||
If UsernameOpt NE '' then
|
||||
Username = UsernameOpt
|
||||
end
|
||||
end
|
||||
If UsernameOpt NE '' then
|
||||
Username = UsernameOpt
|
||||
end
|
||||
end
|
||||
CommentTime = Datetime()
|
||||
|
||||
OldDates = WMOutRow<WM_OUT_EPP_COMMENT_DATE$>
|
||||
OldUsers = WMOutRow<WM_OUT_EPP_COMMENT_USER$>
|
||||
|
||||
OldDates = WMOutRow<WM_OUT_EPP_COMMENT_DATE$>
|
||||
OldUsers = WMOutRow<WM_OUT_EPP_COMMENT_USER$>
|
||||
OldComments = WMOutRow<WM_OUT_EPP_COMMENT_NOTE$>
|
||||
If (OldDates EQ '' AND OldUsers EQ '' AND OldComments EQ '') then
|
||||
WMOutRow<WM_OUT_EPP_COMMENT_DATE$> = CommentTime
|
||||
WMOutRow<WM_OUT_EPP_COMMENT_USER$> = UserName
|
||||
WMOutRow<WM_OUT_EPP_COMMENT_NOTE$> = Comment
|
||||
end else
|
||||
WMOutRow<WM_OUT_EPP_COMMENT_DATE$> = CommentTime :@VM: OldDates
|
||||
WMOutRow<WM_OUT_EPP_COMMENT_USER$> = UserName :@VM: OldUsers
|
||||
WMOutRow<WM_OUT_EPP_COMMENT_NOTE$> = Comment :@VM: OldComments
|
||||
end
|
||||
Database_Services('WriteDataRow', 'WM_OUT', WMOutNo, WMOutRow, 1, 0, 0)
|
||||
|
||||
If (OldDates EQ '' AND OldUsers EQ '' AND OldComments EQ '') then
|
||||
WMOutRow<WM_OUT_EPP_COMMENT_DATE$> = CommentTime
|
||||
WMOutRow<WM_OUT_EPP_COMMENT_USER$> = UserName
|
||||
WMOutRow<WM_OUT_EPP_COMMENT_NOTE$> = Comment
|
||||
end else
|
||||
WMOutRow<WM_OUT_EPP_COMMENT_DATE$> = CommentTime :@VM: OldDates
|
||||
WMOutRow<WM_OUT_EPP_COMMENT_USER$> = UserName :@VM: OldUsers
|
||||
WMOutRow<WM_OUT_EPP_COMMENT_NOTE$> = Comment :@VM: OldComments
|
||||
end
|
||||
Database_Services('WriteDataRow', 'WM_OUT', WMOutNo, WMOutRow, 1, 0, 0)
|
||||
|
||||
End Service
|
||||
|
||||
|
||||
Service ConvertRecordToJSON(KeyID, Record, ItemURL)
|
||||
|
||||
jsonRecord = ''
|
||||
|
||||
|
||||
If KeyID NE '' then
|
||||
|
||||
|
||||
If Record EQ '' then Record = Database_Services('ReadDataRow', 'WM_OUT', KeyID)
|
||||
If Error_Services('NoError') then
|
||||
@DICT = Database_Services('GetTableHandle', 'DICT.WM_OUT')
|
||||
@ -167,9 +169,9 @@ Service ConvertRecordToJSON(KeyID, Record, ItemURL)
|
||||
SRP_JSON(objWMOut, 'SetValue', 'CURR_WFR_CNT', CurrWfrQty)
|
||||
CustNo = Database_Services('ReadDataColumn', 'WO_LOG', {WO_NO}, WO_LOG_CUST_NO$, True$, 0, False$)
|
||||
CustReshipNo = Database_Services('ReadDataColumn', 'WO_MAT', WoMatKey, WO_MAT_RESHIP_CUST_NO$, True$, 0, False$)
|
||||
If CustReshipNo NE '' then
|
||||
CustNo = CustReshipNo
|
||||
end
|
||||
If CustReshipNo NE '' then
|
||||
CustNo = CustReshipNo
|
||||
end
|
||||
CustName = Database_Services('ReadDataColumn', 'COMPANY', CustNo, COMPANY_CO_NAME$, True$, 0, False$)
|
||||
CustAbbrev = Database_Services('ReadDataColumn', 'COMPANY', CustNo, COMPANY_ABBREV$, True$, 0, False$)
|
||||
SRP_JSON(objWMOut, 'SetValue', 'CustNo', CustNo)
|
||||
@ -229,16 +231,16 @@ Service ConvertRecordToJSON(KeyID, Record, ItemURL)
|
||||
For each RTFRecordId in AllRTFRecords using @VM setting vPos
|
||||
objRTF = ''
|
||||
If SRP_JSON(objRTF, 'New', 'Object') then
|
||||
RTFRecord = Database_Services('ReadDataRow', 'RETURN_TO_FAB_LOTS', RTFRecordId, True$, 0, False$)
|
||||
SRP_JSON(objRTF, 'SetValue', 'ReturnToFabLotsId', RTFRecordId)
|
||||
SRP_JSON(objRTF, 'SetValue', 'StartDtm', OConv(RTFRecord<RETURN_TO_FAB_LOTS_MH_INIT_DTM$>, 'DT'))
|
||||
SRP_JSON(objRTF, 'SetValue', 'Completed', RTFRecord<RETURN_TO_FAB_LOTS_COMPLETED$>, 'Boolean')
|
||||
SRP_JSON(objRTFRecords, 'Set', 'ReturnToFabRecord', objRTF)
|
||||
SRP_JSON(objRTFRecords, 'Add', objRTF)
|
||||
SRP_JSON(objRTF, 'Release')
|
||||
RTFRecord = Database_Services('ReadDataRow', 'RETURN_TO_FAB_LOTS', RTFRecordId, True$, 0, False$)
|
||||
SRP_JSON(objRTF, 'SetValue', 'ReturnToFabLotsId', RTFRecordId)
|
||||
SRP_JSON(objRTF, 'SetValue', 'StartDtm', OConv(RTFRecord<RETURN_TO_FAB_LOTS_MH_INIT_DTM$>, 'DT'))
|
||||
SRP_JSON(objRTF, 'SetValue', 'Completed', RTFRecord<RETURN_TO_FAB_LOTS_COMPLETED$>, 'Boolean')
|
||||
SRP_JSON(objRTFRecords, 'Set', 'ReturnToFabRecord', objRTF)
|
||||
SRP_JSON(objRTFRecords, 'Add', objRTF)
|
||||
SRP_JSON(objRTF, 'Release')
|
||||
end
|
||||
Next RTFRecordId
|
||||
|
||||
|
||||
SRP_JSON(objWMOut, 'Set', 'ReturnToFabRecords', objRTFRecords)
|
||||
SRP_JSON(objRTFRecords, 'Release')
|
||||
end
|
||||
@ -277,7 +279,7 @@ Service ConvertRecordToJSON(KeyID, Record, ItemURL)
|
||||
end else
|
||||
Error_Services('Add', 'KeyID argument was missing in the ' : Service : ' service.')
|
||||
end
|
||||
|
||||
|
||||
Response = jsonRecord
|
||||
|
||||
End Service
|
||||
@ -293,9 +295,9 @@ End Service
|
||||
// Rows are @FM delimted while columns are @VM delimited.
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service GetWMOData(WorkOrderNo, Columns, ShowGasGauge, WMOOverrideList)
|
||||
|
||||
|
||||
WMOList = ''
|
||||
|
||||
|
||||
If ( (WorkOrderNo NE '') or (WMOOverrideList NE '') ) then
|
||||
If ShowGasGauge NE True$ then ShowGasGauge = False$
|
||||
rv = Set_Status(0)
|
||||
@ -331,28 +333,28 @@ Service GetWMOData(WorkOrderNo, Columns, ShowGasGauge, WMOOverrideList)
|
||||
If Error_Services('NoError') then
|
||||
For each Column in Columns using @VM setting vPos
|
||||
Begin Case
|
||||
Case Column EQ 'HOLD'
|
||||
HoldStatus = Calculate(Column)
|
||||
If HoldStatus EQ True$ then
|
||||
HoldStatus = 'On Hold'
|
||||
end else
|
||||
HoldStatus = 'Off Hold'
|
||||
end
|
||||
WMOList<fPos, vPos> = HoldStatus
|
||||
Case Otherwise$
|
||||
Val = Calculate(Column)
|
||||
Conv = Xlate('DICT.WM_OUT', Column, DICT_CONV$, 'X')
|
||||
If Conv NE '' then
|
||||
Val = OConv(Val, Conv)
|
||||
end
|
||||
WMOList<fPos, vPos> = Val
|
||||
Case Column EQ 'HOLD'
|
||||
HoldStatus = Calculate(Column)
|
||||
If HoldStatus EQ True$ then
|
||||
HoldStatus = 'On Hold'
|
||||
end else
|
||||
HoldStatus = 'Off Hold'
|
||||
end
|
||||
WMOList<fPos, vPos> = HoldStatus
|
||||
Case Otherwise$
|
||||
Val = Calculate(Column)
|
||||
Conv = Xlate('DICT.WM_OUT', Column, DICT_CONV$, 'X')
|
||||
If Conv NE '' then
|
||||
Val = OConv(Val, Conv)
|
||||
end
|
||||
WMOList<fPos, vPos> = Val
|
||||
End Case
|
||||
Next Column
|
||||
end else
|
||||
Error_Services('Add', 'Error reading WM_OUT Record ' : @ID : ' in the ' : Service : ' service.')
|
||||
end
|
||||
* update the gauge
|
||||
If ShowGasGauge then Msg(@Window, MsgUp, fPos, MSGINSTUPDATE$)
|
||||
If ShowGasGauge then Msg(@Window, MsgUp, fPos, MSGINSTUPDATE$)
|
||||
Next @ID
|
||||
end else
|
||||
Error_Services('Add', 'Error opening WM_OUT dictionary in the ' : Service : ' service.')
|
||||
@ -363,7 +365,7 @@ Service GetWMOData(WorkOrderNo, Columns, ShowGasGauge, WMOOverrideList)
|
||||
end
|
||||
If ShowGasGauge then Msg(@Window, MsgUp) ;* take down the gauge
|
||||
Response = WMOList
|
||||
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -408,50 +410,129 @@ Service GetWaferMap(WMOKey)
|
||||
end service
|
||||
|
||||
Service SetVoidFlag(WMOutKey, Username)
|
||||
ErrorMessage = ''
|
||||
If RowExists('WM_OUT', WMOutKey) then
|
||||
WMOutRec = Database_Services('ReadDataRow', 'WM_OUT', WMOutKey, True$, 0, False$)
|
||||
If Error_Services('NoError') then
|
||||
WMOutRec<WM_OUT_VOID$> = True$
|
||||
Database_Services('WriteDataRow', 'WM_OUT', WMOutKey, WMOutRec, True$, False, False$)
|
||||
If Error_Services('NoError') then
|
||||
Set_Status(0)
|
||||
WONo = Field(WMOutKey, '*', 1)
|
||||
CassNo = Field(WMOutKey, '*', 3)
|
||||
WOMLParms = ''
|
||||
LogFile = 'WO_MAT' ; WOMLParms = LogFile:@RM
|
||||
LogDTM = OConv(Datetime(), 'DT') ; WOMLParms := LogDTM:@RM
|
||||
Action = 'WM_OUT_VOID' ; WOMLParms := Action:@RM
|
||||
WhCd = 'CR' ; WOMLParms := WhCd:@RM
|
||||
LocCd = 'VOID' ; WOMLParms := LocCd:@RM
|
||||
WONos = WONo ; WOMLParms := WONos:@RM
|
||||
CassNos = CassNo ; WOMLParms := CassNos:@RM
|
||||
UserID = Username ; WOMLParms := UserID:@RM
|
||||
Tags = '' ; WOMLParms := Tags:@RM
|
||||
ToolID = '' ; WOMLParms := ToolID:@RM
|
||||
WOMLParms := ''
|
||||
obj_WO_Mat_Log('Create',WOMLParms)
|
||||
IF Get_Status(errCode) THEN
|
||||
ErrorMessage = 'Error writing inventory transactions'
|
||||
end
|
||||
end else
|
||||
ErrorMessage = 'Failed to write to the WM_OUT record ' : WMOutKey : ' while attempting to set void status.'
|
||||
end
|
||||
end else
|
||||
ErrorMessage = 'Failed to read WM_OUT record ' : WMOutKey : ' while attempting to set void status.'
|
||||
end
|
||||
end else
|
||||
ErrorMessage = 'Invalid WM_OUT Key ' : WMOutKey : ' passed to SetVoidFlag routine.'
|
||||
end
|
||||
If ErrorMessage NE '' then
|
||||
Error_Services('Add', ErrorMessage)
|
||||
end
|
||||
|
||||
ErrorMessage = ''
|
||||
If RowExists('WM_OUT', WMOutKey) then
|
||||
WMOutRec = Database_Services('ReadDataRow', 'WM_OUT', WMOutKey, True$, 0, False$)
|
||||
If Error_Services('NoError') then
|
||||
WMOutRec<WM_OUT_VOID$> = True$
|
||||
Database_Services('WriteDataRow', 'WM_OUT', WMOutKey, WMOutRec, True$, False, False$)
|
||||
If Error_Services('NoError') then
|
||||
Set_Status(0)
|
||||
WONo = Field(WMOutKey, '*', 1)
|
||||
CassNo = Field(WMOutKey, '*', 3)
|
||||
WOMLParms = ''
|
||||
LogFile = 'WO_MAT' ; WOMLParms = LogFile:@RM
|
||||
LogDTM = OConv(Datetime(), 'DT') ; WOMLParms := LogDTM:@RM
|
||||
Action = 'WM_OUT_VOID' ; WOMLParms := Action:@RM
|
||||
WhCd = 'CR' ; WOMLParms := WhCd:@RM
|
||||
LocCd = 'VOID' ; WOMLParms := LocCd:@RM
|
||||
WONos = WONo ; WOMLParms := WONos:@RM
|
||||
CassNos = CassNo ; WOMLParms := CassNos:@RM
|
||||
UserID = Username ; WOMLParms := UserID:@RM
|
||||
Tags = '' ; WOMLParms := Tags:@RM
|
||||
ToolID = '' ; WOMLParms := ToolID:@RM
|
||||
WOMLParms := ''
|
||||
obj_WO_Mat_Log('Create',WOMLParms)
|
||||
IF Get_Status(errCode) THEN
|
||||
ErrorMessage = 'Error writing inventory transactions'
|
||||
end
|
||||
end else
|
||||
ErrorMessage = 'Failed to write to the WM_OUT record ' : WMOutKey : ' while attempting to set void status.'
|
||||
end
|
||||
end else
|
||||
ErrorMessage = 'Failed to read WM_OUT record ' : WMOutKey : ' while attempting to set void status.'
|
||||
end
|
||||
end else
|
||||
ErrorMessage = 'Invalid WM_OUT Key ' : WMOutKey : ' passed to SetVoidFlag routine.'
|
||||
end
|
||||
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$)
|
||||
|
||||
LogData = ''
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
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<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<3> = WOStepKey
|
||||
Logging_Services('AppendLog', objVerifyWMOKeyLog, LogData, @RM, @FM)
|
||||
Locate WMOKey in WOStepWMOKeys using @VM setting vPos else
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
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
|
||||
Done = False$
|
||||
For AttemptNo = 1 to NUM_ATTEMPTS$
|
||||
If AttemptNo GT 1 then Delay(1)
|
||||
Lock BangTable, 0 then
|
||||
Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM
|
||||
PendingTrans := IndexTransactionRow
|
||||
Write PendingTrans on BangTable, 0 then
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<4> = 'Index transaction successfully added.'
|
||||
Logging_Services('AppendLog', objVerifyWMOKeyLog, LogData, @RM, @FM)
|
||||
Done = True$
|
||||
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
|
||||
If AttemptNo GE NUM_ATTEMPTS$ then
|
||||
ErrorMsg = 'Unable to Lock !WM_OUT to add index transaction. ':WMOKey
|
||||
end
|
||||
end
|
||||
Until Done or ErrorMsg
|
||||
Next AttemptNo
|
||||
end else
|
||||
ErrorMsg = 'Unable to Open !WM_OUT to add index transaction. ':WMOKey
|
||||
end
|
||||
end
|
||||
end else
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
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<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<4> = ErrorMsg
|
||||
Logging_Services('AppendLog', objVerifyWMOKeyLog, LogData, @RM, @FM)
|
||||
end
|
||||
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<4> = 'End ':Service
|
||||
Logging_Services('AppendLog', objVerifyWMOKeyLog, LogData, @RM, @FM)
|
||||
|
||||
If ErrorMsg NE '' then Error_Services('Add', ErrorMsg)
|
||||
|
||||
end service
|
||||
|
||||
Service VerifyRelationalIndexes(WMOKey)
|
||||
|
||||
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WM_OUT'
|
||||
LogDate = Oconv(Date(), 'D4/')
|
||||
LogTime = Oconv(Time(), 'MTS')
|
||||
@ -468,39 +549,61 @@ Service VerifyWoStepWMOKeyIndex(WMOKey)
|
||||
|
||||
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
|
||||
|
||||
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)
|
||||
|
||||
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)
|
||||
|
||||
If RowExists('WM_OUT', WMOKey) then
|
||||
IndexTransactionRow = 'WO_STEP*WM_OUT_KEYS*AR':@FM:WMOKey:@FM:"":@FM:WOStepKey:@FM
|
||||
end else
|
||||
IndexTransactionRow = 'WO_STEP*WM_OUT_KEYS*AR':@FM:WMOKey:@FM:WOStepKey:@FM:"":@FM
|
||||
end
|
||||
Done = False$
|
||||
For AttemptNo = 1 to NUM_ATTEMPTS$
|
||||
If AttemptNo GT 1 then Delay(1)
|
||||
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
|
||||
Done = True$
|
||||
LogData<4> = 'Index transaction successfully added.'
|
||||
Logging_Services('AppendLog', objVerifyWMOKeyLog, LogData, @RM, @FM)
|
||||
end else
|
||||
If AttemptNo GE NUM_ATTEMPTS$ then
|
||||
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
|
||||
end
|
||||
Unlock BangTable, 0 else ErrorMsg = 'Unable to Open !WM_OUT to add index transaction. ':WMOKey
|
||||
end else
|
||||
If AttemptNo GE NUM_ATTEMPTS$ then
|
||||
ErrorMsg = 'Unable to Lock !WM_OUT to add index transaction. ':WMOKey
|
||||
end
|
||||
end else
|
||||
end
|
||||
end else
|
||||
If AttemptNo GE NUM_ATTEMPTS$ then
|
||||
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)
|
||||
Until Done or ErrorMsg
|
||||
Next AttemptNo
|
||||
If Done then
|
||||
ErrCode = ''
|
||||
Update_Index('WM_OUT', 'WO_STEP_KEY', False$, True$)
|
||||
If Get_Status(ErrCode) then
|
||||
ErrorMsg = 'Error in ':Service:' service. Update_Index call failed. Error code: ':ErrCode
|
||||
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
|
||||
|
||||
@ -525,10 +628,9 @@ Service VerifyWOLogWMOKeyIndex(WMOKey)
|
||||
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<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<2> = WMOKey
|
||||
LogData<4> = 'Begin ':Service
|
||||
Logging_Services('AppendLog', objVerifyWMOWoIndexLog, LogData, @RM, @FM)
|
||||
@ -540,6 +642,7 @@ Service VerifyWOLogWMOKeyIndex(WMOKey)
|
||||
If WONo NE '' then
|
||||
WOLogRDSKeys = ''
|
||||
Extract_Si_Keys('WM_OUT', 'WO_NO', WONo, WOLogRDSKeys)
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<3> = WONo
|
||||
Logging_Services('AppendLog', objVerifyWMOWoIndexLog, LogData, @RM, @FM)
|
||||
Locate WMOKey in WOLogRDSKeys using @VM setting vPos else
|
||||
@ -548,24 +651,34 @@ Service VerifyWOLogWMOKeyIndex(WMOKey)
|
||||
// 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)
|
||||
Done = False$
|
||||
For AttemptNo = 1 to NUM_ATTEMPTS$
|
||||
If AttemptNo GT 1 then Delay(1)
|
||||
Lock BangTable, 0 then
|
||||
Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM
|
||||
PendingTrans := IndexTransactionRow
|
||||
Write PendingTrans on BangTable, 0 then
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<4> = 'Index transaction successfully added.'
|
||||
Logging_Services('AppendLog', objVerifyWMOWoIndexLog, LogData, @RM, @FM)
|
||||
Done = True$
|
||||
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 write index transaction to !WM_OUT. ':WMOKey
|
||||
If AttemptNo GE NUM_ATTEMPTS$ then
|
||||
ErrorMsg = 'Error in ':Service:' service. Unable to Lock !WM_OUT to add index transaction. ':WMOKey
|
||||
end
|
||||
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
|
||||
Until Done or ErrorMsg
|
||||
Next AttemptNo
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Unable to Open !WM_OUT to add index transaction. ':WMOKey
|
||||
end
|
||||
end
|
||||
end else
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<4> = 'WONo for WM_OUT ':WMOKey:' is null. Nothing to update.'
|
||||
Logging_Services('AppendLog', objVerifyWMOWoIndexLog, LogData, @RM, @FM)
|
||||
end
|
||||
@ -575,10 +688,12 @@ Service VerifyWOLogWMOKeyIndex(WMOKey)
|
||||
end
|
||||
|
||||
If ErrorMsg NE '' then
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<4> = ErrorMsg
|
||||
Logging_Services('AppendLog', objVerifyWMOWoIndexLog, LogData, @RM, @FM)
|
||||
end
|
||||
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<4> = 'End ':Service
|
||||
Logging_Services('AppendLog', objVerifyWMOWoIndexLog, LogData, @RM, @FM)
|
||||
|
||||
@ -595,10 +710,9 @@ Service VerifyWOMatWMOKeyIndex(WMOKey)
|
||||
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<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<2> = WMOKey
|
||||
LogData<4> = 'Begin ':Service
|
||||
Logging_Services('AppendLog', objVerifyWOMatWmoKeyLog, LogData, @RM, @FM)
|
||||
@ -609,32 +723,44 @@ Service VerifyWOMatWMOKeyIndex(WMOKey)
|
||||
WOMatKey = Field(WMOKey, '*', 1, 1):'*':Field(WMOKey, '*', 3, 1)
|
||||
If WOMatKey NE '' then
|
||||
WOMatWMOKey = Xlate('WO_MAT', WOMatKey, 'WMO_KEY', 'X')
|
||||
LogData<3> = WOMatKey
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<3> = WOMatKey
|
||||
Logging_Services('AppendLog', objVerifyWOMatWmoKeyLog, LogData, @RM, @FM)
|
||||
If WOMatWMOKey EQ '' then
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
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)
|
||||
Done = False$
|
||||
For AttemptNo = 1 to NUM_ATTEMPTS$
|
||||
If AttemptNo GT 1 then Delay(1)
|
||||
Lock BangTable, 0 then
|
||||
Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM
|
||||
PendingTrans := IndexTransactionRow
|
||||
Write PendingTrans on BangTable, 0 then
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<4> = 'Index transaction successfully added.'
|
||||
Logging_Services('AppendLog', objVerifyWOMatWmoKeyLog, LogData, @RM, @FM)
|
||||
Done = True$
|
||||
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 write index transaction to !WM_OUT. ':WMOKey
|
||||
If AttemptNo GE NUM_ATTEMPTS$ then
|
||||
ErrorMsg = 'Unable to Lock !WM_OUT to add index transaction. ':WMOKey
|
||||
end
|
||||
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
|
||||
Until Done or ErrorMsg
|
||||
Next AttemptNo
|
||||
end else
|
||||
ErrorMsg = 'Unable to Open !WM_OUT to add index transaction. ':WMOKey
|
||||
end
|
||||
end
|
||||
end else
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<4> = 'WO_MAT key for WM_OUT ':WMOKey:' is null. Nothing to update.'
|
||||
Logging_Services('AppendLog', objVerifyWOMatWmoKeyLog, LogData, @RM, @FM)
|
||||
end
|
||||
@ -642,10 +768,12 @@ Service VerifyWOMatWMOKeyIndex(WMOKey)
|
||||
end
|
||||
|
||||
If ErrorMsg NE '' then
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<4> = ErrorMsg
|
||||
Logging_Services('AppendLog', objVerifyWOMatWmoKeyLog, LogData, @RM, @FM)
|
||||
end
|
||||
|
||||
LogData<1> = OConv(Datetime(), 'DT/^S')
|
||||
LogData<4> = 'End ':Service
|
||||
Logging_Services('AppendLog', objVerifyWOMatWmoKeyLog, LogData, @RM, @FM)
|
||||
|
||||
@ -653,6 +781,7 @@ Service VerifyWOMatWMOKeyIndex(WMOKey)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service GetWMOutKeys(WOLogId)
|
||||
|
||||
ErrorMsg = ''
|
||||
@ -703,7 +832,7 @@ Service GetWmOutZpl(WmOutKey)
|
||||
PONo = WORec<WO_LOG_CUST_PO_NO$>
|
||||
PSNo = XLATE('WO_STEP',WONo:'*':WOStep,WO_STEP_PROD_SPEC_ID$,'X')
|
||||
PSRec = XLATE('PROD_SPEC',PSNo,'','X')
|
||||
|
||||
|
||||
CustSpecNo = ''
|
||||
IF Captive THEN
|
||||
CustSpecNos = PSRec<PROD_SPEC_SPEC_NUM$>
|
||||
@ -721,7 +850,7 @@ Service GetWmOutZpl(WmOutKey)
|
||||
UNTIL CustSpecNo NE ''
|
||||
NEXT I
|
||||
END
|
||||
|
||||
|
||||
EpiPartNo = WORec<WO_LOG_EPI_PART_NO$>
|
||||
CustEpiPartRec = XLATE('CUST_EPI_PART',CustNo:'*':EpiPartNo,'','X')
|
||||
ShipBagReq = CustEpiPartRec<CUST_EPI_PART_SHIP_BAG_REQ$>
|
||||
@ -752,13 +881,13 @@ Service GetWmOutZpl(WmOutKey)
|
||||
RecipeNo = XLATE( 'PROD_SPEC', PSNo, 'RECIPE_NO', 'X' )
|
||||
RecipeInfo = XLATE( 'RECIPE', RecipeNo, 'RECIPE_NAME_NO', 'X' )
|
||||
CleaningReqs = ''
|
||||
|
||||
|
||||
ThickCnt = FIELDCOUNT( ThickTarget<1>, @VM )
|
||||
PrintThickTargets = ''
|
||||
FOR J = 1 TO ThickCnt
|
||||
PrintThickTargets<1,J> = ThickTarget<1,J>:ThickUnit<1,J>
|
||||
NEXT J
|
||||
|
||||
|
||||
ResCnt = FIELDCOUNT( ResTarget<1>, @VM )
|
||||
PrintResTargets = ''
|
||||
FOR J = 1 TO ResCnt
|
||||
@ -769,30 +898,30 @@ Service GetWmOutZpl(WmOutKey)
|
||||
END
|
||||
PrintResTargets<1,J> = TargetVal:ResUnit<1,J>
|
||||
NEXT J
|
||||
|
||||
|
||||
APreRec = ''
|
||||
APostRec = ''
|
||||
IF ( PreAkrionRecipe<1> <> '' ) THEN
|
||||
APreRec = ' ':PreAkrionRecipe:' '
|
||||
SubOxide = 'No' ;* If Akrion then no oxide strip
|
||||
END
|
||||
|
||||
|
||||
IF ( PostAkrionRecipe<1> <> '' ) THEN
|
||||
APostRec = ' ':PostAkrionRecipe
|
||||
END
|
||||
|
||||
|
||||
PrintCleaningReqs = TRIM( 'Strip:':SubOxide:' Pre:':SubPreClean:APreRec:' Post:':SubPostClean:APostRec )
|
||||
|
||||
|
||||
swap UNIT_MICROMETER$ with 'um' in PrintThickTargets
|
||||
swap UNIT_OHM_CM$ with 'ohm.cm' in PrintThickTargets
|
||||
swap UNIT_OHM_PER_SQ$ with 'ohm/sq' in PrintThickTargets
|
||||
swap UNIT_A$ with 'A' in PrintThickTargets
|
||||
|
||||
|
||||
swap UNIT_MICROMETER$ with 'um' in PrintResTargets
|
||||
swap UNIT_OHM_CM$ with 'ohm.cm' in PrintResTargets
|
||||
swap UNIT_OHM_PER_SQ$ with 'ohm/sq' in PrintResTargets
|
||||
swap UNIT_A$ with 'A' in PrintResTargets
|
||||
|
||||
|
||||
MakeupBox = XLATE('WM_OUT',WMOutKey,WM_OUT_MAKEUP_BOX$ ,'X')
|
||||
|
||||
PrintWMOutKey = WMOutKey
|
||||
@ -949,3 +1078,5 @@ Service GetWmOutZpl(WmOutKey)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -215,15 +215,20 @@ FORM_CREATE:
|
||||
END
|
||||
|
||||
DailySchedName = 'WO_DAILY_SCHED':I
|
||||
DSR = XLATE( 'CONFIG', DailySchedName, '', 'X' )
|
||||
WOCust = DSR<WOCust$>
|
||||
WO = FIELD( WOCust, ' ', 1 )
|
||||
Cust = FIELD( WOCust, ' ', 2, 999 )
|
||||
DSR = XLATE( 'CONFIG', DailySchedName, '', 'X' )
|
||||
WOCust = DSR<WOCust$>
|
||||
WO = FIELD( WOCust, ' ', 1 )
|
||||
Cust = FIELD( WOCust, ' ', 2, 999 )
|
||||
|
||||
Size = Xlate('REACTOR', I, REACTOR_SUSC_POCKET_SIZE$, 'X')
|
||||
Size = Field(Size, ' ' , 3, 2)
|
||||
|
||||
CONVERT ' ' TO '' IN Size
|
||||
Begin Case
|
||||
Case Index(Size, '6', 1)
|
||||
Size = '6in'
|
||||
Case Index(Size, '8', 1)
|
||||
Size = '8in'
|
||||
Case Otherwise$
|
||||
Size = ''
|
||||
End Case
|
||||
|
||||
WONo = WO[1,'.']
|
||||
|
||||
@ -325,4 +330,3 @@ REACT_DETAIL:
|
||||
return
|
||||
*===============================================================================================*
|
||||
|
||||
|
||||
|
@ -42,14 +42,15 @@ Function WO_LOG_Actions(Action, CalcColName, FSList, Handle, Name, FMC, Record,
|
||||
|
||||
***********************************************************************************************************************/
|
||||
#pragma precomp SRP_PreCompiler
|
||||
$insert APP_INSERTS
|
||||
$insert FILE.SYSTEM.EQUATES
|
||||
$insert ACTION_SETUP
|
||||
$insert WO_MAT_EQUATES
|
||||
$insert WO_LOG_EQUATES
|
||||
$insert WO_STEP_EQUATES
|
||||
$insert RLIST_EQUATES
|
||||
$insert SCHED_DET_NG_EQUATES
|
||||
$Insert APP_INSERTS
|
||||
$Insert FILE.SYSTEM.EQUATES
|
||||
$Insert ACTION_SETUP
|
||||
$Insert WO_MAT_EQUATES
|
||||
$Insert WO_LOG_EQUATES
|
||||
$Insert WO_STEP_EQUATES
|
||||
$Insert RLIST_EQUATES
|
||||
$Insert SCHED_DET_NG_EQUATES
|
||||
$Insert IFX_EQUATES
|
||||
|
||||
Equ Comma$ to ','
|
||||
|
||||
@ -57,7 +58,7 @@ Declare function Error_Services, Database_Services, Environment_Services, Logg
|
||||
Declare function GaN_Services, obj_WO_Log, SRP_Date
|
||||
Declare subroutine Error_Services, Database_Services, Environment_Services, Logging_Services, Obj_SAP
|
||||
Declare subroutine Logging_Services, Set_Status, Schedule_Services, Work_Order_Services, obj_Notes
|
||||
Declare subroutine Schedule_Services
|
||||
Declare subroutine Schedule_Services, Service_Services
|
||||
|
||||
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WO_LOG'
|
||||
LogDate = Oconv(Date(), 'D4/')
|
||||
@ -205,12 +206,12 @@ WRITE_RECORD_PRE:
|
||||
|
||||
OrigQty = OrigRecord<WO_LOG_QTY$>
|
||||
NewQty = Record<WO_LOG_QTY$>
|
||||
ModifyQty = NewQty - OrigQty
|
||||
OrigCassList = OrigRecord<WO_LOG_WO_MAT_KEY$>
|
||||
NewCassList = Record<WO_LOG_WO_MAT_KEY$>
|
||||
If ( (OrigQty NE NewQty) or (OrigCassList NE NewCassList) ) then
|
||||
// Update released, unreleased, and received quantities
|
||||
RelQty = obj_WO_Log('RelQty', Name:@RM:Record)
|
||||
Record<WO_LOG_REL_QTY_STATIC$> = RelQty
|
||||
// Update unreleased, open (i.e., not received) quantities
|
||||
RelQty = OrigRecord<WO_LOG_REL_QTY_STATIC$>
|
||||
If RelQty GT NewQty then
|
||||
UnRelQty = 0
|
||||
end else
|
||||
@ -218,9 +219,14 @@ WRITE_RECORD_PRE:
|
||||
end
|
||||
Record<WO_LOG_UNREL_QTY_STATIC$> = UnRelQty
|
||||
|
||||
RXQty = obj_WO_Log('RxQty', Name:@RM:Record)
|
||||
Record<WO_LOG_RX_QTY_STATIC$> = RXQty
|
||||
SaveRecord = Record
|
||||
RxQty = OrigRecord<WO_LOG_RX_QTY_STATIC$>
|
||||
If RxQty GT NewQty then
|
||||
OpenQty = 0
|
||||
end else
|
||||
OpenQty = NewQty - RxQty
|
||||
end
|
||||
Record<WO_LOG_OPEN_QTY_STATIC$> = OpenQty
|
||||
SaveRecord = Record
|
||||
end
|
||||
|
||||
// Check if we need to auto-close the work order
|
||||
@ -278,202 +284,7 @@ WRITE_RECORD:
|
||||
NewQty = Record<WO_LOG_QTY$>
|
||||
ModifyQty = NewQty - OrigQty
|
||||
WONo = Name
|
||||
SchedDetNGKey = ''
|
||||
|
||||
Begin Case
|
||||
Case ModifyQty GT 0
|
||||
|
||||
LogData = ''
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<2> = 'WO_LOG_ACTIONS'
|
||||
LogData<3> = 'Work order ':WONo:' quantity increased from ':OrigQty:' to ':NewQty:'.'
|
||||
Schedule_Services('LogActivity', '', LogData, False$)
|
||||
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<3> = 'Searching for a scheduled event to increase the quantity.'
|
||||
Schedule_Services('LogActivity', '', LogData, False$)
|
||||
|
||||
// Search schedule for most recent event and increase that event quantity by the difference.
|
||||
Query = 'SELECT SCHED_DET_NG WITH WO_NO EQ ':WONo:' BY-DSND STOP_DTM'
|
||||
GoSub ClearCursors
|
||||
Set_Status(0)
|
||||
RList(Query, TARGET_ACTIVELIST$, '', '', False$)
|
||||
errCode = ''
|
||||
If Get_Status(errCode) then
|
||||
|
||||
ErrorMsg = 'Error retrieving event list in WO_LOG_Actions. RList error code ':errCode:'.'
|
||||
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<3> = ErrorMsg
|
||||
Schedule_Services('LogActivity', '', LogData, False$)
|
||||
|
||||
Error_Services('Add', ErrorMsg)
|
||||
|
||||
end else
|
||||
|
||||
EOF = False$
|
||||
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<3> = 'Query successful. Number of keys found: ':@RecCount:'.'
|
||||
Schedule_Services('LogActivity', '', LogData, False$)
|
||||
|
||||
ReadNext SchedDetNGKey else EOF = True$
|
||||
If SchedDetNGKey NE '' then
|
||||
EventRec = Database_Services('ReadDataRow', 'SCHED_DET_NG', SchedDetNGKey)
|
||||
StopDTM = EventRec<SCHED_DET_NG.STOP_DTM$>
|
||||
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<3> = 'Work order record ':WONo:' quantity increased from ':OrigQty:' to ':NewQty:'.'
|
||||
Schedule_Services('LogActivity', EventRec<SCHED_DET_NG.REACT_NO$>, LogData, False$)
|
||||
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<3> = 'Scheduled event ':SchedDetNGKey:' found.'
|
||||
Schedule_Services('LogActivity', EventRec<SCHED_DET_NG.REACT_NO$>, LogData, False$)
|
||||
|
||||
// Only modify the event if it is still running or is scheduled in the future.
|
||||
If StopDTM GT Datetime() then
|
||||
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<3> = 'Event stop DTM ':OConv(StopDtm, 'DT2/^H'):' less than current DTM, so increasing event quantity.'
|
||||
Schedule_Services('LogActivity', EventRec<SCHED_DET_NG.REACT_NO$>, LogData, False$)
|
||||
|
||||
ReactNo = EventRec<SCHED_DET_NG.REACT_NO$>
|
||||
WONo = EventRec<SCHED_DET_NG.WO_NO$>
|
||||
StartDTM = EventRec<SCHED_DET_NG.START_DTM$>
|
||||
Desc = EventRec<SCHED_DET_NG.DESC$>
|
||||
EventQty = EventRec<SCHED_DET_NG.EVENT_TOTAL_WFRS$>
|
||||
NewEventQty = EventQty + ModifyQty
|
||||
Schedule_Services('ModifySchedEvent', SchedDetNGKey, ReactNo, WONo, StartDTM, StopDTM, Desc, NewEventQty)
|
||||
// Adjust reactor events as needed.
|
||||
Schedule_Services('AdjustScheduleEvents', ReactNo)
|
||||
|
||||
end else
|
||||
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<3> = 'Event stop DTM ':OConv(StopDtm, 'DT2/^H'):' greater than current DTM.'
|
||||
Schedule_Services('LogActivity', EventRec<SCHED_DET_NG.REACT_NO$>, LogData, False$)
|
||||
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<3> = 'Event quantity not increased.'
|
||||
Schedule_Services('LogActivity', EventRec<SCHED_DET_NG.REACT_NO$>, LogData, False$)
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
GoSub ClearCursors
|
||||
Case ModifyQty LT 0
|
||||
|
||||
LogData = ''
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<2> = 'WO_LOG_ACTIONS'
|
||||
LogData<3> = 'Work order ':WONo:' quantity decreased from ':OrigQty:' to ':NewQty:'.'
|
||||
Schedule_Services('LogActivity', '', LogData, False$)
|
||||
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<3> = 'Searching for a scheduled event to decrease the quantity.'
|
||||
Schedule_Services('LogActivity', '', LogData, False$)
|
||||
|
||||
// Search schedule for most recent events and decrease/delete those events as needed.
|
||||
Query = 'SELECT SCHED_DET_NG WITH WO_NO EQ ':WONo:' BY-DSND STOP_DTM'
|
||||
GoSub ClearCursors
|
||||
Set_Status(0)
|
||||
RList(Query, TARGET_ACTIVELIST$, '', '', False$)
|
||||
errCode = ''
|
||||
|
||||
If Get_Status(errCode) then
|
||||
|
||||
ErrorMsg = 'Error retrieving event list in WO_LOG_Actions. RList error code ':errCode:'.'
|
||||
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<3> = ErrorMsg
|
||||
Schedule_Services('LogActivity', '', LogData, False$)
|
||||
|
||||
Error_Services('Add', ErrorMsg)
|
||||
|
||||
end else
|
||||
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<3> = 'Query successful. Number of keys found: ':@RecCount:'.'
|
||||
Schedule_Services('LogActivity', '', LogData, False$)
|
||||
|
||||
EOF = False$
|
||||
Done = False$
|
||||
UpdateReq = False$
|
||||
Loop
|
||||
ReadNext SchedDetNGKey else EOF = True$
|
||||
Until EOF EQ True$
|
||||
If SchedDetNGKey NE '' then
|
||||
EventRec = Database_Services('ReadDataRow', 'SCHED_DET_NG', SchedDetNGKey)
|
||||
StopDTM = EventRec<SCHED_DET_NG.STOP_DTM$>
|
||||
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<3> = 'Work order record ':WONo:' quantity decreased from ':OrigQty:' to ':NewQty:'.'
|
||||
Schedule_Services('LogActivity', EventRec<SCHED_DET_NG.REACT_NO$>, LogData, False$)
|
||||
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<3> = 'Scheduled event ':SchedDetNGKey:' found.'
|
||||
Schedule_Services('LogActivity', EventRec<SCHED_DET_NG.REACT_NO$>, LogData, False$)
|
||||
|
||||
// Only modify the event if it is still running or is scheduled in the future.
|
||||
If StopDTM GT Datetime() then
|
||||
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<3> = 'Event stop DTM ':OConv(StopDtm, 'DT2/^H'):' less than current DTM, so decreasing event quantity.'
|
||||
Schedule_Services('LogActivity', EventRec<SCHED_DET_NG.REACT_NO$>, LogData, False$)
|
||||
|
||||
UpdateReq = True$
|
||||
ReactNo = EventRec<SCHED_DET_NG.REACT_NO$>
|
||||
WONo = EventRec<SCHED_DET_NG.WO_NO$>
|
||||
StartDTM = EventRec<SCHED_DET_NG.START_DTM$>
|
||||
Desc = EventRec<SCHED_DET_NG.DESC$>
|
||||
EventQty = EventRec<SCHED_DET_NG.EVENT_TOTAL_WFRS$>
|
||||
If EventQty GT Abs(ModifyQty) then
|
||||
|
||||
// This event has enough wafers, so just reduce the quantity.
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<3> = 'Event quantity ':EventQty:' greater than quantity reduction ':ModifyQty:', so decreasing event quantity.'
|
||||
Schedule_Services('LogActivity', EventRec<SCHED_DET_NG.REACT_NO$>, LogData, False$)
|
||||
|
||||
Done = True$
|
||||
NewEventQty = EventQty + ModifyQty
|
||||
Schedule_Services('ModifySchedEvent', SchedDetNGKey, ReactNo, WONo, StartDTM, StopDTM, Desc, NewEventQty)
|
||||
|
||||
end else
|
||||
|
||||
// This event has fewer wafers than are being removed. Delete this event and continue
|
||||
// onto the next event.
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<3> = 'Event quantity ':EventQty:' less than quantity reduction ':ModifyQty:', so canceling event.'
|
||||
Schedule_Services('LogActivity', EventRec<SCHED_DET_NG.REACT_NO$>, LogData, False$)
|
||||
|
||||
Schedule_Services('CancelScheduleEvent', SchedDetNGKey, True$)
|
||||
ModifyQty += EventQty
|
||||
|
||||
end
|
||||
end else
|
||||
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<3> = 'Event stop DTM ':OConv(StopDtm, 'DT2/^H'):' greater than current DTM.'
|
||||
Schedule_Services('LogActivity', EventRec<SCHED_DET_NG.REACT_NO$>, LogData, False$)
|
||||
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<3> = 'Event quantity not decreased.'
|
||||
Schedule_Services('LogActivity', EventRec<SCHED_DET_NG.REACT_NO$>, LogData, False$)
|
||||
|
||||
end
|
||||
end
|
||||
Until Done EQ True$
|
||||
Repeat
|
||||
If UpdateReq then
|
||||
// Adjust reactor events as needed.
|
||||
Schedule_Services('AdjustScheduleEvents', ReactNo)
|
||||
end
|
||||
end
|
||||
GoSub ClearCursors
|
||||
|
||||
Case Otherwise$
|
||||
Null
|
||||
End Case
|
||||
If ModifyQty NE 0 then Service_Services('PostProcedure', 'SCHEDULE_SERVICES', 'AdjustWorkOrderScheduleQty':SD$:WONo:SD$:ModifyQty)
|
||||
|
||||
return
|
||||
|
||||
|
@ -44,16 +44,17 @@ Function WO_MAT_Actions(Action, CalcColName, FSList, Handle, Name, FMC, Record,
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert FILE.SYSTEM.EQUATES
|
||||
$insert DICT_EQUATES
|
||||
$insert ACTION_SETUP
|
||||
$insert WO_MAT_EQUATES
|
||||
$insert WO_LOG_EQUATES
|
||||
$insert WO_STEP_EQUATES
|
||||
$insert MAKEUP_WAFERS_EQUATES
|
||||
$insert RLIST_EQUATES
|
||||
$insert IFX_EQUATES
|
||||
$Insert APP_INSERTS
|
||||
$Insert FILE.SYSTEM.EQUATES
|
||||
$Insert DICT_EQUATES
|
||||
$Insert ACTION_SETUP
|
||||
$Insert WO_MAT_EQUATES
|
||||
$Insert WO_LOG_EQUATES
|
||||
$Insert WO_STEP_EQUATES
|
||||
$Insert MAKEUP_WAFERS_EQUATES
|
||||
$Insert WM_OUT_EQUATES
|
||||
$Insert RLIST_EQUATES
|
||||
$Insert IFX_EQUATES
|
||||
|
||||
Equ Comma$ to ','
|
||||
|
||||
@ -269,45 +270,45 @@ return
|
||||
WRITE_RECORD_PRE:
|
||||
|
||||
WOMatKeyID = Name
|
||||
|
||||
CriticalFields = WO_MAT_RDS_NO$:@VM:WO_MAT_LOT_NO$:@VM:WO_MAT_WAFER_QTY$:@VM:WO_MAT_CUST_PART_NO$:@VM
|
||||
CriticalFields := WO_MAT_SUB_PART_NO$:@VM:WO_MAT_INV_ACTION$:@VM:WO_MAT_SLOT_NO$:@VM:WO_MAT_RX_DTM$:@VM
|
||||
CriticalFields := WO_MAT_RX_BY$:@VM:WO_MAT_REL_DTM$:@VM:WO_MAT_REL_BY$:@VM:WO_MAT_SUB_VEND_CD$:@VM
|
||||
CriticalFields := WO_MAT_CASS_SHIP_QTY$:@VM:WO_MAT_SHIP_SHORT$:@VM:WO_MAT_MU_WAFER_FLAG$
|
||||
|
||||
For each CriticalField in CriticalFields using @VM setting vPos
|
||||
|
||||
If ( (OrigRecord<CriticalField> NE '') and (Record<CriticalField> EQ '') ) then
|
||||
WOMatFieldNos = Xlate('DICT.WO_MAT', '%FIELDS%', DICT_PART$, 'X')
|
||||
WOMatFieldNames = Xlate('DICT.WO_MAT', '%FIELDS%', DICT_DISPLAY$, 'X')
|
||||
Locate CriticalField in WOMatFieldNos using @VM setting FieldNo then
|
||||
CriticalFieldName = WOMatFieldNames<0, FieldNo>
|
||||
end else
|
||||
CriticalFieldName = 'Error determining field name'
|
||||
end
|
||||
|
||||
Recipients = ''
|
||||
SentFrom = 'SYSTEM'
|
||||
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:') erased. Value erased ':Quote(OrigRecord<CriticalField>)
|
||||
Message<5> = NoteMessage
|
||||
Message<6> = 'Call Stack:':CRLF$:RetStack()
|
||||
Swap @FM with \0D0A\ in Message
|
||||
Swap @VM with ',' in Message
|
||||
AttachWindow = 'WO_MAT'
|
||||
AttachKey = Name
|
||||
SendToGroup = 'OI_SYSADMIN'
|
||||
Parms = Recipients:@RM:SentFrom:@RM:Subject:@RM:Message:@RM:AttachWindow:@RM:AttachKey:@RM:SendToGroup
|
||||
obj_Notes('Create',Parms)
|
||||
end
|
||||
Void = Record<WO_MAT_VOID$>
|
||||
If (Void NE True$) then
|
||||
CriticalFields = WO_MAT_RDS_NO$:@VM:WO_MAT_LOT_NO$:@VM:WO_MAT_WAFER_QTY$:@VM:WO_MAT_CUST_PART_NO$:@VM
|
||||
CriticalFields := WO_MAT_SUB_PART_NO$:@VM:WO_MAT_INV_ACTION$:@VM:WO_MAT_SLOT_NO$:@VM:WO_MAT_RX_DTM$:@VM
|
||||
CriticalFields := WO_MAT_RX_BY$:@VM:WO_MAT_REL_DTM$:@VM:WO_MAT_REL_BY$:@VM:WO_MAT_SUB_VEND_CD$:@VM
|
||||
CriticalFields := WO_MAT_CASS_SHIP_QTY$:@VM:WO_MAT_SHIP_SHORT$:@VM:WO_MAT_MU_WAFER_FLAG$
|
||||
|
||||
For each CriticalField in CriticalFields using @VM setting vPos
|
||||
|
||||
If ( (OrigRecord<CriticalField> NE '') and (Record<CriticalField> EQ '') ) then
|
||||
WOMatFieldNos = Xlate('DICT.WO_MAT', '%FIELDS%', DICT_PART$, 'X')
|
||||
WOMatFieldNames = Xlate('DICT.WO_MAT', '%FIELDS%', DICT_DISPLAY$, 'X')
|
||||
Locate CriticalField in WOMatFieldNos using @VM setting FieldNo then
|
||||
CriticalFieldName = WOMatFieldNames<0, FieldNo>
|
||||
end else
|
||||
CriticalFieldName = 'Error determining field name'
|
||||
end
|
||||
|
||||
Recipients = ''
|
||||
SentFrom = 'SYSTEM'
|
||||
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:') erased. Value erased ':Quote(OrigRecord<CriticalField>)
|
||||
Message<5> = NoteMessage
|
||||
Message<6> = 'Call Stack:':CRLF$:RetStack()
|
||||
Swap @FM with \0D0A\ in Message
|
||||
Swap @VM with ',' in Message
|
||||
AttachWindow = 'WO_MAT'
|
||||
AttachKey = Name
|
||||
SendToGroup = 'OI_SYSADMIN'
|
||||
Parms = Recipients:@RM:SentFrom:@RM:Subject:@RM:Message:@RM:AttachWindow:@RM:AttachKey:@RM:SendToGroup
|
||||
obj_Notes('Create',Parms)
|
||||
end
|
||||
|
||||
Next CriticalField
|
||||
|
||||
SaveRecord = Record
|
||||
Next CriticalField
|
||||
end
|
||||
|
||||
WaferQty = Record<WO_MAT_WAFER_QTY$>
|
||||
If ( (WaferQty LT 0) or (WaferQty GT 25) ) then
|
||||
@ -610,13 +611,17 @@ WRITE_RECORD:
|
||||
CassNo = Field(Name, '*', 2)
|
||||
WOMatKeyID = Name
|
||||
|
||||
OrigWfrQty = OrigRecord<WO_MAT_WAFER_QTY$>
|
||||
NewWfrQty = Record<WO_MAT_WAFER_QTY$>
|
||||
OrigRelDtm = OrigRecord<WO_MAT_REL_DTM$>
|
||||
NewRelDtm = Record<WO_MAT_REL_DTM$>
|
||||
OrigRecDtm = OrigRecord<WO_MAT_RX_DTM$>
|
||||
NewRecDtm = Record<WO_MAT_RX_DTM$>
|
||||
AdjustQty = NewWfrQty - OrigWfrQty
|
||||
OrigWfrQty = OrigRecord<WO_MAT_WAFER_QTY$>
|
||||
NewWfrQty = Record<WO_MAT_WAFER_QTY$>
|
||||
OrigRelDtm = OrigRecord<WO_MAT_REL_DTM$>
|
||||
NewRelDtm = Record<WO_MAT_REL_DTM$>
|
||||
OrigRecDtm = OrigRecord<WO_MAT_RX_DTM$>
|
||||
NewRecDtm = Record<WO_MAT_RX_DTM$>
|
||||
OrigVoidFlag = OrigRecord<WO_MAT_VOID$>
|
||||
NewVoidFlag = Record<WO_MAT_VOID$>
|
||||
OrigShipNo = OrigRecord<WO_MAT_SHIP_NO$>
|
||||
NewShipNo = Record<WO_MAT_SHIP_NO$>
|
||||
AdjustQty = NewWfrQty - OrigWfrQty
|
||||
|
||||
If ( (OrigWfrQty NE '' ) and (OrigWfrQty NE NewWfrQty) and (OrigRecDtm NE '' and NewRecDtm NE '') ) then
|
||||
// Cassette already received, but casssette quantity has changed.
|
||||
@ -624,7 +629,7 @@ WRITE_RECORD:
|
||||
end
|
||||
If ( (OrigRecDtm EQ '') and (NewRecDtm NE '') ) then
|
||||
// Cassette was just received. Increment received quantity of work order by the entire cassette wafer count.
|
||||
Work_Order_Services('AdjustReceivedQty', WONo, NewWfrQty)
|
||||
If NewWfrQty NE 0 then Work_Order_Services('AdjustReceivedQty', WONo, NewWfrQty)
|
||||
end
|
||||
|
||||
If ( (OrigWfrQty NE '') and (OrigWfrQty NE NewWfrQty) and ( (OrigRelDtm NE '') and (NewRelDtm NE '') ) ) then
|
||||
@ -633,7 +638,47 @@ WRITE_RECORD:
|
||||
end
|
||||
If ( (OrigRelDtm EQ '') and (NewRelDtm NE '') ) then
|
||||
// Cassette was just released. Increment released quantity of work order by the entire cassette wafer count.
|
||||
Work_Order_Services('AdjustReleasedQty', WONo, NewWfrQty)
|
||||
If NewWfrQty NE 0 then Work_Order_Services('AdjustReleasedQty', WONo, NewWfrQty)
|
||||
end
|
||||
|
||||
If ( (OrigVoidFlag NE True$) and (NewVoidFlag EQ True$) ) then
|
||||
If (NewWfrQty NE 0) then
|
||||
If (NewRecDtm NE '') then Work_Order_Services('AdjustReceivedQty', WONo, Neg(NewWfrQty))
|
||||
If (NewRelDtm NE '') then Work_Order_Services('AdjustReleasedQty', WONo, Neg(NewWfrQty))
|
||||
end
|
||||
end
|
||||
|
||||
If ( (NewVoidFlag NE True$) and (OrigVoidFlag EQ True$) ) then
|
||||
If (NewWfrQty NE 0) then
|
||||
If (NewRecDtm NE '') then Work_Order_Services('AdjustReceivedQty', WONo, NewWfrQty)
|
||||
If (NewRelDtm NE '') then Work_Order_Services('AdjustReleasedQty', WONo, NewWfrQty)
|
||||
end
|
||||
end
|
||||
|
||||
If ( (OrigShipNo EQ '') and (NewShipNo NE '') ) then
|
||||
ShipQty = 0
|
||||
WMOKey = Record<WO_MAT_WMO_KEY$>
|
||||
If (WMOKey NE '') then
|
||||
CurrWfrCnt = Xlate('WM_OUT', WMOKey, 'WAFER_CNT', 'X')
|
||||
ShipQty += CurrWfrCnt
|
||||
end else
|
||||
CurrWfrCnt = obj_WO_Mat('CurrWaferCnt',WOMatKeyID:@RM:Record)
|
||||
ShipQty += CurrWfrCnt
|
||||
end
|
||||
If ShipQty NE 0 then Work_Order_Services('AdjustShippedQty', WONo, ShipQty)
|
||||
end
|
||||
|
||||
If ( (NewShipNo EQ '') and (OrigShipNo NE '') ) then
|
||||
ShipQty = 0
|
||||
WMOKey = Record<WO_MAT_WMO_KEY$>
|
||||
If (WMOKey NE '') then
|
||||
CurrWfrCnt = Xlate('WM_OUT', WMOKey, 'WAFER_CNT', 'X')
|
||||
ShipQty += CurrWfrCnt
|
||||
end else
|
||||
CurrWfrCnt = obj_WO_Mat('CurrWaferCnt',WOMatKeyID:@RM:Record)
|
||||
ShipQty += CurrWfrCnt
|
||||
end
|
||||
If (ShipQty NE 0) then Work_Order_Services('AdjustShippedQty', WONo, Neg(ShipQty))
|
||||
end
|
||||
|
||||
If {REACTOR_TYPE} NE 'EPP' then
|
||||
@ -878,7 +923,7 @@ WRITE_RECORD:
|
||||
CurrWaferCount = obj_WO_Mat('CurrWaferCnt', WOMatKeyID)
|
||||
If CurrWaferCount EQ 0 then
|
||||
// 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())
|
||||
Service_Services('PostProcedure', 'SCHEDULE_SERVICES', 'UpdateCassProcStatus':SD$:WONo:SD$:CassNo:SD$:Datetime())
|
||||
end
|
||||
|
||||
return
|
||||
@ -889,6 +934,35 @@ return
|
||||
|
||||
|
||||
DELETE_RECORD:
|
||||
debug
|
||||
WOMatKeyID = Name
|
||||
WONo = Field(WOMatKeyID, '*', 1, 1)
|
||||
OrigWfrQty = OrigRecord<WO_MAT_WAFER_QTY$>
|
||||
OrigVoidFlag = OrigRecord<WO_MAT_VOID$>
|
||||
OrigShipNo = OrigRecord<WO_MAT_SHIP_NO$>
|
||||
OrigRelDtm = OrigRecord<WO_MAT_REL_DTM$>
|
||||
OrigRecDtm = OrigRecord<WO_MAT_RX_DTM$>
|
||||
|
||||
If (OrigVoidFlag NE True$) then
|
||||
If (OrigWfrQty NE 0) then
|
||||
If (OrigRecDtm NE '') then Work_Order_Services('AdjustReceivedQty', WONo, Neg(OrigWfrQty))
|
||||
If (OrigRelDtm NE '') then Work_Order_Services('AdjustReleasedQty', WONo, Neg(OrigWfrQty))
|
||||
end
|
||||
end
|
||||
|
||||
If (OrigShipNo NE '') then
|
||||
ShipQty = 0
|
||||
WMOKey = OrigRecord<WO_MAT_WMO_KEY$>
|
||||
If (WMOKey NE '') then
|
||||
CurrWfrCnt = Xlate('WM_OUT', WMOKey, 'WAFER_CNT', 'X')
|
||||
ShipQty += CurrWfrCnt
|
||||
end else
|
||||
CurrWfrCnt = obj_WO_Mat('CurrWaferCnt',WOMatKeyID:@RM:OrigRecord)
|
||||
ShipQty += CurrWfrCnt
|
||||
end
|
||||
If (ShipQty NE 0) then Work_Order_Services('AdjustShippedQty', WONo, Neg(ShipQty))
|
||||
end
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
@ -57,6 +57,8 @@ $Insert PRS_LAYER_EQUATES
|
||||
$Insert PRS_STAGE_EQUATES
|
||||
$Insert PROD_VER_EQUATES
|
||||
$Insert QA_MET_EQUATES ;* Used in GetQAMet data structure return variable
|
||||
$Insert RDS_EQUATES
|
||||
$Insert WO_REACT_EQUATES
|
||||
|
||||
Declare function Database_Services, SRP_JSON, Error_Services, obj_Prod_Spec, Wo_Mat_Qa_Services
|
||||
Declare subroutine Database_Services, SRP_JSON, Error_Services
|
||||
@ -192,130 +194,168 @@ End Service
|
||||
|
||||
|
||||
Service UpdateQAMet(WOMatKey)
|
||||
|
||||
|
||||
WOMatQARec = ''
|
||||
ErrorMsg = ''
|
||||
If (WOMatKey NE '') then
|
||||
|
||||
WONo = Field(WOMatKey, '*', 1)
|
||||
CassNo = Field(WOMatKey, '*', 2)
|
||||
|
||||
* * * * * * * * Build QA_MET profile - Work Order scheduled only * * * * * * * *
|
||||
WOStepKeys = XLATE('WO_LOG', WONo, WO_LOG_WO_STEP_KEY$, 'X')
|
||||
|
||||
StepCnt = DCount(WOStepKeys,@VM)
|
||||
|
||||
EpiProPSNo = ''
|
||||
EpiProPSRec = ''
|
||||
|
||||
MetLine = 1
|
||||
|
||||
// Get original WO_MAT_QA record to copy any test results
|
||||
OrigWOMatQARec = Database_Services('ReadDataRow', 'WO_MAT_QA', WOMatKey)
|
||||
OrigQAStages = OrigWOMatQARec<WO_MAT_QA_STAGE$>
|
||||
OrigQAProfiles = OrigWOMatQARec<WO_MAT_QA_PROFILE$>
|
||||
OrigQASlots = OrigWOMatQARec<WO_MAT_QA_SLOT$>
|
||||
OrigQASlotTests = OrigWOMatQARec<WO_MAT_QA_SLOT_TEST$>
|
||||
OrigQAResults = OrigWOMatQARec<WO_MAT_QA_RESULT$>
|
||||
OrigQASigs = OrigWOMatQARec<WO_MAT_QA_SIG$>
|
||||
OrigQASigDtms = OrigWOMatQARec<WO_MAT_QA_SIG_DTM$>
|
||||
OrigQAStdResults = OrigWOMatQARec<WO_MAT_QA_STD_RESULT$>
|
||||
OrigQADataPoints = OrigWOMatQARec<WO_MAT_QA_DATA_POINTS$>
|
||||
OrigQAMinResults = OrigWOMatQARec<WO_MAT_QA_MIN_RESULT$>
|
||||
OrigQAMaxResults = OrigWOMatQARec<WO_MAT_QA_MAX_RESULT$>
|
||||
OrigQARangeResults = OrigWOMatQARec<WO_MAT_QA_RANGE_PCT_RESULT$>
|
||||
OrigQAEdgeResults = OrigWOMatQARec<WO_MAT_QA_EDGE_MEAN_RESULT$>
|
||||
OrigQA5mmResults = OrigWOMatQARec<WO_MAT_QA_5MM_PCT_RESULT$>
|
||||
OrigQAOutOfSpecs = OrigWOMatQARec<WO_MAT_QA_OUT_OF_SPEC$>
|
||||
OrigQAFailReasons = OrigWOMatQARec<WO_MAT_QA_FAIL_REASON$>
|
||||
|
||||
* WO_MAT record is used to check for pre-existing signatures jch 6/7/2015
|
||||
WOMatRec = Database_Services('ReadDataRow', 'WO_MAT', WOMatKey)
|
||||
|
||||
FOR WOStepNo = 1 TO StepCnt
|
||||
PSNo = XLATE('WO_STEP', WOStepKeys<1,WOStepNo>, WO_STEP_PROD_SPEC_ID$, 'X')
|
||||
PSRec = Database_Services('ReadDataRow', 'PROD_SPEC', PSNo)
|
||||
QAMetData = obj_Prod_Spec('GetQAMet',PSNo:@RM:PSRec)
|
||||
QAStages = QAMetData<COL$QA_MET_STAGE>
|
||||
StageCnt = COUNT(QAStages,@VM) + (QAStages NE '')
|
||||
|
||||
FOR StageNo = 1 TO StageCnt
|
||||
Stage = QAMetData<COL$QA_MET_STAGE,StageNo>
|
||||
|
||||
MetTest = QAMetData<COL$QA_MET_TEST,StageNo> ;* StageRec<PRS_STAGE_MET_TEST$>
|
||||
|
||||
Interval = QAMetData<COL$QA_MET_INTERVAL,StageNo> ;* StageRec<PRS_STAGE_MET_INTERVAL$,StageNo>
|
||||
Start = QAMetData<COL$QA_MET_START,StageNo> ;* StageRec<PRS_STAGE_MET_START$,StageNo>
|
||||
ReactSched = QAMetData<COL$QA_MET_REACT_SCHED,StageNo> ;* StageRec<PRS_STAGE_MET_REACT_SCHED$,StageNo>
|
||||
TestFlag = 0
|
||||
|
||||
IF Interval NE '' AND Start NE '' THEN
|
||||
IF Interval = Start THEN
|
||||
IF REM(CassNo,Interval) = 0 THEN TestFlag = 1
|
||||
END ELSE
|
||||
IF ABS((Start + INT(CassNo/Interval)*Interval) - CassNo) = 0 THEN TestFlag = 1
|
||||
END
|
||||
IF TestFlag AND NOT(ReactSched) THEN
|
||||
WOMatQARec<WO_MAT_QA_PROFILE$,MetLine> = WOStepNo:QAMetData<COL$QA_MET_TEST,StageNo> ;* StageRec<PRS_STAGE_MET_TEST$,N>
|
||||
WOMatQARec<WO_MAT_QA_PROP$,MetLine> = QAMetData<COL$QA_MET_PROP,StageNo> ;* StageRec<PRS_STAGE_MET_PROP$,N>
|
||||
WOMatQARec<WO_MAT_QA_TOOL_CLASS$,MetLine> = QAMetData<COL$QA_MET_TOOL_CLASS,StageNo> ;* StageRec<PRS_STAGE_MET_TOOL_CLASS$,N>
|
||||
WOMatQARec<WO_MAT_QA_STAGE$,MetLine> = QAMetData<COL$QA_MET_STAGE,StageNo>
|
||||
WOMatQARec<WO_MAT_QA_MIN$,MetLine> = QAMetData<COL$QA_MET_MIN,StageNo> ;* StageRec<PRS_STAGE_MET_MIN$,N>
|
||||
WOMatQARec<WO_MAT_QA_MAX$,MetLine> = QAMetData<COL$QA_MET_MAX,StageNo> ;* StageRec<PRS_STAGE_MET_MAX$,N>
|
||||
WOMatQARec<WO_MAT_QA_SLOT$,MetLine> = QAMetData<COL$QA_MET_SLOT,StageNo> ;* StageRec<PRS_STAGE_MET_SLOT$,N>
|
||||
WOMatQARec<WO_MAT_QA_RECIPE$,MetLine> = QAMetData<COL$QA_MET_RECIPE,StageNo> ;* StageRec<PRS_STAGE_MET_RECIPE$,N>
|
||||
WOMatQARec<WO_MAT_QA_RECIPE_PATTERN$,MetLine> = QAMetData<COL$QA_MET_RECIPE_PATTERN,StageNo> ;* StageRec<PRS_STAGE_MET_RECIPE_PATTERN$,StageNo>
|
||||
WOMatQARec<WO_MAT_QA_WFR_QTY$,MetLine> = QAMetData<COL$QA_MET_WFR_QTY,StageNo> ;* StageRec<PRS_STAGE_MET_WFR_QTY$,StageNo>
|
||||
WOMatQARec<WO_MAT_QA_WFR_TYPE$,MetLine> = QAMetData<COL$QA_MET_WFR_TYPE,StageNo> ;* StageRec<PRS_STAGE_MET_WFR_TYPE$,StageNo>
|
||||
WOMatQARec<WO_MAT_QA_REACT_SCHED$,MetLine> = ReactSched ;* StageRec<PRS_STAGE_MET_REACT_SCHED$,StageNo>
|
||||
WOMatQARec<WO_MAT_QA_SHIP_DOC$,MetLine> = QAMetData<COL$QA_MET_SHIP_DOC,StageNo> ;* StageRec<PRS_STAGE_MET_SHIP_DOC$,StageNo>
|
||||
WOMatQARec<WO_MAT_QA_PHASE_MIN$,MetLine> = QAMetData<COL$QA_MET_PHASE_MIN,StageNo>
|
||||
|
||||
If OrigWOMatQARec NE '' then
|
||||
CurrStage = QAMetData<COL$QA_MET_STAGE,StageNo>
|
||||
CurrProfile = WOStepNo:QAMetData<COL$QA_MET_TEST,StageNo>
|
||||
CurrSlot = QAMetData<COL$QA_MET_SLOT,StageNo>
|
||||
// Copy any existing results from the original WO_MAT_QA record.
|
||||
If OrigQAStages NE '' then
|
||||
Found = False$
|
||||
For each OrigQAStage in OrigQAStages using @VM setting sPos
|
||||
OrigQAProfile = OrigQAProfiles<0, sPos>
|
||||
OrigQASlot = OrigQASlots<0, sPos>
|
||||
If ( (CurrStage EQ OrigQAStage) and (CurrProfile EQ OrigQAProfile) and (CurrSlot EQ OrigQASlot) ) then
|
||||
Found = True$
|
||||
WOMatQARec<WO_MAT_QA_SLOT_TEST$,MetLine> = OrigQASlotTests<0, sPos>
|
||||
WOMatQARec<WO_MAT_QA_RESULT$,MetLine> = OrigQAResults<0, sPos>
|
||||
WOMatQARec<WO_MAT_QA_SIG$,MetLine> = OrigQASigs<0, sPos>
|
||||
WOMatQARec<WO_MAT_QA_SIG_DTM$,MetLine> = OrigQASigDtms<0, sPos>
|
||||
WOMatQARec<WO_MAT_QA_STD_RESULT$,MetLine> = OrigQAStdResults<0, sPos>
|
||||
WOMatQARec<WO_MAT_QA_DATA_POINTS$,MetLine> = OrigQADataPoints<0, sPos>
|
||||
WOMatQARec<WO_MAT_QA_MIN_RESULT$,MetLine> = OrigQAMinResults<0, sPos>
|
||||
WOMatQARec<WO_MAT_QA_MAX_RESULT$,MetLine> = OrigQAMaxResults<0, sPos>
|
||||
WOMatQARec<WO_MAT_QA_RANGE_PCT_RESULT$,MetLine> = OrigQARangeResults<0, sPos>
|
||||
WOMatQARec<WO_MAT_QA_EDGE_MEAN_RESULT$,MetLine> = OrigQAEdgeResults<0, sPos>
|
||||
WOMatQARec<WO_MAT_QA_5MM_PCT_RESULT$,MetLine> = OrigQA5mmResults<0, sPos>
|
||||
WOMatQARec<WO_MAT_QA_OUT_OF_SPEC$,MetLine> = OrigQAOutOfSpecs<0, sPos>
|
||||
WOMatQARec<WO_MAT_QA_FAIL_REASON$,MetLine> = OrigQAFailReasons<0, sPos>
|
||||
end
|
||||
Until Found
|
||||
Next OrigQAStage
|
||||
end
|
||||
end
|
||||
MetLine += 1
|
||||
END
|
||||
END
|
||||
|
||||
NEXT StageNo
|
||||
|
||||
NEXT WOStepNo
|
||||
|
||||
Database_Services('WriteDataRow', 'WO_MAT_QA', WONo:'*':CassNo, WOMatQARec)
|
||||
|
||||
WONo = Field(WOMatKey, '*', 1)
|
||||
CassNo = Field(WOMatKey, '*', 2)
|
||||
RDSNo = Database_Services('ReadDataColumn', 'WO_MAT', WOMatKey, WO_MAT_RDS_NO$)
|
||||
If Error_Services('NoError') then
|
||||
If (RDSNo NE '') then
|
||||
// Check if it has been assigned to a reactor
|
||||
ReactNo = Database_Services('ReadDataColumn', 'RDS', RDSNo, RDS_REACTOR$)
|
||||
If Error_Services('HasError') then
|
||||
ErrorMsg = 'Error in ':Service:' service. Error message: ':Error_Services('GetMessage')
|
||||
end
|
||||
end else
|
||||
// Either not signed into a reactor yet or this WO_MAT is EpiPro and therefore there is no
|
||||
// 1-to-1 RDS record. Because of this, reactor scheduled QA met is not possible with EpiPro.
|
||||
ReactNo = ''
|
||||
end
|
||||
If (ErrorMsg EQ '') then
|
||||
WOStepKeys = Database_Services('ReadDataColumn', 'WO_LOG', WONo, WO_LOG_WO_STEP_KEY$)
|
||||
If Error_Services('NoError') then
|
||||
StepCnt = DCount(WOStepKeys,@VM)
|
||||
MetLine = 1
|
||||
// Get original WO_MAT_QA record to copy any test results
|
||||
OrigWOMatQARec = Database_Services('ReadDataRow', 'WO_MAT_QA', WOMatKey)
|
||||
OrigQAStages = OrigWOMatQARec<WO_MAT_QA_STAGE$>
|
||||
OrigQAProfiles = OrigWOMatQARec<WO_MAT_QA_PROFILE$>
|
||||
OrigQASlots = OrigWOMatQARec<WO_MAT_QA_SLOT$>
|
||||
OrigQASlotTests = OrigWOMatQARec<WO_MAT_QA_SLOT_TEST$>
|
||||
OrigQAResults = OrigWOMatQARec<WO_MAT_QA_RESULT$>
|
||||
OrigQASigs = OrigWOMatQARec<WO_MAT_QA_SIG$>
|
||||
OrigQASigDtms = OrigWOMatQARec<WO_MAT_QA_SIG_DTM$>
|
||||
OrigQAStdResults = OrigWOMatQARec<WO_MAT_QA_STD_RESULT$>
|
||||
OrigQADataPoints = OrigWOMatQARec<WO_MAT_QA_DATA_POINTS$>
|
||||
OrigQAMinResults = OrigWOMatQARec<WO_MAT_QA_MIN_RESULT$>
|
||||
OrigQAMaxResults = OrigWOMatQARec<WO_MAT_QA_MAX_RESULT$>
|
||||
OrigQARangeResults = OrigWOMatQARec<WO_MAT_QA_RANGE_PCT_RESULT$>
|
||||
OrigQAEdgeResults = OrigWOMatQARec<WO_MAT_QA_EDGE_MEAN_RESULT$>
|
||||
OrigQA5mmResults = OrigWOMatQARec<WO_MAT_QA_5MM_PCT_RESULT$>
|
||||
OrigQAOutOfSpecs = OrigWOMatQARec<WO_MAT_QA_OUT_OF_SPEC$>
|
||||
OrigQAFailReasons = OrigWOMatQARec<WO_MAT_QA_FAIL_REASON$>
|
||||
|
||||
FOR WOStepNo = 1 TO StepCnt
|
||||
PSNo = Database_Services('ReadDataColumn', 'WO_STEP', WOStepKeys<1,WOStepNo>, WO_STEP_PROD_SPEC_ID$)
|
||||
If Error_Services('NoError') then
|
||||
PSRec = Database_Services('ReadDataRow', 'PROD_SPEC', PSNo)
|
||||
If Error_Services('NoError') then
|
||||
QAMetData = obj_Prod_Spec('GetQAMet',PSNo:@RM:PSRec)
|
||||
QAStages = QAMetData<COL$QA_MET_STAGE>
|
||||
StageCnt = DCount(QAStages,@VM)
|
||||
|
||||
If (ReactNo NE '') then
|
||||
WOReactKey = WONo:'*':WOStepNo:'*':ReactNo
|
||||
end else
|
||||
WOReactKey = ''
|
||||
end
|
||||
|
||||
If (WOReactKey NE '') then
|
||||
WOReactRDSNos = Database_Services('ReadDataColumn', 'WO_REACT', WOReactKey, WO_REACT_RDS_NO$)
|
||||
If Error_Services('HasError') then
|
||||
ErrorMsg = 'Error in ':Service:' service. Error message: ':Error_Services('GetMessage')
|
||||
end
|
||||
end
|
||||
|
||||
If (ErrorMsg EQ '') then
|
||||
For StageNo = 1 to StageCnt
|
||||
Stage = QAMetData<COL$QA_MET_STAGE,StageNo>
|
||||
MetTest = QAMetData<COL$QA_MET_TEST,StageNo> ;* StageRec<PRS_STAGE_MET_TEST$>
|
||||
Interval = QAMetData<COL$QA_MET_INTERVAL,StageNo> ;* StageRec<PRS_STAGE_MET_INTERVAL$,StageNo>
|
||||
Start = QAMetData<COL$QA_MET_START,StageNo> ;* StageRec<PRS_STAGE_MET_START$,StageNo>
|
||||
ReactSched = QAMetData<COL$QA_MET_REACT_SCHED,StageNo> ;* StageRec<PRS_STAGE_MET_REACT_SCHED$,StageNo>
|
||||
TestFlag = False$
|
||||
|
||||
If ( (Interval NE '') and (Start NE '') ) then
|
||||
// Add Work Order scheduled tests (i.e., not reactor scheduled tests)
|
||||
If Not(ReactSched) then
|
||||
If Interval = Start then
|
||||
If ( Rem(CassNo, Interval) EQ 0 ) then TestFlag = True$
|
||||
end else
|
||||
If ( Abs( (Start + Int(CassNo / Interval)*Interval) - CassNo ) EQ 0) then TestFlag = True$
|
||||
end
|
||||
end else
|
||||
Locate RDSNo in WOReactRDSNos using @VM setting TestSeq then
|
||||
If ( Rem( (TestSeq - Start), Interval) EQ 0 ) then TestFlag = True$
|
||||
end
|
||||
end
|
||||
If TestFlag then
|
||||
WOMatQARec<WO_MAT_QA_PROFILE$,MetLine> = WOStepNo:MetTest
|
||||
WOMatQARec<WO_MAT_QA_PROP$,MetLine> = QAMetData<COL$QA_MET_PROP,StageNo>
|
||||
WOMatQARec<WO_MAT_QA_TOOL_CLASS$,MetLine> = QAMetData<COL$QA_MET_TOOL_CLASS,StageNo>
|
||||
WOMatQARec<WO_MAT_QA_STAGE$,MetLine> = Stage
|
||||
WOMatQARec<WO_MAT_QA_MIN$,MetLine> = QAMetData<COL$QA_MET_MIN,StageNo>
|
||||
WOMatQARec<WO_MAT_QA_MAX$,MetLine> = QAMetData<COL$QA_MET_MAX,StageNo>
|
||||
WOMatQARec<WO_MAT_QA_SLOT$,MetLine> = QAMetData<COL$QA_MET_SLOT,StageNo>
|
||||
WOMatQARec<WO_MAT_QA_RECIPE$,MetLine> = QAMetData<COL$QA_MET_RECIPE,StageNo>
|
||||
WOMatQARec<WO_MAT_QA_RECIPE_PATTERN$,MetLine> = QAMetData<COL$QA_MET_RECIPE_PATTERN,StageNo>
|
||||
WOMatQARec<WO_MAT_QA_WFR_QTY$,MetLine> = QAMetData<COL$QA_MET_WFR_QTY,StageNo>
|
||||
WOMatQARec<WO_MAT_QA_WFR_TYPE$,MetLine> = QAMetData<COL$QA_MET_WFR_TYPE,StageNo>
|
||||
WOMatQARec<WO_MAT_QA_REACT_SCHED$,MetLine> = ReactSched
|
||||
WOMatQARec<WO_MAT_QA_SHIP_DOC$,MetLine> = QAMetData<COL$QA_MET_SHIP_DOC,StageNo>
|
||||
WOMatQARec<WO_MAT_QA_PHASE_MIN$,MetLine> = QAMetData<COL$QA_MET_PHASE_MIN,StageNo>
|
||||
|
||||
If OrigWOMatQARec NE '' then
|
||||
CurrStage = QAMetData<COL$QA_MET_STAGE,StageNo>
|
||||
CurrProfile = WOStepNo:MetTest
|
||||
CurrSlot = QAMetData<COL$QA_MET_SLOT,StageNo>
|
||||
// Copy any existing results from the original WO_MAT_QA record.
|
||||
If OrigQAStages NE '' then
|
||||
Found = False$
|
||||
For each OrigQAStage in OrigQAStages using @VM setting sPos
|
||||
OrigQAProfile = OrigQAProfiles<0, sPos>
|
||||
OrigQASlot = OrigQASlots<0, sPos>
|
||||
If ( (CurrStage EQ OrigQAStage) and (CurrProfile EQ OrigQAProfile) and (CurrSlot EQ OrigQASlot) ) then
|
||||
Found = True$
|
||||
WOMatQARec<WO_MAT_QA_SLOT_TEST$,MetLine> = OrigQASlotTests<0, sPos>
|
||||
WOMatQARec<WO_MAT_QA_RESULT$,MetLine> = OrigQAResults<0, sPos>
|
||||
WOMatQARec<WO_MAT_QA_SIG$,MetLine> = OrigQASigs<0, sPos>
|
||||
WOMatQARec<WO_MAT_QA_SIG_DTM$,MetLine> = OrigQASigDtms<0, sPos>
|
||||
WOMatQARec<WO_MAT_QA_STD_RESULT$,MetLine> = OrigQAStdResults<0, sPos>
|
||||
WOMatQARec<WO_MAT_QA_DATA_POINTS$,MetLine> = OrigQADataPoints<0, sPos>
|
||||
WOMatQARec<WO_MAT_QA_MIN_RESULT$,MetLine> = OrigQAMinResults<0, sPos>
|
||||
WOMatQARec<WO_MAT_QA_MAX_RESULT$,MetLine> = OrigQAMaxResults<0, sPos>
|
||||
WOMatQARec<WO_MAT_QA_RANGE_PCT_RESULT$,MetLine> = OrigQARangeResults<0, sPos>
|
||||
WOMatQARec<WO_MAT_QA_EDGE_MEAN_RESULT$,MetLine> = OrigQAEdgeResults<0, sPos>
|
||||
WOMatQARec<WO_MAT_QA_5MM_PCT_RESULT$,MetLine> = OrigQA5mmResults<0, sPos>
|
||||
WOMatQARec<WO_MAT_QA_OUT_OF_SPEC$,MetLine> = OrigQAOutOfSpecs<0, sPos>
|
||||
WOMatQARec<WO_MAT_QA_FAIL_REASON$,MetLine> = OrigQAFailReasons<0, sPos>
|
||||
end
|
||||
Until Found
|
||||
Next OrigQAStage
|
||||
end
|
||||
end
|
||||
MetLine += 1
|
||||
end
|
||||
end
|
||||
Next StageNo
|
||||
end
|
||||
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')
|
||||
end
|
||||
Until (ErrorMsg NE '')
|
||||
Next WOStepNo
|
||||
If (ErrorMsg EQ '') then
|
||||
Database_Services('WriteDataRow', 'WO_MAT_QA', WONo:'*':CassNo, WOMatQARec)
|
||||
If Error_Services('HasError') then ErrorMsg = 'Error in ':Service:' service. Error message: ':Error_Services('GetMessage')
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Error message: ':Error_Services('GetMessage')
|
||||
end
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Error message: ':Error_Services('GetMessage')
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Null WOMatKey passed in.'
|
||||
end
|
||||
|
||||
If ErrorMsg NE '' then
|
||||
If (ErrorMsg NE '') then
|
||||
Error_Services('Add', ErrorMsg)
|
||||
end else
|
||||
Response = WOMatQARec
|
||||
@ -469,7 +509,7 @@ end service
|
||||
|
||||
|
||||
Service GetMUWaferQAComplete(WOMatKey)
|
||||
|
||||
|
||||
ErrorMsg = ''
|
||||
|
||||
If WOMatKey NE '' then
|
||||
@ -521,4 +561,3 @@ Service GetMUWaferQAComplete(WOMatKey)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
|
@ -1,19 +1,24 @@
|
||||
compile insert ARCHIVE_EQUATES
|
||||
/*----------------------------------------
|
||||
Author : Table Create Insert Routine
|
||||
Written : 28/08/2025
|
||||
Written : 15/10/2025
|
||||
Description : Insert for Table ARCHIVE
|
||||
----------------------------------------*/
|
||||
#ifndef __ARCHIVE_EQUATES__
|
||||
#define __ARCHIVE_EQUATES__
|
||||
|
||||
equ ARCHIVE_ARCHIVE_DTM$ to 1
|
||||
equ ARCHIVE_COMPLETE$ to 2
|
||||
equ ARCHIVE_CHILD_RECORD$ to 3
|
||||
equ ARCHIVE_CHILD_TABLE$ to 4
|
||||
equ ARCHIVE_CHILD_RECORD_ARCHIVED$ to 5
|
||||
equ ARCHIVE_CHILD_RECORD_DELETED$ to 6
|
||||
equ ARCHIVE_CHILD_RECORD_ARCHIVE_DTM$ to 7
|
||||
equ ARCHIVE_CHILD_RECORD_DELETE_DTM$ to 8
|
||||
equ ARCHIVE_ARCHIVE_CREATION_DTM$ to 1
|
||||
equ ARCHIVE_ARCHIVE_PATH$ to 2
|
||||
equ ARCHIVE_COMPLETE$ to 3
|
||||
equ ARCHIVE_ARCHIVE_COMPLETION_DTM$ to 4
|
||||
equ ARCHIVE_CHILD_RECORD$ to 5
|
||||
equ ARCHIVE_CHILD_TABLE$ to 6
|
||||
equ ARCHIVE_CHILD_RECORD_ARCHIVED$ to 7
|
||||
equ ARCHIVE_CHILD_RECORD_DELETED$ to 8
|
||||
equ ARCHIVE_DEARCHIVE_DATETIME$ to 9
|
||||
equ ARCHIVE_METADATA_FIELD$ to 10
|
||||
equ ARCHIVE_METADATA_TYPE$ to 11
|
||||
equ ARCHIVE_METADATA_VALUE$ to 12
|
||||
equ ARCHIVE_CHILD_RECORD_DE_ARCHIVED$ to 13
|
||||
|
||||
#endif
|
||||
|
13
LSL2/STPROCINS/ARCHIVE_QUEUE_EQUATES.txt
Normal file
13
LSL2/STPROCINS/ARCHIVE_QUEUE_EQUATES.txt
Normal file
@ -0,0 +1,13 @@
|
||||
compile insert ARCHIVE_QUEUE_EQUATES
|
||||
/*----------------------------------------
|
||||
Author : Table Create Insert Routine
|
||||
Written : 05/09/2025
|
||||
Description : Insert for Table ARCHIVE_QUEUE
|
||||
----------------------------------------*/
|
||||
#ifndef __ARCHIVE_QUEUE_EQUATES__
|
||||
#define __ARCHIVE_QUEUE_EQUATES__
|
||||
|
||||
equ ARCHIVE_QUEUE_ARCHIVE_ID$ to 1
|
||||
equ ARCHIVE_QUEUE_COMPLETED$ to 2
|
||||
|
||||
#endif
|
13
LSL2/STPROCINS/ARCHIVE_QUEUE_ERROR_EQUATES.txt
Normal file
13
LSL2/STPROCINS/ARCHIVE_QUEUE_ERROR_EQUATES.txt
Normal file
@ -0,0 +1,13 @@
|
||||
compile insert ARCHIVE_QUEUE_ERROR_EQUATES
|
||||
/*----------------------------------------
|
||||
Author : Table Create Insert Routine
|
||||
Written : 02/10/2025
|
||||
Description : Insert for Table ARCHIVE_QUEUE_ERROR
|
||||
----------------------------------------*/
|
||||
#ifndef __ARCHIVE_QUEUE_ERROR_EQUATES__
|
||||
#define __ARCHIVE_QUEUE_ERROR_EQUATES__
|
||||
|
||||
equ ARCHIVE_QUEUE_ERROR_ARCHIVE_ID$ to 1
|
||||
equ ARCHIVE_QUEUE_ERROR_ERROR_MSG$ to 2
|
||||
|
||||
#endif
|
13
LSL2/STPROCINS/DELETE_QUEUE_EQUATES.txt
Normal file
13
LSL2/STPROCINS/DELETE_QUEUE_EQUATES.txt
Normal file
@ -0,0 +1,13 @@
|
||||
compile insert DELETE_QUEUE_EQUATES
|
||||
/*----------------------------------------
|
||||
Author : Table Create Insert Routine
|
||||
Written : 05/09/2025
|
||||
Description : Insert for Table DELETE_QUEUE
|
||||
----------------------------------------*/
|
||||
#ifndef __DELETE_QUEUE_EQUATES__
|
||||
#define __DELETE_QUEUE_EQUATES__
|
||||
|
||||
equ DELETE_QUEUE_ARCHIVE_ID$ to 1
|
||||
equ DELETE_QUEUE_COMPLETED$ to 2
|
||||
|
||||
#endif
|
13
LSL2/STPROCINS/DELETE_QUEUE_ERROR_EQUATES.txt
Normal file
13
LSL2/STPROCINS/DELETE_QUEUE_ERROR_EQUATES.txt
Normal file
@ -0,0 +1,13 @@
|
||||
compile insert DELETE_QUEUE_ERROR_EQUATES
|
||||
/*----------------------------------------
|
||||
Author : Table Create Insert Routine
|
||||
Written : 29/09/2025
|
||||
Description : Insert for Table DELETE_QUEUE_ERROR
|
||||
----------------------------------------*/
|
||||
#ifndef __DELETE_QUEUE_ERROR_EQUATES__
|
||||
#define __DELETE_QUEUE_ERROR_EQUATES__
|
||||
|
||||
equ DELETE_QUEUE_ERROR_ARCHIVE_ID$ to 1
|
||||
equ DELETE_QUEUE_ERROR_ERROR_MSG$ to 2
|
||||
|
||||
#endif
|
@ -18,12 +18,12 @@ compile insert MATERIAL_REPORT_EQUATES
|
||||
equ MATERIAL_REPORT.WO_UNREL_QTY$ to 9
|
||||
equ MATERIAL_REPORT.KIT_LOCATION$ to 10
|
||||
equ MATERIAL_REPORT.KIT_QTY$ to 11
|
||||
equ MATERIAL_REPORT.CASS_DELTA$ to 12
|
||||
equ MATERIAL_REPORT.CASS_DELTA$ to 12 ; // No longer used
|
||||
equ MATERIAL_REPORT.KIT_RO$ to 13
|
||||
equ MATERIAL_REPORT.KIT_DEMAND$ to 14
|
||||
equ MATERIAL_REPORT.PTI_RO$ to 15
|
||||
equ MATERIAL_REPORT.LOAD_RO$ to 16
|
||||
equ MATERIAL_REPORT.COMMENTS$ to 17
|
||||
equ MATERIAL_REPORT.COMMENTS$ to 17 ; // Populated by users via the front end web app
|
||||
equ MATERIAL_REPORT.START_DTM$ to 18
|
||||
|
||||
#endif
|
||||
|
@ -25,3 +25,4 @@ Equ Server.Port$ to 25000
|
||||
Equ Server.KeepAlive$ to 60000
|
||||
Equ MessageProcessor$ to 'NDW_MESSAGING_PROCESSOR'
|
||||
|
||||
|
||||
|
@ -154,3 +154,7 @@ Equ RDS_TEST_TEST_RUN_HGCV_DTM$ To 146
|
||||
Equ RDS_TEST_MODIFY_OVERRIDE$ To 147
|
||||
Equ RDS_TEST_OVERRIDE_USERNAME$ To 148
|
||||
Equ RDS_TEST_OVERRIDE_DTM$ To 149
|
||||
Equ RDS_TEST_COPY_FROM_RDS_TEST_ID$ To 150
|
||||
Equ RDS_TEST_COPY_USER$ To 151
|
||||
Equ RDS_TEST_COPY_DTM$ To 152
|
||||
|
||||
|
17
LSL2/STPROCINS/TIME_INSERTS.txt
Normal file
17
LSL2/STPROCINS/TIME_INSERTS.txt
Normal file
@ -0,0 +1,17 @@
|
||||
Compile Insert TIME_INSERTS
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#IFNDEF _TIME_INSERTS_
|
||||
#DEFINE _TIME_INSERTS_
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Equ SECONDS_IN_DAY$ to 86400
|
||||
Equ HOUR_IN_SECONDS$ to 3600
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#ENDIF
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
Reference in New Issue
Block a user