Compare commits

32 Commits

Author SHA1 Message Date
52b3b20b4e Merged PR 28822: Added logging for de/re-archiving methods
Added logging for de/re-archiving methods
2025-10-20 18:25:05 +00:00
3d786a7916 Copy source RDS_TEST key and context data 2025-10-17 10:13:51 -07:00
1b94adb0d1 Merged PR 28628: Modified create archive routine to get the archive seq number after creation...
Modified create archive routine to get the archive seq number after creation based on the archive id. Increase retry count in delete function. Added retry in de-archive. Retries are needed to account for race conditions possibly with the indexer.
2025-10-17 16:20:55 +00:00
315abcde86 Merged PR 28616: Added flags to switch whether or not to add the records to the next queue.
Added flags to switch whether or not to add the records to the next queue.
2025-10-17 00:35:15 +00:00
05e0fb3eda Merged PR 28607: Archive Services Initial Pull
This is the initial pull for Archiving data.
2025-10-16 23:55:23 +00:00
cbb52c469b updated reactor print dialog form to allow users to select printer 2025-10-16 14:58:44 -07:00
712cec903a Merged PR 28374: Auto-Populate Kit Demand
Updated GenerateMaterialTrackRows service in Report_Services to auto-populate the kit demand based on rules defined by the business.

Related work items: #294433
2025-10-15 17:19:33 +00:00
6e829bd06a Modified current Calibration_Services 'SendReminders' service to not include out of service calibrations. Deleted deprecated obj_calib_list module. 2025-10-13 09:29:28 -07:00
8604a83966 Merged PR 28044: RE-Order - Consolidation of Lot Events for Fabtime.
1. Moved the call to add an ARRIVAL event to within the MoveOutLot function. After the move out is performed to allow for arrival at the next operation.
2. Create a IsLastOperation function to determine if the current operation is the last operation of the lot.
3. Added a call to function IsLastOperation from the MoveOutLot function. If IsLastOperation returns true then instead of an ARRIVAL, it creates a CLOSE event to and sets the CLOSE flag by calling CloseLot function.
4. Modified the AutoCloseTestWaferLot routine to be more generic. Renamed to AutoCloseLot routine.
5. Modified two calls in the from the RDS modules to call the AutoCloseLot function rather than use redundant calls to Move In and Move Out repeatedly until the lot reach it's last operation.
2025-10-10 00:18:39 +00:00
52504272f9 HgCV metrology validation from upstream 2025-10-08 21:49:39 +00:00
b485de10ef Removed extra set of tool controls from TOOL_STATUS form 2025-10-08 13:59:44 -07:00
261e13ceac Removed Out of Service calibrations from notifications being sent 2025-10-08 20:19:01 +00:00
ad6ed9c002 Merged PR 27907: Made changes to tracked records and forms to add PACK1 and PACK2 tools to Ope...
Made changes to tracked records and forms to add PACK1 and PACK2 tools to OpenInsight TOOL_STATUS form.
2025-10-08 19:59:09 +00:00
beaac0d38a Added calls to verify indexes and update indexes right after receiving and releasing material. Refactored codebase to adjust work order quantities instead of recalculate quantities.
Removing reliance on transaction queue for receive and releaase

Added unlock call in case write fails
2025-10-03 16:07:25 -07:00
a2f61d11c9 Fixed scheduler bug causing cassettes to be marked as complete if they have not been received yet. Updated WIP commuter module to handle old react item wafer size format. 2025-10-02 14:02:16 -07:00
acd7949e85 Trim spec values with whitespece 2025-10-02 16:48:15 +00:00
128bf2ef8d Fixed a bug in obj_WO_Mat_Log('Post') function that would fail to properly process transactions out of order 2025-10-01 15:23:42 -07:00
705237545f Merged PR 27478: Changed the comparison operator to force the values to be looked at as a string
Changed the comparison operator to force the values to be looked at as a string
2025-10-01 16:56:13 +00:00
baa9af3e1a Merged PR 27477: Removed Error setting if ScanNotAcceptableReason is due to RDS Layer Params n...
Removed Error setting if ScanNotAcceptableReason is due to RDS Layer Params needing to be verified. Also added this same check for lots at the VER stage

Related work items: #330648
2025-10-01 16:46:26 +00:00
2fa474880d Cleared local ErrMsg variable in VER stage section. 2025-09-30 16:35:41 -07:00
399f568b15 Updated Scan_Services to clear local ErrMsg variable when ROTR error is encountered to ensure override process can continue. 2025-09-30 15:57:52 -07:00
99d6abc3f2 Merged PR 27364: Modified the routine to add default RTF Operations to utilize SYSTEM in lieu...
Modified the routine to add default RTF Operations to utilize SYSTEM in lieu UserId. This is to avoid any issues with permissions for the ininitialization
2025-09-30 17:33:12 +00:00
a2c467e9cb Implemented bug fix for comparing sub lot nos beginning and ending with numbers 2025-09-30 10:02:27 -07:00
af279541ae Reduced available react item part types to just ASM, HTR, and EPP to prevent validation issues. 2025-09-26 15:12:37 -07:00
2036ed3289 Fixed an issue which was preventing work orders without received material from being scheduled. 2025-09-26 13:40:16 -07:00
edd09af821 Fixed obj_Prod_Spec('GetQAMet'). Added RDS_Test_Services('UpdateRDSTestSpecs'). 2025-09-26 11:30:17 -07:00
febe660fcf Updated WEB_OI_WIZARD form to launch centered on the screen sized to 3/4 of the client area. Updated the UpdateOpenWorkOrderData service to also update all work order quantities to ensure the OPEN_QTY_STATIC is set after routing a work order. 2025-09-25 16:30:41 -07:00
245f832445 Modified UpdateQAMet service to support reactor scheduled metrology tests 2025-09-25 22:35:05 +00:00
f07e4476a7 updated schedule related services to account for voided cassettes 2025-09-24 16:00:16 -07:00
12f354dcaa commented out localhost case until a better way to determine local development is implemented 2025-09-24 10:49:59 -07:00
d2f98a342d adding in GetOIWizardBaseURL 2025-09-24 10:38:26 -07:00
b83a3fb57b Merged PR 26794: Added increased error checking in CopyRDSLayerParameters service
Added increased error checking in CopyRDSLayerParameters service
2025-09-24 17:12:27 +00:00
76 changed files with 11354 additions and 13587 deletions

View File

@ -46,52 +46,53 @@
"<1,37>": "6MACTRONIX #3", "<1,37>": "6MACTRONIX #3",
"<1,38>": "6MACTRONIX #4", "<1,38>": "6MACTRONIX #4",
"<1,39>": "8INLESS", "<1,39>": "8INLESS",
"<1,40>": "8INLESS2", "<1,40>": "BAGGER1",
"<1,41>": "BAGGER1", "<1,41>": "BAGGER2",
"<1,42>": "BAGGER2", "<1,42>": "BAGGER3",
"<1,43>": "BAGGER3", "<1,43>": "BAGGER4",
"<1,44>": "BAGGER4", "<1,44>": "PACK1",
"<1,45>": "6INFF01", "<1,45>": "PACK2",
"<1,46>": "6INFF02", "<1,46>": "6INFF01",
"<1,47>": "6INFF03", "<1,47>": "6INFF02",
"<1,48>": "6INFF04", "<1,48>": "6INFF03",
"<1,49>": "6INFF05", "<1,49>": "6INFF04",
"<1,50>": "6INFF06", "<1,50>": "6INFF05",
"<1,51>": "6INFF07", "<1,51>": "6INFF06",
"<1,52>": "6INFF08", "<1,52>": "6INFF07",
"<1,53>": "6INFF09", "<1,53>": "6INFF08",
"<1,54>": "6INFF10", "<1,54>": "6INFF09",
"<1,55>": "8INNF01", "<1,55>": "6INFF10",
"<1,56>": "8INNF02", "<1,56>": "8INNF01",
"<1,57>": "8INNF03", "<1,57>": "8INNF02",
"<1,58>": "8INNF04", "<1,58>": "8INNF03",
"<1,59>": "8INNF05", "<1,59>": "8INNF04",
"<1,60>": "8INFF01", "<1,60>": "8INNF05",
"<1,61>": "8INFF02", "<1,61>": "8INFF01",
"<1,62>": "8INFF03", "<1,62>": "8INFF02",
"<1,63>": "8INFF04", "<1,63>": "8INFF03",
"<1,64>": "MACTRONIX #1", "<1,64>": "8INFF04",
"<1,65>": "MACTRONIX #2 ", "<1,65>": "MACTRONIX #1",
"<1,66>": "MACTRONIX #3", "<1,66>": "MACTRONIX #2 ",
"<1,67>": "MACTRONIX #4", "<1,67>": "MACTRONIX #3",
"<1,68>": "MACTRONIX #5", "<1,68>": "MACTRONIX #4",
"<1,69>": "MACTRONIX #6", "<1,69>": "MACTRONIX #5",
"<1,70>": "MACTRONIX #7", "<1,70>": "MACTRONIX #6",
"<1,71>": "TALL_PITCH1", "<1,71>": "MACTRONIX #7",
"<1,72>": "TALL_PITCH2", "<1,72>": "TALL_PITCH1",
"<1,73>": "TALL_PITCH3", "<1,73>": "TALL_PITCH2",
"<1,74>": "TALL_PITCH4", "<1,74>": "TALL_PITCH3",
"<1,75>": "WC6INCH1", "<1,75>": "TALL_PITCH4",
"<1,76>": "WC6INCH2", "<1,76>": "WC6INCH1",
"<1,77>": "WC6INCH3", "<1,77>": "WC6INCH2",
"<1,78>": "WC6INCH4", "<1,78>": "WC6INCH3",
"<1,79>": "WC8INCH1", "<1,79>": "WC6INCH4",
"<1,80>": "WC8INCH2", "<1,80>": "WC8INCH1",
"<1,81>": "WC8INCH3", "<1,81>": "WC8INCH2",
"<1,82>": "ELLP01", "<1,82>": "WC8INCH3",
"<1,83>": "LEAKCHK01", "<1,83>": "ELLP01",
"<1,84>": "LEAKCHK02", "<1,84>": "LEAKCHK01",
"<1,85>": "TBI #1" "<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

View File

@ -17,15 +17,15 @@
"<1,4>": "", "<1,4>": "",
"<1,5>": "0", "<1,5>": "0",
"<1,6>": "0", "<1,6>": "0",
"<1,7>": "-2083", "<1,7>": "-1184",
"<1,8>": "-1097", "<1,8>": "-761",
"<1,9>": "OI Wizard", "<1,9>": "OI Wizard",
"<1,10>": { "<1,10>": {
"<1,10,1>": "0x84CF0000", "<1,10,1>": "0x84CF0000",
"<1,10,2>": "0x100" "<1,10,2>": "0x100"
}, },
"<1,11>": { "<1,11>": {
"<1,11,1>": "0x8000", "<1,11,1>": "0xC000",
"<1,11,2>": "0x80000000" "<1,11,2>": "0x80000000"
}, },
"<1,12>": "", "<1,12>": "",
@ -165,7 +165,7 @@
"<1,62,1>": "0", "<1,62,1>": "0",
"<1,62,2>": "", "<1,62,2>": "",
"<1,62,3>": "", "<1,62,3>": "",
"<1,62,4>": "0", "<1,62,4>": "1",
"<1,62,5>": "0", "<1,62,5>": "0",
"<1,62,6>": "0", "<1,62,6>": "0",
"<1,62,7>": "", "<1,62,7>": "",
@ -227,10 +227,10 @@
"<1,2>": "", "<1,2>": "",
"<1,3>": "WEBVIEW", "<1,3>": "WEBVIEW",
"<1,4>": "WEB_OI_WIZARD", "<1,4>": "WEB_OI_WIZARD",
"<1,5>": "12", "<1,5>": "9",
"<1,6>": "12", "<1,6>": "8",
"<1,7>": "2060", "<1,7>": "1167",
"<1,8>": "1076", "<1,8>": "745",
"<1,9>": "", "<1,9>": "",
"<1,10>": { "<1,10>": {
"<1,10,1>": "0x56000000", "<1,10,1>": "0x56000000",

View File

@ -43,6 +43,10 @@
"<8,3>": { "<8,3>": {
"<8,3,1>": "Update RDS Layer Parameters", "<8,3,1>": "Update RDS Layer Parameters",
"<8,3,2>": "UPDATE_RDS_LAYER" "<8,3,2>": "UPDATE_RDS_LAYER"
},
"<8,4>": {
"<8,4,1>": "Update RDS Test Specs",
"<8,4,2>": "UPDATE_RDS_TEST"
} }
}, },
"<9>": { "<9>": {

View File

@ -41,16 +41,8 @@
"<8,2,2>": "High Thruput" "<8,2,2>": "High Thruput"
}, },
"<8,3>": { "<8,3>": {
"<8,3,1>": "K2K", "<8,3,1>": "EPP",
"<8,3,2>": "Kit 2000" "<8,3,2>": " EpiPro"
},
"<8,4>": {
"<8,4,1>": "EPP",
"<8,4,2>": " EpiPro"
},
"<8,5>": {
"<8,5,1>": "STD",
"<8,5,2>": "Standard"
} }
}, },
"<9>": { "<9>": {

View File

@ -9,7 +9,7 @@
"<2>": "-2", "<2>": "-2",
"<3>": "-1", "<3>": "-1",
"<4>": "-1", "<4>": "-1",
"<5>": "16777215", "<5>": "-2",
"<6>": { "<6>": {
"<6,1>": { "<6,1>": {
"<6,1,1>": "Tahoma", "<6,1,1>": "Tahoma",
@ -43,7 +43,8 @@
"<8,9>": "G5+", "<8,9>": "G5+",
"<8,10>": "Char", "<8,10>": "Char",
"<8,11>": "Leakcheck", "<8,11>": "Leakcheck",
"<8,12>": "Scrubber" "<8,12>": "Scrubber",
"<8,13>": "Packer"
}, },
"<9>": { "<9>": {
"<9,1>": { "<9,1>": {
@ -80,7 +81,17 @@
"<32>": "0", "<32>": "0",
"<33>": "1", "<33>": "1",
"<34>": "16777215", "<34>": "16777215",
"<35>": "16777215" "<35>": "16777215",
"<36>": "",
"<37>": "",
"<38>": "",
"<39>": "",
"<40>": "-2",
"<41>": "1000",
"<42>": "",
"<43>": "",
"<44>": "",
"<45>": ""
} }
} }
} }

View 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
View 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

View File

@ -211,7 +211,7 @@ Service SendReminders()
CalDueRecipients = Xlate('NOTIFICATION', 'CALIB_DUE_NOTIFY', NOTIFICATION_USER_ID$, 'X') CalDueRecipients = Xlate('NOTIFICATION', 'CALIB_DUE_NOTIFY', NOTIFICATION_USER_ID$, 'X')
CheckDt = OConv(Date() + 15, 'D4/') 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$,'','','') RList(SelectSent,TARGET_ACTIVELIST$,'','','')
NoteText = '' NoteText = ''

View File

@ -696,8 +696,14 @@ PerformQuery:
end end
If ErrorMsg EQ '' then If ErrorMsg EQ '' then
WOKeys = SRP_Array('SortSimpleList', WOKeys, 'DescendingNumbers', @VM) If WOKeys NE '' then
End_Dialog(@WINDOW,WOKeys) 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 end else
Msg(@Window, '', 'OK', '', 'Process Error':@FM:ErrorMsg) Msg(@Window, '', 'OK', '', 'Process Error':@FM:ErrorMsg)
end end

View File

@ -973,6 +973,7 @@ end service
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
Service WriteDataColumn(TableName, KeyID, ColumnNo, Value, IgnoreSelfLock, IgnoreMFSRoutines, IgnoreAllLocks) Service WriteDataColumn(TableName, KeyID, ColumnNo, Value, IgnoreSelfLock, IgnoreMFSRoutines, IgnoreAllLocks)
ErrorMsg = ''
If TableName NE '' AND KeyID NE '' AND ColumnNo NE '' then If TableName NE '' AND KeyID NE '' AND ColumnNo NE '' then
If ( Num(ColumnNo) and (ColumnNo GT 0) ) then If ( Num(ColumnNo) and (ColumnNo GT 0) ) then
@ -1009,7 +1010,13 @@ Service WriteDataColumn(TableName, KeyID, ColumnNo, Value, IgnoreSelfLock, Ignor
end end
end end
If IgnoreAllLocks EQ False$ then If IgnoreAllLocks EQ False$ then
If Error_Services('HasError') then
ErrorMsg = Error_Services('GetMessage')
end
Database_Services('ReleaseKeyIDLock', TableName, KeyID) Database_Services('ReleaseKeyIDLock', TableName, KeyID)
If ErrorMsg NE '' then
Error_Services('Add', ErrorMsg)
end
end end
end else end else
Error_Services('Add', 'Unable to lock ' : KeyID : ' for the ' : TableName : ' table in the ' : Service : ' service.') Error_Services('Add', 'Unable to lock ' : KeyID : ' for the ' : TableName : ' table in the ' : Service : ' service.')
@ -1109,4 +1116,3 @@ end service
// Internal GoSubs // Internal GoSubs
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View 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

View File

@ -80,14 +80,15 @@ Service GetServer()
end service end service
Service IsProd() Service IsProd()
Machine = Environment_Services('GetServer') Machine = Environment_Services('GetServer')
IsProd = False$ 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 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$ IsProd = True$
end end
Response = IsProd Response = IsProd
end service end service
@ -117,13 +118,13 @@ Service GetApplicationRootIP()
Machine = Environment_Services('GetServer') Machine = Environment_Services('GetServer')
Begin Case 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 'MESTSA01EC' ; ApplicationRootIP = '\\10.95.140.13'
Case Machine EQ 'MESTSA09EC' ; ApplicationRootIP = '\\10.95.140.62' Case Machine EQ 'MESTSA09EC' ; ApplicationRootIP = '\\10.95.140.62'
Case Machine EQ 'MESTSA010EC' ; ApplicationRootIP = '\\10.95.140.63' Case Machine EQ 'MESTSA010EC' ; ApplicationRootIP = '\\10.95.140.63'
Case Machine EQ 'MESTSA011EC' ; ApplicationRootIP = '\\10.95.140.64' Case Machine EQ 'MESTSA011EC' ; ApplicationRootIP = '\\10.95.140.64'
Case Machine EQ 'MESTSA012EC' ; ApplicationRootIP = '\\10.95.140.65' Case Machine EQ 'MESTSA012EC' ; ApplicationRootIP = '\\10.95.140.65'
Case Machine EQ 'MESTSA024EC' ; ApplicationRootIP = '\\10.95.140.66' Case Machine EQ 'MESTSA024EC' ; ApplicationRootIP = '\\10.95.140.66'
Case Machine EQ 'MESSA012' ; ApplicationRootIP = '\\10.95.176.50' Case Machine EQ 'MESSA012' ; ApplicationRootIP = '\\10.95.176.50'
Case Machine EQ 'MESST5201' ; ApplicationRootIP = '\\10.95.140.14' Case Machine EQ 'MESST5201' ; ApplicationRootIP = '\\10.95.140.14'
Case Machine EQ 'MESST5202' ; ApplicationRootIP = '\\10.95.140.14' Case Machine EQ 'MESST5202' ; ApplicationRootIP = '\\10.95.140.14'
@ -207,15 +208,15 @@ end service
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
Service GetSpcFilesharePath() Service GetSpcFilesharePath()
IsProd = Environment_Services("IsProd") IsProd = Environment_Services("IsProd")
If IsProd EQ True$ then If IsProd EQ True$ then
Response = '\\mesfs.infineon.com\EC_SPC_Si_Import\TXT' Response = '\\mesfs.infineon.com\EC_SPC_Si_Import\TXT'
end else end else
Path = Environment_Services('GetApplicationRootPath'):'\SPC_Data' Path = Environment_Services('GetApplicationRootPath'):'\SPC_Data'
MakeDirSuccess = Utility("MAKEDIR", Path) MakeDirSuccess = Utility("MAKEDIR", Path)
Response = Path Response = Path
end end
end service end service
@ -227,15 +228,15 @@ end service
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
Service GetSPCDataPath() Service GetSPCDataPath()
IsProd = Environment_Services("IsProd") IsProd = Environment_Services("IsProd")
If IsProd EQ True$ then If IsProd EQ True$ then
Response = '\\messa04ec.infineon.com\OI_SPC_Data_Transfer' Response = '\\messa04ec.infineon.com\OI_SPC_Data_Transfer'
end else end else
Path = Environment_Services('GetApplicationRootPath'):'\SPC_Data' Path = Environment_Services('GetApplicationRootPath'):'\SPC_Data'
MakeDirSuccess = Utility("MAKEDIR", Path) MakeDirSuccess = Utility("MAKEDIR", Path)
Response = Path Response = Path
end end
end service end service
@ -279,6 +280,27 @@ Service GetMetrologyProductionPath()
end service 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
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// GetControlPlanProductionPath // GetControlPlanProductionPath
// //
@ -322,11 +344,11 @@ Service GetLocalRootPath()
Case Machine EQ 'MESSA012' ; LocalRootPath = 'D:' Case Machine EQ 'MESSA012' ; LocalRootPath = 'D:'
Case Machine EQ 'MESSA01EC' ; LocalRootPath = 'D:' Case Machine EQ 'MESSA01EC' ; LocalRootPath = 'D:'
Case Machine EQ 'MESTSA01EC' ; LocalRootPath = 'D:' Case Machine EQ 'MESTSA01EC' ; LocalRootPath = 'D:'
Case Machine EQ 'MESTSA09EC' ; LocalRootPath = 'D:' Case Machine EQ 'MESTSA09EC' ; LocalRootPath = 'D:'
Case Machine EQ 'MESTSA010EC' ; LocalRootPath = 'D:' Case Machine EQ 'MESTSA010EC' ; LocalRootPath = 'D:'
Case Machine EQ 'MESTSA011EC' ; LocalRootPath = 'D:' Case Machine EQ 'MESTSA011EC' ; LocalRootPath = 'D:'
Case Machine EQ 'MESTSA012EC' ; LocalRootPath = 'D:' Case Machine EQ 'MESTSA012EC' ; LocalRootPath = 'D:'
Case Machine EQ 'MESTSA024EC' ; 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 '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 '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 'MESTST1006' ; LocalRootPath = 'C:' ; // This is a map to the user's actual C drive.
@ -456,19 +478,19 @@ end service
Service GetSQLScrapeConnectionString() Service GetSQLScrapeConnectionString()
Machine = Environment_Services('GetServer') Machine = Environment_Services('GetServer')
Begin Case Begin Case
Case Machine = 'MESSA01EC' Case Machine = 'MESSA01EC'
// PROD SQL Servers // 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=""' 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') ) Case ( (Machine = 'MESTSA01EC') or (Machine = 'MESTSA09EC') or (Machine = 'MESTSA010EC') or (Machine = 'MESTSA011EC') or (Machine = 'MESTSA012EC') )
// DEV SQL Servers // 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=""' 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$ Case Otherwise$
// Default to DEV SQL Servers just in case // 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=""' 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 End Case
Response = ConnectionString Response = ConnectionString
end service end service
@ -493,65 +515,65 @@ end service
Service GetTempPath() Service GetTempPath()
TempDirectory = Str(\00\, 1024) TempDirectory = Str(\00\, 1024)
GetTempPath(Len(TempDirectory), TempDirectory) GetTempPath(Len(TempDirectory), TempDirectory)
Convert \00\ to '' in TempDirectory Convert \00\ to '' in TempDirectory
Response = TempDirectory Response = TempDirectory
end service end service
Service GetMonaResource() Service GetMonaResource()
If Environment_Services("IsProd") then If Environment_Services("IsProd") then
Response = "OPENINSIGHT_MES_OP_FE" Response = "OPENINSIGHT_MES_OP_FE"
end else end else
Response = "OPENINSIGHT_MES_OP_FE_DEV" Response = "OPENINSIGHT_MES_OP_FE_DEV"
end end
end service end service
Service GetMonInBufferedWorkerApiUrl() Service GetMonInBufferedWorkerApiUrl()
If Environment_Services("IsProd") then If Environment_Services("IsProd") then
Response = "https://messa014.infineon.com:7851" Response = "https://messa014.infineon.com:7851"
end else end else
Response = "https://mestsa008.infineon.com:7851" Response = "https://mestsa008.infineon.com:7851"
end end
end service end service
Service GetProveInApiUrl() Service GetProveInApiUrl()
If Environment_Services("IsProd") then If Environment_Services("IsProd") then
Response = "https://messa014.infineon.com:8851" Response = "https://messa014.infineon.com:8851"
end else end else
Response = "https://mestsa008.infineon.com:8851" Response = "https://mestsa008.infineon.com:8851"
end end
end service end service
Service GetIfxEmailServer() Service GetIfxEmailServer()
Response = 'smtp.intra.infineon.com' Response = 'smtp.intra.infineon.com'
end service end service
Service GetEnvironmentVariable(VariableName) Service GetEnvironmentVariable(VariableName)
If VariableName NE '' then If VariableName NE '' then
VarLength = GetEnvironmentVariable(VariableName, "", 0) + 1 VarLength = GetEnvironmentVariable(VariableName, "", 0) + 1
VarValue = space(VarLength+1) VarValue = space(VarLength+1)
VarLength = GetEnvironmentVariable(VariableName, VarValue, VarLength) VarLength = GetEnvironmentVariable(VariableName, VarValue, VarLength)
VarValue = VarValue[1, VarLength] VarValue = VarValue[1, VarLength]
Response = VarValue Response = VarValue
end else end else
Error_Services('Add', 'Error in service ':Service:'. Null VariableName passed in') Error_Services('Add', 'Error in service ':Service:'. Null VariableName passed in')
end end
end service end service
@ -579,7 +601,28 @@ Service GetScrapeServerPort()
end service 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 // Internal GoSubs
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -425,6 +425,38 @@ Service PrintReactorLabel(ReactNo, LoadLockSide=LOAD_LOCK_SIDE)
end service 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) Service GetReturnToFabLabelZPL(RTFId)
ZPLStringLabel = '' ZPLStringLabel = ''
@ -460,5 +492,3 @@ Service GetReturnToFabLabelZPL(RTFId)
end service end service

View File

@ -326,7 +326,7 @@ Service CreateNewLot(LotType, ProdName, LotQty, VendorPartNo, VendorLotNo, Vendo
Lot_Services('OpenLot', CreatedLotNumber) Lot_Services('OpenLot', CreatedLotNumber)
if Error_Services('NoError') then if Error_Services('NoError') then
// Move lot in // Move lot in
Lot_Services('MoveInLot', CreatedLotNumber, Username) Lot_Services('StartLot', CreatedLotNumber, 'SYSTEM')
if Error_Services('NoError') then if Error_Services('NoError') then
If PrinterID NE 'WEB' 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. // 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 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) Service IsOperationCompleted(LotOperationId)
@ -819,8 +846,14 @@ Service StartLot(LotId, Operator)
If RowExists('LOT', LotId) then If RowExists('LOT', LotId) then
Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'LOT_START', 'Lot started.', '', Operator) Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'LOT_START', 'Lot started.', '', Operator)
If Error_Services('NoError') then If Error_Services('NoError') then
Lot_Services('MoveInLot', LotId, Operator) CurrOperation = Lot_Services('GetLotCurrOperationName', LotId)
If Error_Services('HasError') then ErrorMessage = Error_Services('GetMessage') 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 end else
ErrorMessage = Error_Services('GetMessage') ErrorMessage = Error_Services('GetMessage')
end end
@ -958,12 +991,7 @@ Service MoveInLot(LotID, Operator)
CurrOperation = XLATE('LOT_OPERATION', ThisLotCurrOperationID, LOT_OPERATION_OPERATION_ID$, 'X') CurrOperation = XLATE('LOT_OPERATION', ThisLotCurrOperationID, LOT_OPERATION_OPERATION_ID$, 'X')
If Error_Services('NoError') then If Error_Services('NoError') then
Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'MOVE_IN', 'Lot moved into operation ' : CurrOperation : '.', '', Operator) Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'MOVE_IN', 'Lot moved into operation ' : CurrOperation : '.', '', Operator)
If Error_Services('NoError') then If Error_Services('HasError') then ErrorMessage = Error_Services('GetMessage')
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
end else end else
ErrorMessage = 'Error in Move In process for Lot id ' : LotId : '. ' : Error_Services('GetMessage') ErrorMessage = 'Error in Move In process for Lot id ' : LotId : '. ' : Error_Services('GetMessage')
end end
@ -1018,6 +1046,7 @@ Service MoveOutLot(LotID, Operator)
WaferQty = ThisLotRec<LOT_WAFER_QTY$> WaferQty = ThisLotRec<LOT_WAFER_QTY$>
If Error_Services('NoError') then If Error_Services('NoError') then
ThisLotCurrOperationID = Lot_Services('GetLotCurrOperationId', LotId) ThisLotCurrOperationID = Lot_Services('GetLotCurrOperationId', LotId)
ThisLotCurrOperationName = XLATE('LOT_OPERATION', ThisLotCurrOperationID, LOT_OPERATION_OPERATION_ID$, 'X')
If ThisLotCurrOperationID NE '' then If ThisLotCurrOperationID NE '' then
If Lot_Services('IsLotMovedIn', LotId) then If Lot_Services('IsLotMovedIn', LotId) then
ThisLotCurrOperationRec = Database_Services('ReadDataRow', 'LOT_OPERATION', ThisLotCurrOperationID) ThisLotCurrOperationRec = Database_Services('ReadDataRow', 'LOT_OPERATION', ThisLotCurrOperationID)
@ -1029,7 +1058,23 @@ Service MoveOutLot(LotID, Operator)
LotType = XLATE('LOT', LotId, LOT_TYPE$, 'X') LotType = XLATE('LOT', LotId, LOT_TYPE$, 'X')
CurrOperation = XLATE('LOT_OPERATION', ThisLotCurrOperationID, LOT_OPERATION_OPERATION_ID$, 'X') CurrOperation = XLATE('LOT_OPERATION', ThisLotCurrOperationID, LOT_OPERATION_OPERATION_ID$, 'X')
If Error_Services('NoError') then 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 end else
ErrorMessage = 'Error in Move In process for Lot id ' : LotId : '. ' : Error_Services('GetMessage') ErrorMessage = 'Error in Move In process for Lot id ' : LotId : '. ' : Error_Services('GetMessage')
end end
@ -1229,9 +1274,7 @@ Service OpenLot(LotId)
LotRec = Database_Services('ReadDataRow', 'LOT', LotId, True$, 0, False$) LotRec = Database_Services('ReadDataRow', 'LOT', LotId, True$, 0, False$)
LotRec<LOT_OPEN$> = True$ LotRec<LOT_OPEN$> = True$
Database_Services('WriteDataRow', 'LOT', LotId, LotRec, True$, False$, False$) Database_Services('WriteDataRow', 'LOT', LotId, LotRec, True$, False$, False$)
If Error_Services('NoError') then If Error_Services('HasError') then
Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'LOT_START', 'Lot created.', '', 'SYSTEM')
end else
ErrorMessage = 'Error setting lot ' : LotId : ' to open.' : Error_Services('GetMessage') ErrorMessage = 'Error setting lot ' : LotId : ' to open.' : Error_Services('GetMessage')
end end
end else end else
@ -1272,51 +1315,39 @@ Service CloseLot(LotId)
end service end service
Service AutoCloseTestWaferLot(LotId, CloseUserId) Service AutoCloseLot(LotId, CloseUserId)
AutoCloseTime = Datetime() AutoCloseTime = Datetime()
ErrorMessage = '' ErrorMessage = ''
If MemberOf(CloseUserId, 'LEAD') OR MemberOf(CloseUserId, 'SUPERVISOR') OR CloseUserId EQ 'SYSTEM' then If MemberOf(CloseUserId, 'LEAD') OR MemberOf(CloseUserId, 'SUPERVISOR') OR CloseUserId EQ 'SYSTEM' then
LotOperations = Lot_Services('GetLotOperationSequence', LotId) LotOperations = Lot_Services('GetLotOperationSequence', LotId)
for LotOperationIndex = 1 to DCount(LotOperations, @FM) for LotOperationIndex = 1 to DCount(LotOperations, @FM)
Until ErrorMessage NE ''
ThisLotOperationId = LotOperations<LotOperationIndex> ThisLotOperationId = LotOperations<LotOperationIndex>
ThisOperationCompleted = Lot_Services('IsOperationCompleted', ThisLotOperationId) ThisOperationCompleted = Lot_Services('IsOperationCompleted', ThisLotOperationId)
If Error_Services('NoError') then If Error_Services('NoError') then
if Not(ThisOperationCompleted) then if Not(ThisOperationCompleted) then
ThisLotOperationRec = Database_Services('ReadDataRow', 'LOT_OPERATION', ThisLotOperationId) MovedIn = Lot_Services('IsLotMovedIn', LotId)
if Error_Services('NoError') then If MovedIn then
CurrLotQty = Database_Services('ReadDataColumn', 'LOT', LotId, LOT_WAFER_QTY$, True$, 0, False$) Lot_Services('MoveOutLot', LotId, CloseUserId)
If ThisLotOperationRec<LOT_OPERATION_DATETIME_IN$> EQ '' then If Error_Services('HasError') then
ThisLotOperationRec<LOT_OPERATION_DATETIME_IN$> = AutoCloseTime ErrorMessage = Error_Services('GetMessage')
end end else
If ThisLotOperationRec<LOT_OPERATION_DATETIME_OUT$> EQ '' then ErrorMessage = Error_Services('GetMessage')
ThisLotOperationRec<LOT_OPERATION_DATETIME_OUT$> = AutoCloseTime end
end end else
if ThisLotOperationRec<LOT_OPERATION_OPERATOR_IN_ID$> EQ '' then Lot_Services('MoveInLot', LotId, CloseUserId)
ThisLotOperationRec<LOT_OPERATION_OPERATOR_IN_ID$> = CloseUserId If Error_Services('NoError') then
end If Lot_Services('IsLastOperation', LotId, ThisLotOperationId) then
if ThisLotOperationRec<LOT_OPERATION_OPERATOR_OUT_ID$> EQ '' then Lot_Services('MoveOutLot', LotId, CloseUserId)
ThisLotOperationRec<LOT_OPERATION_OPERATOR_OUT_ID$> = CloseUserId If Error_Services('HasError') then
end ErrorMessage = Error_Services('GetMessage')
if ThisLotOperationRec<LOT_OPERATION_DATETIME_START$> EQ '' then end
ThisLotOperationRec<LOT_OPERATION_DATETIME_START$> = AutoCloseTime end
end end else
if ThisLotOperationRec<LOT_OPERATION_DATETIME_STOP$> EQ '' then ErrorMessage = Error_Services('GetMessage')
ThisLotOperationRec<LOT_OPERATION_DATETIME_STOP$> = AutoCloseTime end
end 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
end end
end else end else
ErrorMessage = Error_Services('GetMessage') ErrorMessage = Error_Services('GetMessage')
@ -1326,31 +1357,12 @@ Service AutoCloseTestWaferLot(LotId, CloseUserId)
ErrorMessage = CloseUserId : ' does not have permission to close this lot.' ErrorMessage = CloseUserId : ' does not have permission to close this lot.'
end end
If ErrorMessage EQ '' then If ErrorMessage EQ '' then
// Close Lot as there were no validation failures. LogData = ''
Lot_Services('CloseLot', LotId) LogData<1> = LoggingDTM
If Error_Services('NoError') then LogData<2> = LotId
LogData = '' LogData<3> = CloseUserId
LogData<1> = LoggingDTM LogData<4> = 'Successfully marked lot as closed.'
LogData<2> = LotId Logging_Services('AppendLog', objLotClosureLog, LogData, @RM, @FM, False$)
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
end else end else
ErrorMessage = 'Error in ' : service : ' with lot ' : LotId : ':' : ErrorMessage ErrorMessage = 'Error in ' : service : ' with lot ' : LotId : ':' : ErrorMessage
LogData = '' LogData = ''
@ -1413,7 +1425,7 @@ Service ReduceLotWaferCount(LotId, ReductionQty, OperatorId)
// Write Lot Event // Write Lot Event
Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'REDUCE_WAFER_QTY', 'Reduced wafer count by ' : ReductionQty, '', OperatorId, False$, '') 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 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) Service_Services('PostProcedure', 'LOT_SERVICES', ServiceParms)
If Error_Services('HasError') then If Error_Services('HasError') then
Recipients = Xlate('NOTIFICATION', 'FI_SUPPORT', NOTIFICATION_USER_ID$, 'X') Recipients = Xlate('NOTIFICATION', 'FI_SUPPORT', NOTIFICATION_USER_ID$, 'X')
@ -1619,3 +1631,4 @@ end service
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------

View File

@ -82,12 +82,15 @@ $Insert NOTIFICATION_EQUATES
$Insert RLIST_EQUATES $Insert RLIST_EQUATES
$Insert WM_OUT_EQUATES $Insert WM_OUT_EQUATES
$Insert IQS_VIOL_DATA_EQUATES $Insert IQS_VIOL_DATA_EQUATES
$Insert FEATURE_FLAGS_EQUATES
Common /MetrologyServices/ MachineType@, LegacyLotId@ Common /MetrologyServices/ MachineType@, LegacyLotId@
Equ RETRY_ATTEMPTS$ TO 3 Equ RETRY_ATTEMPTS$ TO 3
Equ MINUTES_UNTIL_RETRY$ TO 3 Equ MINUTES_UNTIL_RETRY$ TO 3
Equ IMPORT_VALIDATION_IDX$ TO 99
Equ ORP$THICK_READS TO 1 Equ ORP$THICK_READS TO 1
Equ ORP$SHEET_RHO_READS TO 2 Equ ORP$SHEET_RHO_READS TO 2
Equ ORP$HGCV1_READS TO 3 Equ ORP$HGCV1_READS TO 3
@ -338,6 +341,7 @@ Service GetHgCV(Handle)
Result<5> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].PSN'); // PSN Result<5> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].PSN'); // PSN
Result<8> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].Wafer'); // LayerZonePair Result<8> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].Wafer'); // LayerZonePair
Result<11> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].Date'); // Timestamp Result<11> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].Date'); // Timestamp
Result<IMPORT_VALIDATION_IDX$> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].IndexOf'); // Validation
END END
ForOffset = (RecordIndex - 1) * FieldPositionIncrement; ForOffset = (RecordIndex - 1) * FieldPositionIncrement;
Result<FieldPosition + ForOffset> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].Site'); // Position Result<FieldPosition + ForOffset> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].Site'); // Position
@ -404,6 +408,7 @@ end service
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
Service ImportMetrologyFiles(Machine=MACHINE_TYPES) Service ImportMetrologyFiles(Machine=MACHINE_TYPES)
ErrMsg = ''
If Machine NE '' then If Machine NE '' then
hSysLists = Database_Services('GetTableHandle', 'SYSLISTS') hSysLists = Database_Services('GetTableHandle', 'SYSLISTS')
Lock hSysLists, ServiceKeyID:'*':Machine then Lock hSysLists, ServiceKeyID:'*':Machine then
@ -430,10 +435,10 @@ Service ImportMetrologyFiles(Machine=MACHINE_TYPES)
Case Machine _EQC 'SRP' Case Machine _EQC 'SRP'
DataPath = Environment_Services('GetApplicationRootPath') : '\Metrology\MET08ANLYSDIFAAST230\Source\MET08ANLYSDIFAAST230\' DataPath = Environment_Services('GetApplicationRootPath') : '\Metrology\MET08ANLYSDIFAAST230\Source\MET08ANLYSDIFAAST230\'
Case Otherwise$ 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 End Case
If Error_Services('NoError') then If Error_Services('NoError') and ErrMsg EQ '' then
SearchPattern = '*.pdsf'; SearchPattern = '*.pdsf';
InitDir DataPath:SearchPattern InitDir DataPath:SearchPattern
FileList = DirList() FileList = DirList()
@ -525,23 +530,28 @@ Service ImportMetrologyFiles(Machine=MACHINE_TYPES)
************************* *************************
* Import metrology data * * Import metrology data *
************************* *************************
IF RunData NE '' then 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 END ELSE
Error_Services('Add', 'RunData argument was missing') ErrMsg = 'RunData argument was missing'
Metrology_Services('LogResults', '', '', 'UID001', Service : ' : ' : Error_Services('GetMessage')) Metrology_Services('LogResults', '', '', 'UID001', Service : ' : ' : ErrMsg)
END END
If Error_Services('NoError') then If Error_Services('NoError') and ErrMsg EQ '' then
Continue = True$ Continue = True$
end else end else
ErrorMessage = Error_Services('GetMessage') If ErrMsg EQ '' then ErrMsg = Error_Services('GetMessage')
FQAError = IndexC(ErrorMessage, 'FQA has already been signed', 1) FQAError = IndexC(ErrMsg, 'FQA has already been signed', 1)
If ( Index(ErrorMessage, 'UID002', 1) and (ImportAttempts LE RETRY_ATTEMPTS$) and Not(FQAError) ) then If ( Index(ErrMsg, 'UID002', 1) and (ImportAttempts LE RETRY_ATTEMPTS$) and Not(FQAError) ) then
Continue = False$ Continue = False$
end else end else
Continue = True$ Continue = True$
end end
end end
@ -561,10 +571,9 @@ Service ImportMetrologyFiles(Machine=MACHINE_TYPES)
Metrology_Services('LogResults', '', Machine, 'UID001', 'Delete : ' : FileName : ', Size : ' : FileSize : ', Error : ' : ErrCode) Metrology_Services('LogResults', '', Machine, 'UID001', 'Delete : ' : FileName : ', Size : ' : FileSize : ', Error : ' : ErrCode)
end end
END else END else
If ErrMsg EQ '' then ErrMsg = Error_Services('GetMessage')
ErrorMessage = Error_Services('GetMessage')
MetrologyLog = Database_Services('ReadDataRow', 'SYSLISTS', UCase(Machine):'_METROLOGY_LOG') 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$) Database_Services('WriteDataRow', 'SYSLISTS', UCase(Machine):'_METROLOGY_LOG', MetrologyLog, True$)
end end
@ -577,7 +586,8 @@ Service ImportMetrologyFiles(Machine=MACHINE_TYPES)
NEXT FileLoopIndex NEXT FileLoopIndex
end else end else
Metrology_Services('LogResults', '', '', 'UID001', Error_Services('GetMessage')) If ErrMsg EQ '' then ErrMsg = Error_Services('GetMessage')
Metrology_Services('LogResults', '', '', 'UID001', ErrMsg)
end end
Unlock hSysLists, ServiceKeyID:'*':Machine else Null Unlock hSysLists, ServiceKeyID:'*':Machine else Null
end end
@ -585,6 +595,8 @@ Service ImportMetrologyFiles(Machine=MACHINE_TYPES)
Metrology_Services('LogResults', '', '', 'UID001', 'Null Machine passed into service') Metrology_Services('LogResults', '', '', 'UID001', 'Null Machine passed into service')
end end
If ErrMsg NE '' then Error_Services('Add', ErrMsg)
end service end service
@ -3203,6 +3215,13 @@ Service ScanNumDataPointsMatchesRdsTestSpecThickMPattern(RdsNo, RecipeLayer, Sca
Response = MatchFound Response = MatchFound
end service 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 // Internal GoSubs
@ -3646,3 +3665,5 @@ LoadRunDataToDatabase:
end end
return return

View File

@ -273,7 +273,8 @@ WRITE_RECORD:
Next RDSNo Next RDSNo
If (OrgQty NE NewQty) then If (OrgQty NE NewQty) then
Service_Services('PostProcedure', 'WORK_ORDER_SERVICES', 'UpdateScrappedQty':SD$:WorkOrderNo) ScrapAdj = NewQty - OrgQty
Work_Order_Services('AdjustScrappedQty', WorkOrderNo, ScrapAdj)
end end
// On the write of the record, read then write associated WM_IN and WM_OUT records to trigger the WM_MFS. // 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$) Database_Services('WriteDataRow', 'WM_OUT', WMOKey, WMORec, True$, True$, False$)
end end
SAPTestFlag = Xlate('APP_INFO', 'SAP_TEST_FLAG', 1, 'X') // If NCR created after cassette has received a batch number, then inform SAP of new quantities
If SAPTestFlag then SAPBatchNo = Xlate('WO_MAT', WOMatKey, 'SAP_BATCH_NO', 'X')
// If NCR created after cassette has received a batch number, then inform SAP of new quantities IF SAPBatchNo NE '' THEN
SAPBatchNo = Xlate('WO_MAT', WOMatKey, 'SAP_BATCH_NO', 'X')
IF SAPBatchNo NE '' THEN
IF (ReactorType = 'EPP') OR (ReactorType = 'EpiPro') THEN IF (ReactorType = 'EPP') OR (ReactorType = 'EpiPro') THEN
WMOutKey = Xlate('WO_MAT', WOMatKey, 'WMO_KEY', 'X') WMOutKey = Xlate('WO_MAT', WOMatKey, 'WMO_KEY', 'X')
CassStatus = Xlate('WM_OUT', WMOutKey, 'CURR_STATUS', 'X') CassStatus = Xlate('WM_OUT', WMOutKey, 'CURR_STATUS', 'X')
END ELSE END ELSE
// Non-EpiPro // Non-EpiPro
RDSNo = Xlate('WO_MAT', WoMatKey, 'RDS_NO', 'X') RDSNo = Xlate('WO_MAT', WoMatKey, 'RDS_NO', 'X')
CassStatus = Xlate('RDS', RDSNo, 'CURR_STATUS', 'X') CassStatus = Xlate('RDS', RDSNo, 'CURR_STATUS', 'X')
END END
// Add SAP transaction // Add SAP transaction
IF OrigRecord = '' THEN IF OrigRecord = '' THEN
TransQty = NewQty TransQty = NewQty
END ELSE END ELSE
TransQty = NewQty - OrgQty TransQty = NewQty - OrgQty
END END
IF TransQty NE 0 THEN IF TransQty NE 0 THEN
obj_SAP('AddTransaction','SCRAP_IN':@RM:WorkOrderNo:@RM:CassNo:@RM:TransQty) obj_SAP('AddTransaction','SCRAP_IN':@RM:WorkOrderNo:@RM:CassNo:@RM:TransQty)
If TransQty LT 0 then If TransQty LT 0 then
// Log negative SAP scrap transaction to capture metrics to submit for SAP change request // Log negative SAP scrap transaction to capture metrics to submit for SAP change request
LogData = '' LogData = ''
LogData<1> = LoggingDTM LogData<1> = LoggingDTM
LogData<2> = @User4 LogData<2> = @User4
LogData<3> = Name LogData<3> = Name
LogData<4> = SAPBatchNo LogData<4> = SAPBatchNo
LogData<5> = TransQty LogData<5> = TransQty
Logging_Services('AppendLog', objSAPLog, LogData, @RM, @FM) Logging_Services('AppendLog', objSAPLog, LogData, @RM, @FM)
end end
end end
end end
end
OrigStatus = OrigRecord<NCR_STATUS$> OrigStatus = OrigRecord<NCR_STATUS$>
NewStatus = Record<NCR_STATUS$> NewStatus = Record<NCR_STATUS$>
@ -666,6 +664,7 @@ WRITE_RECORD:
end end
end end
end end
return return
DELETE_RECORD_PRE: DELETE_RECORD_PRE:
@ -746,11 +745,13 @@ DELETE_RECORD:
Pass_To_SQL('WRITE', 'RDS', RDSNo) Pass_To_SQL('WRITE', 'RDS', RDSNo)
Next 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 return
// ----- Internal Methods ---------------------------------------------------------------------------------------------- // ----- Internal Methods ----------------------------------------------------------------------------------------------

View File

@ -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

View File

@ -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

View File

@ -36,7 +36,7 @@ $Insert APP_INSERTS
$Insert EVENT_SETUP $Insert EVENT_SETUP
$Insert MSG_EQUATES $Insert MSG_EQUATES
Declare function Reactor_Services Declare function Reactor_Services, Labeling_Services, Printer_Select
Declare subroutine PlaceDialog, Labeling_Services Declare subroutine PlaceDialog, Labeling_Services
GoToEvent Event for CtrlEntId else GoToEvent Event for CtrlEntId else
@ -77,15 +77,30 @@ end event
Event PUB_PRINT.CLICK() Event PUB_PRINT.CLICK()
ErrorMsg = ''
ReactNo = Get_Property(@Window:'.COB_REACTOR', 'TEXT') ReactNo = Get_Property(@Window:'.COB_REACTOR', 'TEXT')
LLSide = Get_Property(@Window:'.COB_LOAD_LOCK_SIDE', 'TEXT') LLSide = Get_Property(@Window:'.COB_LOAD_LOCK_SIDE', 'TEXT')
Def = "" ReactorZpl = Labeling_Services('GetReactorLabelZPL', ReactNo, LLSide)
Def<MTEXT$> = "Printing label..." If Error_Services('NoError') then
Def<MTYPE$> = "U" PrintPath = Printer_Select()
MsgUp = Msg(@window, Def) ;* display the processing message If PrintPath NE '' then
Labeling_Services('PrintReactorLabel', ReactNo, LLSide) Def = ""
Msg(@window, MsgUp) ;* take down the processing message Def<MTEXT$> = "Printing label..."
If Error_Services('HasError') then Error_Services('DisplayError') 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 end event

View File

@ -44,7 +44,7 @@ $insert SUPPLEMENTS_EQUATES
equ WOCust$ to 2 equ WOCust$ to 2
Declare subroutine SRP_Show_Window, Rds_Services, ErrMsg, Start_Window, Placedialog, Supplement_Services, Hold_Services 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 Database_Services, Material_Services, Rds_Services, RGB, SRP_Array, MemberOf, Supplement_Services
Declare function Hold_Services, Datetime, Printer_Select Declare function Hold_Services, Datetime, Printer_Select
@ -59,11 +59,11 @@ If Event EQ 'OLE' then
Transfer Param1 to Event Transfer Param1 to Event
Transfer Param2 to Param1 Transfer Param2 to Param1
Transfer Param3 to Param2 Transfer Param3 to Param2
* Transfer Param4 to Param3 Transfer Param4 to Param3
* Transfer Param5 to Param4 Transfer Param5 to Param4
* Transfer Param6 to Param5 Transfer Param6 to Param5
* Transfer Param7 to Param6 Transfer Param7 to Param6
* Transfer Param8 to Param7 Transfer Param8 to Param7
end end
GoToEvent Event for CtrlEntID GoToEvent Event for CtrlEntID
@ -186,78 +186,83 @@ Event PUB_ENG_OPTIONS.CLICK()
NumRows = DCount(WOMatKeys, @VM) NumRows = DCount(WOMatKeys, @VM)
Begin Case ServiceModules = ''
Services = ''
Caption = ''
Case SelOpt EQ 'CLEAN_INSP' For each Sel in SelOpt using @VM
Caption = "Updating Clean & Insp specs for selected RDS cassettes..." If Sel EQ 'CLEAN_INSP' then
ServiceModules = 'CLEAN_INSP_SERVICES' Caption<0, -1> = "Updating Clean & Insp specs for selected RDS cassettes..."
Services = 'UpdateAllCleanInsp' ServiceModules<0, -1> = 'CLEAN_INSP_SERVICES'
Services<0, -1> = 'UpdateAllCleanInsp'
end
Case SelOpt EQ 'QA_MET' If SelOpt EQ 'QA_MET' then
Caption = "Updating QA Metrology specs for selected RDS cassettes..." Caption<0, -1> = "Updating QA Metrology specs for selected RDS cassettes..."
ServiceModules = 'WO_MAT_QA_SERVICES' ServiceModules<0, -1> = 'WO_MAT_QA_SERVICES'
Services = 'UpdateQAMet' Services<0, -1> = 'UpdateQAMet'
end
Case SelOpt EQ 'UPDATE_RDS_LAYER' If SelOpt EQ 'UPDATE_RDS_LAYER' then
Caption = "Updating RDS Layer specs for selected RDS cassettes..." Caption<0, -1> = "Updating RDS Layer specs for selected RDS cassettes..."
ServiceModules = 'RDS_LAYER_SERVICES' ServiceModules<0, -1> = 'RDS_LAYER_SERVICES'
Services = 'UpdateRDSLayerSpecs' Services<0, -1> = 'UpdateRDSLayerSpecs'
end
Case SelOpt EQ 'CLEAN_INSP':@VM:'QA_MET' If SelOpt EQ 'UPDATE_RDS_TEST' then
Caption = "Updating Clean & Insp and QA Metrology specs for selected RDS cassettes..." Caption<0, -1> = "Updating RDS Test specs for selected RDS cassettes..."
ServiceModules = 'CLEAN_INSP_SERVICES':@VM:'WO_MAT_QA_SERVICES' ServiceModules<0, -1> = 'RDS_TEST_SERVICES'
Services = 'UpdateAllCleanInsp':@VM:'UpdateQAMet' Services<0, -1> = 'UpdateRDSTestSpecs'
end
Next Sel
Case SelOpt EQ 'QA_MET':@VM:'UPDATE_RDS_LAYER' Swap @VM with CRLF$ in Caption
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 ServiceModules NE '' then If ServiceModules NE '' then
Def = "" ErrorMsg = ''
Def = ''
Def<MCAPTION$> = Caption Def<MCAPTION$> = Caption
Def<MTYPE$> = "GC" Def<MTYPE$> = "GC"
Def<MEXTENT$> = NumRows Def<MEXTENT$> = NumRows
Def<MTEXTWIDTH$> = 600 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 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 For each ServiceModule in ServiceModules using @VM setting sPos
Service = Services<0, sPos> Service = Services<0, sPos>
If Service = 'UpdateRDSLayerSpecs' then If ( (Service _EQC 'UpdateRDSLayerSpecs') or (Service _EQC 'UpdateRDSTestSpecs') ) then
RDSKey = SelRDSList<4, vPos> RDSKey = SelRDSList<4, vPos>
Ans = Function(@ServiceModule(Service, RDSKey)) Ans = Function(@ServiceModule(Service, RDSKey))
end else end else
Ans = Function(@ServiceModule(Service, WOMatKey)) Ans = Function(@ServiceModule(Service, WOMatKey))
end end
If Error_Services('HasError') then If Error_Services('HasError') then
Error_Services('DisplayError') ErrorMsg = Error_Services('GetMessage')
end end
Until (ErrorMsg NE '')
Next ServiceModule Next ServiceModule
Until (ErrorMsg NE '')
Next WOMatKey Next WOMatKey
Msg(@WINDOW,MsgUp) ;* Take gas guage down
Msg(@Window,MsgUp) ;* Take gas guage down
end end
If Error_Services('NoError') then Def = ''
Def = "" Def<MCOL$> = -2
Def<MROW$> = -2
If (ErrorMsg EQ '') then
Def<MICON$> = '*' Def<MICON$> = '*'
Def<MCAPTION$> = 'Success' Def<MCAPTION$> = 'Success'
Def<MTEXT$> = "Update complete!" Def<MTEXT$> = 'Update complete!'
Def<MTYPE$> = "BO" end else
MsgUp = Msg(@window, Def) Def<MICON$> = 'H'
Def<MCAPTION$> = 'Update failed!'
Def<MTEXT$> = ErrorMsg
end end
Def<MTYPE$> = "BO"
MsgUp = Msg(@Window, Def, 'OK')
end end
end event end event
@ -277,7 +282,7 @@ Event PUB_ON_HOLD.CLICK()
HoldEntity = 'RDS' HoldEntity = 'RDS'
HoldType = 'HOLD' HoldType = 'HOLD'
HoldData = '' 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 If HoldData NE 'Cancel' then
GoSub GetView GoSub GetView
Hold_Services('EnableMultipleHolds', WOMatKeys, HoldEntity, RDSKeys, 'NDW_RDS_QUERY', '', HoldData) Hold_Services('EnableMultipleHolds', WOMatKeys, HoldEntity, RDSKeys, 'NDW_RDS_QUERY', '', HoldData)
@ -289,7 +294,7 @@ Event PUB_ON_HOLD.CLICK()
MsgInfo<MTYPE$> = 'BNY' MsgInfo<MTYPE$> = 'BNY'
MsgInfo<MTEXT$> = 'Hold Successful. Would you like to print label(s)?' MsgInfo<MTEXT$> = 'Hold Successful. Would you like to print label(s)?'
MsgInfo<MICON$> = '!' MsgInfo<MICON$> = '!'
PrintLabel = Msg(@WINDOW,MsgInfo,'') PrintLabel = Msg(@Window,MsgInfo,'')
HoldBy = HoldData<1> HoldBy = HoldData<1>
Reason = HoldData<2> Reason = HoldData<2>
Stage = HoldData<4> Stage = HoldData<4>
@ -333,7 +338,7 @@ Event PUB_OFF_HOLD.CLICK()
Transition = True$ Transition = True$
HoldType = 'HOLD' HoldType = 'HOLD'
HoldData = '' 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 If HoldData NE 'Cancel' then
GoSub GetView GoSub GetView
Hold_Services('DisableMultipleHolds', WOMatKeys, 'RDS', RDSKeys, 'NDW_RDS_QUERY', '', HoldData) Hold_Services('DisableMultipleHolds', WOMatKeys, 'RDS', RDSKeys, 'NDW_RDS_QUERY', '', HoldData)
@ -666,7 +671,7 @@ CheckSelectedForHolds:
Until HoldOnFlag EQ True$ and HoldOffFlag EQ True$ Until HoldOnFlag EQ True$ and HoldOffFlag EQ True$
Next K Next K
end 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 // IF ANY SELECTED LOTS ARE ON HOLD, ENABLE PUB_OFF_HOLD
Set_Property(@Window:'.PUB_OFF_HOLD', 'ENABLED', HoldOffFlag) Set_Property(@Window:'.PUB_OFF_HOLD', 'ENABLED', HoldOffFlag)
end else end else

View File

@ -723,12 +723,16 @@ Event OLE_SCHEDULE.OnContextMenuClick(Item, UserData)
Description = AddEventDetails<5> Description = AddEventDetails<5>
WaferQty = AddEventDetails<6> WaferQty = AddEventDetails<6>
NewApptID = Schedule_Services('AddSchedEvent', ReactorNo, WorkOrder, StartDTM, StopDTM, Description, WaferQty) NewApptID = Schedule_Services('AddSchedEvent', ReactorNo, WorkOrder, StartDTM, StopDTM, Description, WaferQty)
NewAppt = Schedule_Services('GetScheduleEvent', NewApptID)
If Error_Services('NoError') then If Error_Services('NoError') then
GoSub RefreshReactor NewAppt = Schedule_Services('GetScheduleEvent', NewApptID)
If NewApptID NE '' then If Error_Services('NoError') then
SchedRec = Database_Services('ReadDataRow', 'SCHED_DET_NG', NewApptID) GoSub RefreshReactor
Schedule_Services('NotifySupervisorsIfSameDayChange', SchedRec) If NewApptID NE '' then
SchedRec = Database_Services('ReadDataRow', 'SCHED_DET_NG', NewApptID)
Schedule_Services('NotifySupervisorsIfSameDayChange', SchedRec)
end
end else
Error_Services('DisplayError')
end end
end else end else
Error_Services('DisplayError') Error_Services('DisplayError')

View File

@ -1221,7 +1221,6 @@ Event PUB_REM_CASS.CLICK()
WmInKeys = '' WmInKeys = ''
for each CassetteToVoid in CassettesToVoid using @FM for each CassetteToVoid in CassettesToVoid using @FM
WmInKeys<1, -1> = CassetteToVoid<1,4> WmInKeys<1, -1> = CassetteToVoid<1,4>
//Work_Order_Services('SignVoidWMI', WMIToVoid, @USER4)
Next CassetteToVoid Next CassetteToVoid
Service_Services('PostProcedure', 'WORK_ORDER_SERVICES', 'SignVoidWMI':SD$:WmInKeys:SD$:WoNo:SD$:@USER4) Service_Services('PostProcedure', 'WORK_ORDER_SERVICES', 'SignVoidWMI':SD$:WmInKeys:SD$:WoNo:SD$:@USER4)
If Error_Services('HasError') then If Error_Services('HasError') then
@ -1240,7 +1239,6 @@ Event PUB_REM_CASS.CLICK()
CassNo = XLATE('RDS', RDSToVoid, RDS_CASS_NO$, 'X') CassNo = XLATE('RDS', RDSToVoid, RDS_CASS_NO$, 'X')
WOMatKey = WONo : '*' : CassNo WOMatKey = WONo : '*' : CassNo
WoMatKeyList<1, -1> = WoMatKey WoMatKeyList<1, -1> = WoMatKey
//Work_Order_Services('SignVoidNonEPP', WOMatKey, @USER4)
If Error_Services('HasError') then If Error_Services('HasError') then
ErrorMessage = Error_Services('GetMessage') ErrorMessage = Error_Services('GetMessage')
end end
@ -1332,7 +1330,7 @@ Event PUB_REM_WM_OUT.CLICK()
WmOutKeys<1, -1> = CassetteToVoid<1,3> WmOutKeys<1, -1> = CassetteToVoid<1,3>
Until ErrorMessage NE '' Until ErrorMessage NE ''
Next CassetteToVoid 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 If Error_Services('HasError') then
ErrorMessage = Error_Services('GetMessage') ErrorMessage = Error_Services('GetMessage')
end end

View File

@ -30,8 +30,7 @@ $Insert NICA_ORDERS_EQUATES
$Insert NICA_CHECKLISTS_EQUATES $Insert NICA_CHECKLISTS_EQUATES
$Insert NICA_ORDERS_CHECKLISTS_EQUATES $Insert NICA_ORDERS_CHECKLISTS_EQUATES
$Insert RLIST_EQUATES $Insert RLIST_EQUATES
$Insert TIME_INSERTS
Equ SECONDS_IN_DAY$ to 86400
Declare function Environment_Services, Database_Services, Error_Services, Logging_Services, Nica_Orders_Services 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 Declare function Httpclient_Services, SRP_JSON, Reactor_Services, Reactor_Log_Services, SRP_Array, Datetime

View File

@ -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

View File

@ -2108,5 +2108,3 @@ GetQAMet:
RETURN RETURN

View File

@ -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 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 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 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 MSG_EQUATES
$INSERT WO_VERIFY_EQU $INSERT WO_VERIFY_EQU
@ -375,6 +375,10 @@ Create:
Result = '' Result = ''
END ELSE 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) NewLotId = Lot_Services('CreateNewLot', 'RDS', '', WaferQty, SubPartNo, LotNo, SubVendCd, @User4, '', RDSNo)
If Rds_Services('IsEpiPro', RDSNo) then If Rds_Services('IsEpiPro', RDSNo) then
@ -1250,4 +1254,3 @@ CalcThickTarget:
RETURN RETURN

View File

@ -772,9 +772,7 @@ IF NOT(UnloadFailed) THEN
end else end else
LotId = Lot_Services('GetLotIdByLegacyLotIdAndType', RDSNo, 'RDS') LotId = Lot_Services('GetLotIdByLegacyLotIdAndType', RDSNo, 'RDS')
If Error_Services('NoError') then If Error_Services('NoError') then
Lot_Services('MoveOutLot', LotId, @User4) ; // Move out of POST_EPI operation Lot_Services('AutoCloseLot', LotId, 'SYSTEM')
Lot_Services('MoveInLot', LotId, @User4) ; // Move into RDS_CLOSE operation
Lot_Services('CloseLot', LotId)
end end
end end
@ -1683,3 +1681,4 @@ RETURN

View File

@ -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 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 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 $insert LOGICAL
@ -476,7 +476,9 @@ CopyStats:
DestRDSTestRec<RDS_TEST_HGCV1_RES_MAX$> = SourceRDSTestRec<RDS_TEST_HGCV1_RES_MAX$> 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$> = SourceRDSTestRec<RDS_TEST_HGCV1_RES_RANGE$>
DestRDSTestRec<RDS_TEST_HGCV1_RES_RANGE_PCNT$> = SourceRDSTestRec<RDS_TEST_HGCV1_RES_RANGE_PCNT$> 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, 2, 1, LockedRDSTestKey)
RTParms = FieldStore(RTParms, @RM, 4, 1, DestRDSTestRec) RTParms = FieldStore(RTParms, @RM, 4, 1, DestRDSTestRec)
@ -2052,3 +2054,4 @@ END ;* End of STRESS Property
RETURN RETURN

View File

@ -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 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 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 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 MSG_EQUATES
$INSERT WO_LOG_EQU $INSERT WO_LOG_EQU
@ -128,6 +128,9 @@ Create:
LogData<7> = WaferQty LogData<7> = WaferQty
Logging_Services('AppendLog', objLog, LogData, @RM, @FM) Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
Done = True$ Done = True$
WM_In_Services('VerifyWoStepWMIKeyIndex', WMInKey)
WM_In_Services('VerifyWOLogWMIKeyIndex', WMInKey)
WM_In_Services('VerifyWOMatWMIKeyIndex', WMInKey)
end end
Until ( (NumAttempts EQ 10) or (Done EQ True$) ) Until ( (NumAttempts EQ 10) or (Done EQ True$) )
Repeat Repeat
@ -940,6 +943,3 @@ RepProdTW:
RETURN RETURN

View File

@ -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 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 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 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 MSG_EQUATES
$Insert APP_INSERTS $Insert APP_INSERTS
@ -40,7 +40,7 @@ $Insert CLEAN_INSP_EQUATES
$Insert WMO_WFRS_EQUATES $Insert WMO_WFRS_EQUATES
$Insert REACT_RUN_EQUATES $Insert REACT_RUN_EQUATES
EQU NUM_RETRIES$ TO 50 EQU NUM_RETRIES$ TO 60
ErrTitle = 'Error in Stored Procedure "obj_WM_Out"' ErrTitle = 'Error in Stored Procedure "obj_WM_Out"'
ErrorMsg = '' ErrorMsg = ''
@ -115,13 +115,12 @@ Create:
WONo = Parms[1,@RM] WONo = Parms[1,@RM]
WOStep = Parms[COL2()+1,@RM] WOStep = Parms[COL2()+1,@RM]
NewCassNos = Parms[COL2()+1,@RM] NewCassNo = Parms[COL2()+1,@RM]
CassLoadQty = Parms[COL2()+1,@RM] CassLoadQty = Parms[COL2()+1,@RM]
IF WONo = '' THEN ErrorMsg = 'Null Parameter "WONo" passed to routine. (':Method:')' IF WONo = '' THEN ErrorMsg = 'Null Parameter "WONo" passed to routine. (':Method:')'
IF WOStep = '' THEN ErrorMsg = 'Null Parameter "WOStep" 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 IF ErrorMsg NE '' THEN RETURN
@ -161,11 +160,8 @@ Create:
WORec = XLATE('WO_LOG',WONo,'','X') WORec = XLATE('WO_LOG',WONo,'','X')
InboundWaferQty = 0 InboundWaferQty = 0
FOR I = 1 TO COUNT(NewCassNos,@VM) + (NewCassNos NE '') CassWfrQty = XLATE('WO_MAT',WONo:'*':NewCassNo,WO_MAT_WAFER_QTY$,'X')
NewCassNo = NewCassNos<1,I> InboundWaferQty += CassWfrQty
CassWfrQty = XLATE('WO_MAT',WONo:'*':NewCassNo,WO_MAT_WAFER_QTY$,'X')
InboundWaferQty += CassWfrQty
NEXT I
WMOutKeys = XLATE('WO_STEP',WONo:'*':WOStep,WO_STEP_WM_OUT_KEYS$,'X') 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 OutOnlyCassIDs = '' ;* List of Outbound only Cassette IDs added 8/12/1011 JCH
LOOP LOOP
UNTIL InboundWaferQty = 0 UNTIL InboundWaferQty EQ 0
WMOutKey = WONo:'*':WOStep:'*':WMOCassNo WMOutKey = WONo:'*':WOStep:'*':WMOCassNo
WMOutRec = XLATE('WM_OUT',WMOutKey,'','X') ;* In case there is a partial box WMOutRec = XLATE('WM_OUT',WMOutKey,'','X') ;* In case there is a partial box
NewBoxFlag = '' NewBoxFlag = ''
@ -250,7 +246,7 @@ Create:
NumAttempts = 0 NumAttempts = 0
Loop Loop
NumAttempts += 1 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$) Database_Services('WriteDataRow', 'WM_OUT', WMOutKey, WMOutRec, True$, False$, False$)
If Error_Services('HasError') then If Error_Services('HasError') then
// Log the error // Log the error
@ -272,6 +268,9 @@ Create:
LogData<6> = WMOCassNo LogData<6> = WMOCassNo
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM) Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
Done = True$ Done = True$
WM_Out_Services('VerifyWOLogWMOKeyIndex', WONo:'*':WOStep:'*':WMOCassNo)
WM_Out_Services('VerifyWOMatWMOKeyIndex', WONo:'*':WOStep:'*':WMOCassNo)
WM_Out_Services('VerifyWoStepWMOKeyIndex', WONo:'*':WOStep:'*':WMOCassNo)
end end
Until ( (NumAttempts GT NUM_RETRIES$) or (Done EQ True$) ) Until ( (NumAttempts GT NUM_RETRIES$) or (Done EQ True$) )
Repeat Repeat
@ -1999,6 +1998,3 @@ ConvertCleanInsp:
RETURN RETURN

View File

@ -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_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 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 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 MSG_EQUATES
$INSERT ORDER_EQU $INSERT ORDER_EQU
@ -53,7 +53,7 @@ $INSERT LOGICAL
$INSERT APPCOLORS $INSERT APPCOLORS
$INSERT WM_IN_EQUATES $INSERT WM_IN_EQUATES
EQU NUM_RETRIES$ TO 50 EQU NUM_RETRIES$ TO 60
EQU CRLF$ TO \0D0A\ EQU CRLF$ TO \0D0A\
EQU COMMA$ TO ',' EQU COMMA$ TO ','
@ -103,7 +103,7 @@ BEGIN CASE
CASE Method = 'OpenWONos' ; GOSUB OpenWONos CASE Method = 'OpenWONos' ; GOSUB OpenWONos
CASE Method = 'ShipWONos' ; GOSUB ShipWONos CASE Method = 'ShipWONos' ; GOSUB ShipWONos
CASE Method = 'WOStepStatus' ; GOSUB WOStepStatus CASE Method = 'WOStepStatus' ; GOSUB WOStepStatus
CASE Method = 'ReleaseCassettes' ; GOSUB ReleaseCassettes CASE Method = 'ReleaseCassette' ; GOSUB ReleaseCassette
CASE Method = 'RecallWO' ; GOSUB RecallWO CASE Method = 'RecallWO' ; GOSUB RecallWO
CASE Method = 'ChangeLotNo' ; GOSUB ChangeLotNo CASE Method = 'ChangeLotNo' ; GOSUB ChangeLotNo
CASE Method = 'ChangeCassQty' ; GOSUB ChangeCassQty CASE Method = 'ChangeCassQty' ; GOSUB ChangeCassQty
@ -967,11 +967,11 @@ RETURN
* * * * * * * * * * * * * *
ReleaseCassettes: ReleaseCassette:
* * * * * * * * * * * * * *
WONo = Parms[1,@RM] WONo = Parms[1,@RM]
CassNos = Parms[COL2()+1,@RM] CassNo = Parms[COL2()+1,@RM]
ReleaseUser = Parms[COL2()+1,@RM] ReleaseUser = Parms[COL2()+1,@RM]
RelDtm = Parms[COL2()+1,@RM] RelDtm = Parms[COL2()+1,@RM]
@ -979,7 +979,7 @@ ReleaseCassettes:
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS') LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
LogData<2> = ReleaseUser LogData<2> = ReleaseUser
LogData<3> = WONo 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) Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
IF WONo = '' THEN ErrorMsg = 'Null parameter WONo passed to routine (':Method:').' 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 OrdSummary = '' ;* Holds Order Detail Lot Numbers and Associated Order Item Numbers
CassCnt = COUNT(CassNos,@VM) + (CassNos NE '') WOMKey = WONo:'*':CassNo
WOMKeys = ''
FOR K = 1 TO CassCnt
WOMKeys<1,K> = WONo:'*':CassNos<1,K>
NEXT K
WOMTableVar = Database_Services('GetTableHandle', 'WO_MAT') WOMTableVar = Database_Services('GetTableHandle', 'WO_MAT')
@ -1065,7 +1060,7 @@ ReleaseCassettes:
END END
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS') 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) Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
EpiPN = WORec<WO_LOG_EPI_PART_NO$> EpiPN = WORec<WO_LOG_EPI_PART_NO$>
@ -1093,149 +1088,138 @@ ReleaseCassettes:
// Log variables before obj_WM_Out('Create') // Log variables before obj_WM_Out('Create')
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS') 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) Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
IF ReactorType = 'EPP' THEN IF ReactorType = 'EPP' THEN
Send_Info('Creating WM_OUT records for WOStep ':WOStep:'...') 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 END ELSE
OutOnlyCassIDs = '' OutOnlyCassIDs = ''
END END
StepRDSNos = '' StepRDSNos = ''
CassCnt = COUNT(CassNos,@VM) + (CassNos NE '')
// Log variables after obj_WM_Out('Create') // Log variables after obj_WM_Out('Create')
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS') 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) Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS') 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) 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') CassWaferQty = XLATE('WO_MAT',WONo:'*':CassNo,WO_MAT_WAFER_QTY$,'X')
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNos:':CassNos:' CassCnt:':CassCnt:' WMOLoadQty:':WMOLoadQty:' ||| Trace 2.':N WMIKey = WONo:'*':WOStep:'*':CassNo
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM) 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') CassLotNo = WOMatRec<WO_MAT_LOT_NO$>
WMIKey = WONo:'*':WOStep:'*':CassNo CassWaferQty = WOMatRec<WO_MAT_WAFER_QTY$>
obj_WM_IN('Create',WONo:@RM:WOStep:@RM:CassNo:@RM:CassWaferQty) 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') Parms = WONo:@RM
RDSNoCheck = WOMatRec<WO_MAT_RDS_NO$> Parms := WOStep:@RM
If RDSNoCheck EQ '' then 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
CassLotNo = WOMatRec<WO_MAT_LOT_NO$> IF ReactorType NE 'GAN' then
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$>
IF OrderNo = '' THEN LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
QuoteNo = '' LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNo:':CassNo:' WMOLoadQty:':WMOLoadQty:' ||| Trace 2.1 - Start obj_RDS("Create")'
END ELSE Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
QuoteNo = XLATE('ORDER_DET',OrderNo:'*':CassOrderItem,ORDER_DET_QUOTE_NO$,'X') Done = False$
END 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
Parms = WONo:@RM LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
Parms := WOStep:@RM LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNo:':CassNo:' WMOLoadQty:':WMOLoadQty:' ||| Trace 2.2 - End obj_RDS("Create")'
Parms := LastStep:@RM Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
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') ErrMsg(errCode)
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNos:':CassNos:' CassCnt:':CassCnt:' WMOLoadQty:':WMOLoadQty:' ||| Trace 2.':N:'.1 - Start obj_RDS("Create")' ErrorMsg = "RDS '" : NewRDSNo : "' Create Failure - Check for missing data on Work Order"
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM) If Error_Services('HasError') then
Done = False$ ErrMsg = Error_Services('GetMessage')
For AttemptIndex = 1 to NUM_RETRIES$ LogData = LoggingDTM : ',' : ReleaseUser : ',' : WONo : ',' : ErrMsg
If (AttemptIndex GT 1) then Delay(AttemptIndex) Logging_Services('AppendLog', objLog, LogData, CRLF$, COMMA$, False$, '', LogData)
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
end end
IF ReprocessedMat THEN RTParms = 'RDS'
OrgRDSNo = CassLotNo FOR I = 1 TO COUNT(StepRdsNos,@VM) + (StepRdsNos NE '')
obj_Reprocess('FixUp',OrgRDSNo:@RM:NewRDSNo) RdsNo = StepRdsNos<1,I>
END 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
END ;* End of check for GAN reactor IF ReprocessedMat THEN
END ;* End of Check for existing RDS OrgRDSNo = CassLotNo
END ;* End of check for EpiPRO reactor type obj_Reprocess('FixUp',OrgRDSNo:@RM:NewRDSNo)
NEXT N 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 NEXT WOStep
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS') 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) Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
If RelDtm EQ '' then If RelDtm EQ '' then
@ -1251,95 +1235,91 @@ ReleaseCassettes:
MaxShipQty = Xlate('WO_LOG', WONo, 'CUST_EPI_PART_SHIP_QTY', 'X') MaxShipQty = Xlate('WO_LOG', WONo, 'CUST_EPI_PART_SHIP_QTY', 'X')
FOR N = 1 TO CassCnt CassNo = FIELD(WOMKey,'*',2)
WOMKey = WOMKeys<1,N> // Keep trying to get the lock. Another process may be updating this record at the same time.
CassNo = FIELD(WOMKey,'*',2) Done = False$
// Keep trying to get the lock. Another process may be updating this record at the same time. For AttemptIndex = 1 to NUM_RETRIES$
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<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNos:':CassNos:' CassCnt:':CassCnt:' WMOLoadQty:':WMOLoadQty:' ||| Trace 3.':AttemptIndex LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNo:':CassNo:' WMOLoadQty:':WMOLoadQty:' ||| Trace 3.':AttemptIndex:' Have lock!'
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM) Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
If (AttemptIndex GT 1) then Delay(AttemptIndex) WOMatRec = XLATE('WO_MAT',WOMKey,'','X') ;* We have the lock, so just get the record this way
HaveLock = Database_Services('GetKeyIDLock', 'WO_MAT', WOMKey)
If HaveLock then
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS') IF WOMatRec<WO_MAT_REL_DTM$> = '' THEN
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNos:':CassNos:' CassCnt:':CassCnt:' WMOLoadQty:':WMOLoadQty:' ||| Trace 3.':AttemptIndex:' Have lock!' WOMatRec<WO_MAT_REL_DTM$> = IConv(RelDTM,'DT')
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM) WOMatRec<WO_MAT_REL_BY$> = ReleaseUser
WOMatRec<WO_MAT_ORG_COMMIT_DT$> = PromiseDt
WOMatRec = XLATE('WO_MAT',WOMKey,'','X') ;* We have the lock, so just get the record this way IF SubPreClean = 'No' OR SubPreClean = '' THEN
WOMatRec<WO_MAT_WMI_CURR_STATUS$> = 'RTU'
END ELSE
WOMatRec<WO_MAT_WMI_CURR_STATUS$> = 'PREC'
END
IF WOMatRec<WO_MAT_REL_DTM$> = '' THEN WOMatRec<WO_MAT_WMO_CURR_STATUS$> = 'RTB'
WOMatRec<WO_MAT_REL_DTM$> = IConv(RelDTM,'DT')
WOMatRec<WO_MAT_REL_BY$> = ReleaseUser
WOMatRec<WO_MAT_ORG_COMMIT_DT$> = PromiseDt
IF SubPreClean = 'No' OR SubPreClean = '' THEN thisInvDTM = ICONV(RelDTM,'DT')
WOMatRec<WO_MAT_WMI_CURR_STATUS$> = 'RTU'
END ELSE
WOMatRec<WO_MAT_WMI_CURR_STATUS$> = 'PREC'
END
WOMatRec<WO_MAT_WMO_CURR_STATUS$> = 'RTB' WHCd = 'SR'
LocCd = 'RB'
InvAction = 'REL'
ScanUserID = ReleaseUser
Tag = ''
ToolID = ''
thisInvDTM = ICONV(RelDTM,'DT') LOCATE thisInvDTM IN WOMatRec<WO_MAT_INV_DTM$> BY 'AR' USING @VM SETTING Pos ELSE
WHCd = 'SR' WOMatRec = INSERT(WOMatRec,WO_MAT_INV_WH$,Pos,0,WHCd)
LocCd = 'RB' WOMatRec = INSERT(WOMatRec,WO_MAT_INV_LOCATION$,Pos,0,LocCd)
InvAction = 'REL' WOMatRec = INSERT(WOMatRec,WO_MAT_INV_ACTION$,Pos,0,InvAction)
ScanUserID = ReleaseUser WOMatRec = INSERT(WOMatRec,WO_MAT_INV_DTM$,Pos,0,thisInvDTM)
Tag = '' WOMatRec = INSERT(WOMatRec,WO_MAT_INV_USER$,Pos,0,ScanUserID)
ToolID = '' 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$)
LOCATE thisInvDTM IN WOMatRec<WO_MAT_INV_DTM$> BY 'AR' USING @VM SETTING Pos ELSE END
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_WH$,Pos,0,WHCd) WOMatParms = 'WO_MAT':@RM:WOMKey:@RM:WOMTableVar:@RM:WOMatRec
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_LOCATION$,Pos,0,LocCd) obj_Tables('WriteRec',WOMatParms) ;* This writes and unlocks the WO_MAT records
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 If Not(Get_Status(errCode)) then
Done = True$
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
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS') 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.' 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) Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
end end
end
Until Done
Next AttemptIndex
NEXT N 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
end
Until Done
Next AttemptIndex
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS') 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) Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
OutOnlyCnt = COUNT(OutOnlyCassIDs,@VM) + (OutOnlyCassIDs NE '') OutOnlyCnt = DCount(OutOnlyCassIDs, @VM)
ExistingWOMatKeys = WORec<WO_LOG_WO_MAT_KEY$> ExistingWOMatKeys = WORec<WO_LOG_WO_MAT_KEY$>
NewWOMatKeys = ExistingWOMatKeys NewWOMatKeys = ExistingWOMatKeys
FOR I = 1 TO OutOnlyCnt FOR I = 1 TO OutOnlyCnt
@ -1351,7 +1331,7 @@ ReleaseCassettes:
NEXT I NEXT I
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS') 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) 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$ 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 If ErrorMsg NE '' then
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS') 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) Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
end end
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS') 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) Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
RETURN RETURN
@ -2348,7 +2328,6 @@ Route:
IF Get_Status(errCode) THEN RETURN IF Get_Status(errCode) THEN RETURN
WOStepKeys = WOLogRec<WO_LOG_WO_STEP_KEY$> WOStepKeys = WOLogRec<WO_LOG_WO_STEP_KEY$>
IF WOStepKeys NE '' THEN IF WOStepKeys NE '' THEN
@ -2386,7 +2365,6 @@ Route:
DefWMOCassQtys = XLATE('CUST_EPI_PART',CustNo:'*':EpiPartNo,CUST_EPI_PART_WMO_LOAD_CNT$,'X') DefWMOCassQtys = XLATE('CUST_EPI_PART',CustNo:'*':EpiPartNo,CUST_EPI_PART_WMO_LOAD_CNT$,'X')
WOStepKeys = '' WOStepKeys = ''
DefWMOCassQty = '' DefWMOCassQty = ''
@ -2418,8 +2396,43 @@ Route:
WOLogRec<WO_LOG_CUST_PART_NO$> = EpiPN WOLogRec<WO_LOG_CUST_PART_NO$> = EpiPN
END END
WOLogRec<WO_LOG_PROD_VER_NO$> = ProdVerNo WOLogRec<WO_LOG_PROD_VER_NO$> = ProdVerNo
WOLogRec<WO_LOG_CUST_NO$> = CustNo 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) otParms = FIELDSTORE(otParms,@RM,4,0,WOLogRec)
obj_Tables('WriteRec',otParms) obj_Tables('WriteRec',otParms)

View File

@ -1258,10 +1258,11 @@ AddInvTrans:
END END
END END
OtParms = FieldStore(OtParms,@RM,4,0,WOMatRec) ;* Put record in 4th field of OtParms OtParms = FieldStore(OtParms,@RM,4,0,WOMatRec) ;* Put record in 4th field of OtParms
LogPos = ''
Done = False$ ThisEntryAction = ''
NumAttempts = 0 Done = False$
NumAttempts = 0
Loop Loop
NumAttempts += 1 NumAttempts += 1
Database_Services('WriteDataRow', 'WO_MAT', WOMatKey, WOMatRec, True$, False$, False$) Database_Services('WriteDataRow', 'WO_MAT', WOMatKey, WOMatRec, True$, False$, False$)
@ -1310,27 +1311,39 @@ AddInvTrans:
Logging_Services('AppendLog', objLogInvTransError, LogData, @RM, @FM) Logging_Services('AppendLog', objLogInvTransError, LogData, @RM, @FM)
end end
WOMatRecVerify = Database_Services('ReadDataRow', 'WO_MAT', WOMatKey) WOMatRecVerify = Database_Services('ReadDataRow', 'WO_MAT', WOMatKey)
LastEntryIndex = DCount(WOMatRecVerify<WO_MAT_INV_WH$>, @VM) If Pos EQ -1 then
LastEntryAction = WOMatRecVerify<WO_MAT_INV_ACTION$, LastEntryIndex> LastEntryIndex = DCount(WOMatRecVerify<WO_MAT_INV_WH$>, @VM)
LastEntryLocCd = WOMatRecVerify<WO_MAT_INV_LOCATION$, LastEntryIndex> LogPos = LastEntryIndex
If LastEntryAction EQ InvAction AND LastEntryLocCd = LocCd then ThisEntryAction = WOMatRecVerify<WO_MAT_INV_ACTION$, LastEntryIndex>
Done = True$ 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 end
Until ( (Done EQ True$) or (NumAttempts EQ 10) ) Until ( (Done EQ True$) or (NumAttempts EQ 10) )
Repeat Repeat
If LogPos EQ '' then LogPos = DCount(WOMatRecVerify<WO_MAT_INV_DTM$>, @VM)
LogData = '' LogData = ''
LogData<1> = WOMatRecVerify<WO_MAT_INV_DTM$, LastEntryIndex> LogData<1> = WOMatRecVerify<WO_MAT_INV_DTM$, LogPos>
LogData<2> = WONo LogData<2> = WONo
LogData<3> = CassNo LogData<3> = CassNo
LogData<4> = WOMatRecVerify<WO_MAT_INV_USER$, LastEntryIndex> LogData<4> = WOMatRecVerify<WO_MAT_INV_USER$, LogPos>
LogData<5> = LastEntryIndex LogData<5> = LogPos
LogData<6> = WOMatRecVerify<WO_MAT_INV_TAG$, LastEntryIndex> LogData<6> = WOMatRecVerify<WO_MAT_INV_TAG$, LogPos>
LogData<7> = WOMatRecVerify<WO_MAT_INV_WH$, LastEntryIndex> LogData<7> = WOMatRecVerify<WO_MAT_INV_WH$, LogPos>
LogData<8> = WOMatRecVerify<WO_MAT_INV_LOCATION$, LastEntryIndex> LogData<8> = WOMatRecVerify<WO_MAT_INV_LOCATION$, LogPos>
LogData<9> = LastEntryAction LogData<9> = ThisEntryAction
LogData<10> = WOMatRecVerify<WO_MAT_INV_TOOL_ID$, LastEntryIndex> LogData<10> = WOMatRecVerify<WO_MAT_INV_TOOL_ID$, LogPos>
LogData<11> = WOMatRecVerify<WO_MAT_INV_SCAN_ENTRY$, LastEntryIndex> LogData<11> = WOMatRecVerify<WO_MAT_INV_SCAN_ENTRY$, LogPos>
LogData<12> = NumAttempts LogData<12> = NumAttempts
Logging_Services('AppendLog', WOMatObjLog3, LogData, @RM, @FM) Logging_Services('AppendLog', WOMatObjLog3, LogData, @RM, @FM)
@ -5735,6 +5748,3 @@ ExpCOA:
RETURN RETURN

View File

@ -551,23 +551,32 @@ RemQAMet:
IF WOMatQARec<WO_MAT_QA_SIG$,DelPos> = '' THEN IF WOMatQARec<WO_MAT_QA_SIG$,DelPos> = '' THEN
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_PROFILE$, 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_PROP$,DelPos,0)
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_TOOL_CLASS$, 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_STAGE$, DelPos, 0)
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_MIN$, 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_MAX$, DelPos, 0)
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_SLOT$, 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$, DelPos, 0)
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_RECIPE_PATTERN$, 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$, DelPos, 0)
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_SIG_DTM$, 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_MAX$, DelPos, 0)
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_STD_RESULT$, 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_QTY$, DelPos, 0)
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_WFR_TYPE$, 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_REACT_SCHED$, DelPos, 0)
WOMatQARec = DELETE(WOMatQARec, WO_MAT_QA_SHIP_DOC$, 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) otParms = FIELDSTORE(otParms,@RM,4,0,WOMatQARec)
obj_Tables('WriteRec',otParms) obj_Tables('WriteRec',otParms)
@ -754,5 +763,3 @@ QAResults:
RETURN RETURN

View File

@ -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 Get_Status, Msg, Utility, obj_Tables, NextKey, obj_Prod_Spec, obj_WO_Mat_QA, GetTickCount
Declare function Environment_Services, Database_Services Declare function Environment_Services, Database_Services
DECLARE SUBROUTINE Set_Status, Msg, obj_Tables, RList, ErrMsg, Btree.Extract, obj_WO_Mat_QA, Mona_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: AddRdsNo:
* * * * * * * * * * * * * *
StartTick = GetTickCount() StartTick = GetTickCount()
MetricName = 'AddRdsNo' MetricName = 'AddRdsNo'
WONo = Parms[1,@RM] WONo = Parms[1,@RM]
StepNo = Parms[COL2()+1,@RM] StepNo = Parms[COL2()+1,@RM]
ReactNo = Parms[COL2()+1,@RM] ReactNo = Parms[COL2()+1,@RM]
RdsNo = Parms[COL2()+1,@RM] RdsNo = Parms[COL2()+1,@RM]
CassNo = Parms[COL2()+1,@RM] CassNo = Parms[COL2()+1,@RM]
IF WONo = '' THEN RETURN IF WONo = '' THEN RETURN
IF StepNo = '' THEN RETURN IF StepNo = '' THEN RETURN
IF ReactNo = '' THEN RETURN IF ReactNo = '' THEN RETURN
IF RdsNo = '' THEN RETURN IF RdsNo = '' THEN RETURN
IF CassNo = '' THEN RETURN IF CassNo = '' THEN RETURN
WOReactKey = WONo:'*':StepNo:'*':ReactNo 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
otParms = 'WO_REACT':@RM:WOReactKey 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) ChangePosList = FIELD(AllTestPos,@VM,TrimPos,SeqCnt)
GOSUB RemSchedQA ;* Removes unsigned QAMet from cassettes scheduled past the box being removed // Add QAMet spec data to cassettes now associated with the test
// positions after removing the RDS & Cassno from the lists
GOSUB AddSchedQA
END otParms = FIELDSTORE(otParms,@RM,4,0,WOReactRec)
// Done with updates to the WO_REACT record
obj_Tables('WriteOnlyRec',otParms)
WOReactRec = INSERT(WOReactRec,WO_REACT_RDS_NO$,InsPos,0,RDSNo) Result = Log
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 EndTick = GetTickCount()
CassNos = WOReactRec<WO_REACT_CASS_NO$> ;* List after insert Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
* * * 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)
RETURN RETURN
* * * * * * * * * * * * * *
RemRDSNo: RemRDSNo:
* * * * * * * * * * * * * *
StartTick = GetTickCount() StartTick = GetTickCount()
MetricName = 'RemRDSNo' MetricName = 'RemRDSNo'
WONo = Parms[1,@RM] WONo = Parms[1,@RM]
StepNo = Parms[COL2()+1,@RM] StepNo = Parms[COL2()+1,@RM]
ReactNo = Parms[COL2()+1,@RM] ReactNo = Parms[COL2()+1,@RM]
RdsNo = Parms[COL2()+1,@RM] RdsNo = Parms[COL2()+1,@RM]
CassNo = Parms[COL2()+1,@RM] CassNo = Parms[COL2()+1,@RM]
IF WONo = '' THEN RETURN IF WONo = '' THEN RETURN
IF StepNo = '' THEN RETURN IF StepNo = '' THEN RETURN
IF ReactNo = '' THEN RETURN IF ReactNo = '' THEN RETURN
IF RdsNo = '' THEN RETURN IF RdsNo = '' THEN RETURN
IF CassNo = '' THEN RETURN IF CassNo = '' THEN RETURN
WOReactKey = WONo:'*':StepNo:'*':ReactNo WOReactKey = WONo:'*':StepNo:'*':ReactNo
otParms = 'WO_REACT':@RM:WOReactKey otParms = 'WO_REACT':@RM:WOReactKey
// 10/12/18 Changed to ReadOnlyRec as per Francois' instructions. - djs
WOReactRec = obj_Tables('ReadOnlyRec',otParms)
RDSNos = WOReactRec<WO_REACT_RDS_NO$> WOReactRec = obj_Tables('ReadOnlyRec',otParms)
CassNos = WOReactRec<WO_REACT_CASS_NO$>
PSNos = XLATE('WO_LOG',WoNo,'PROD_VER_STEP_PSN','X') RDSNos = WOReactRec<WO_REACT_RDS_NO$>
PSNo = PSNos<1,StepNo> CassNos = WOReactRec<WO_REACT_CASS_NO$>
QAMetData = obj_Prod_Spec('GetQAMet',PSNo:@RM:@RM:1) ;* * * Get Reactor Scheduled QA Metrology * * * PSNos = XLATE('WO_LOG',WoNo,'PROD_VER_STEP_PSN','X')
PSNo = PSNos<1,StepNo>
Start = QAMetData<COL$QA_MET_START> QAMetData = obj_Prod_Spec('GetQAMet',PSNo:@RM:@RM:1) ;* * * Get Reactor Scheduled QA Metrology * * *
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 Start = QAMetData<COL$QA_MET_START>
Interval = QAMetData<COL$QA_MET_INTERVAL>
Stage = QAMetData<COL$QA_MET_STAGE>
MetPropCd = QAMetData<COL$QA_MET_PROP>
IF AllTestPos NE '' THEN GOSUB BuildAllTestPos ;* Set RDSNos, Start and Interval -> returns AllTestPos
* * * Find where the the RDS being removed is in the list. * * * IF AllTestPos NE '' THEN
LOCATE RDSNo IN WOReactRec<WO_REACT_RDS_NO$> USING @VM SETTING RemPos THEN * * * Find where the the RDS being removed is in the list. * * *
LOCATE RemPos IN AllTestPos USING @VM SETTING TrimPos ELSE Null LOCATE RDSNo IN WOReactRec<WO_REACT_RDS_NO$> USING @VM SETTING RemPos THEN
ChangePosList = FIELD(AllTestPos,@VM,TrimPos,SeqCnt) LOCATE RemPos IN AllTestPos USING @VM SETTING TrimPos ELSE Null
GOSUB RemSchedQA ;* Removes unsigned QAMet from cassettes scheduled past the box being removed ChangePosList = FIELD(AllTestPos,@VM,TrimPos,SeqCnt)
END ELSE
otParms = 'WO_REACT':@RM:WOReactKey GOSUB RemSchedQA ;* Removes unsigned QAMet from cassettes scheduled past the box being removed
WOReactRec = obj_Tables('UnlockRec',otParms) END ELSE
RETURN ;* RDSNo is not in this list -> nothing to do. otParms = 'WO_REACT':@RM:WOReactKey
END WOReactRec = obj_Tables('UnlockRec',otParms)
END ;* End of check for AllTestPos null
WOReactRec = DELETE(WOReactRec,WO_REACT_RDS_NO$,RemPos,0) RETURN ;* RDSNo is not in this list -> nothing to do.
WOReactRec = DELETE(WOReactRec,WO_REACT_CASS_NO$,RemPos,0) ;* Removes the passed in RDSNo & associated cassette number from the data fields END
END ;* End of check for AllTestPos null
RDSNos = WOReactRec<WO_REACT_RDS_NO$> ;* List after removal WOReactRec = DELETE(WOReactRec,WO_REACT_RDS_NO$,RemPos,0)
CassNos = WOReactRec<WO_REACT_CASS_NO$> ;* List after removal WOReactRec = DELETE(WOReactRec,WO_REACT_CASS_NO$,RemPos,0) ;* Removes the passed in RDSNo & associated cassette number from the data fields
* * * Now build list for cassette RDSNos = WOReactRec<WO_REACT_RDS_NO$> ;* List after removal
CassNos = WOReactRec<WO_REACT_CASS_NO$> ;* List after removal
GOSUB BuildAllTestPos * * * Now build list for cassette
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 GOSUB BuildAllTestPos
otParms = FIELDSTORE(otParms,@RM,4,0,WOReactRec) ChangePosList = FIELD(AllTestPos,@VM,TrimPos,SeqCnt)
// 10/12/18 Changed to WriteOnlyRec as per Francois' instructions. - djs
obj_Tables('WriteOnlyRec',otParms) ;* Done with updates to the WO_REACT record
Result = Log 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)
EndTick = GetTickCount() obj_Tables('WriteOnlyRec',otParms) ;* Done with updates to the WO_REACT record
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
Result = Log
EndTick = GetTickCount()
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
RETURN RETURN
************** Internal Methods ************* ************** Internal Methods *************
* * * * * * * * * * * * * *
BuildAllTestPos: BuildAllTestPos:
* * * * * * * * * * * * * *
AllTestPos = '' AllTestPos = ''
RDSCnt = COUNT(RDSNos,@VM) + (RDSNos NE '') RDSCnt = COUNT(RDSNos,@VM) + (RDSNos NE '')
SeqCnt = 0 SeqCnt = 0
FOR TestSeq = 1 TO RDSCnt FOR TestSeq = 1 TO RDSCnt
IF REM((TestSeq - Start),Interval) = 0 THEN IF REM((TestSeq - Start),Interval) = 0 THEN
AllTestPos<1,-1> = TestSeq ;* Build list of list positions to have QAMet scheduled AllTestPos<1,-1> = TestSeq ;* Build list of list positions to have QAMet scheduled
SeqCnt += 1 SeqCnt += 1
END END
NEXT TestSeq NEXT TestSeq
Log := 'AllTestPos: ':AllTestPos:@FM Log := 'AllTestPos: ':AllTestPos:@FM
RETURN RETURN
* * * * * * * * * * * * * *
RemSchedQA: RemSchedQA:
* * * * * * * * * * * * * *
chgCnt = COUNT(ChangePosList,@VM) + (ChangePosList NE '') chgCnt = COUNT(ChangePosList,@VM) + (ChangePosList NE '')
FOR I = 1 TO chgCnt FOR I = 1 TO chgCnt
RemCassNo = CassNos<1,ChangePoslist<1,I>> RemCassNo = CassNos<1,ChangePoslist<1,I>>
Log:= 'RemSched on CassNo: ':RemCassNo:@FM Log:= 'RemSched on CassNo: ':RemCassNo:@FM
owmParms = WONo:@RM:StepNo:@RM:RemCassNo:@RM:Stage:@RM:MetPropCd owmParms = WONo:@RM:StepNo:@RM:RemCassNo:@RM:Stage:@RM:MetPropCd
obj_WO_Mat_QA('RemQAMet',owmParms) ;* Unschedule test boxes before list change obj_WO_Mat_QA('RemQAMet',owmParms) ;* Unschedule test boxes before list change
IF Get_Status(errCode) THEN IF Get_Status(errCode) THEN
ErrMsg(errCode) ErrMsg(errCode)
END END
NEXT I
*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
RETURN RETURN
@ -294,47 +284,39 @@ RETURN
AddSchedQA: AddSchedQA:
* * * * * * * * * * * * * *
chgCnt = COUNT(ChangePosList,@VM) + (ChangePosList NE '') chgCnt = COUNT(ChangePosList,@VM) + (ChangePosList NE '')
FOR I = 1 TO chgCnt FOR I = 1 TO chgCnt
AddCassNo = CassNos<1,ChangePoslist<1,I>> AddCassNo = CassNos<1,ChangePoslist<1,I>>
Log:= 'AddSched on CassNo: ':AddCassNo:@FM Log:= 'AddSched on CassNo: ':AddCassNo:@FM
owmParms = WONo:@RM owmParms = WONo:@RM
owmParms := StepNo:@RM owmParms := StepNo:@RM
owmParms := AddCassNo:@RM owmParms := AddCassNo:@RM
owmParms := QAMetData<COL$QA_MET_STAGE>:@RM owmParms := QAMetData<COL$QA_MET_STAGE>:@RM
owmParms := QAMetData<COL$QA_MET_TEST>:@RM owmParms := QAMetData<COL$QA_MET_TEST>:@RM
owmParms := QAMetData<COL$QA_MET_PROP>:@RM owmParms := QAMetData<COL$QA_MET_PROP>:@RM
owmParms := QAMetData<COL$QA_MET_TOOL_CLASS>:@RM owmParms := QAMetData<COL$QA_MET_TOOL_CLASS>:@RM
owmParms := QAMetData<COL$QA_MET_MIN>:@RM owmParms := QAMetData<COL$QA_MET_MIN>:@RM
owmParms := QAMetData<COL$QA_MET_MAX>:@RM owmParms := QAMetData<COL$QA_MET_MAX>:@RM
owmParms := QAMetData<COL$QA_MET_SLOT>:@RM owmParms := QAMetData<COL$QA_MET_SLOT>:@RM
owmParms := QAMetData<COL$QA_MET_RECIPE>:@RM owmParms := QAMetData<COL$QA_MET_RECIPE>:@RM
owmParms := QAMetData<COL$QA_MET_RECIPE_PATTERN>:@RM owmParms := QAMetData<COL$QA_MET_RECIPE_PATTERN>:@RM
owmParms := QAMetData<COL$QA_MET_WFR_QTY>:@RM owmParms := QAMetData<COL$QA_MET_WFR_QTY>:@RM
owmParms := QAMetData<COL$QA_MET_WFR_TYPE>:@RM owmParms := QAMetData<COL$QA_MET_WFR_TYPE>:@RM
owmParms := QAMetData<COL$QA_MET_REACT_SCHED>:@RM owmParms := QAMetData<COL$QA_MET_REACT_SCHED>:@RM
owmParms := QAMetData<COL$QA_MET_SHIP_DOC>:@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 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 obj_WO_Mat_QA('AddQAMet', owmParms) ;* Schedule test boxes after list change
IF Get_Status(errCode) THEN IF Get_Status(errCode) THEN
ErrMsg(errCode) ErrMsg(errCode)
END END
*obj_WO_Mat('AddQAMet',owmParms) ;* Dead 6/5/2015 JCH - remove after a few days NEXT I
*IF Get_Status(errCode) THEN
* ErrMsg(errCode)
*END
NEXT I
RETURN RETURN

View File

@ -41,9 +41,11 @@ Function OI_Wizard_Actions(Action, CalcColName, FSList, Handle, Name, FMC, Recor
***********************************************************************************************************************/ ***********************************************************************************************************************/
#pragma precomp SRP_PreCompiler #pragma precomp SRP_PreCompiler
$insert LOGICAL $Insert LOGICAL
$insert FILE.SYSTEM.EQUATES $Insert FILE.SYSTEM.EQUATES
$insert ACTION_SETUP $Insert ACTION_SETUP
$Insert OI_WIZARD_EQUATES
$Insert TIME_INSERTS
Declare function UCase, Utility_DotNet, Database_Services, Error_Services, Datetime Declare function UCase, Utility_DotNet, Database_Services, Error_Services, Datetime
@ -140,12 +142,10 @@ VALID:
LastDate = {CREATED_DATE} LastDate = {CREATED_DATE}
LastTime = {CREATED_TIME} LastTime = {CREATED_TIME}
end end
lastDateTime = Iconv(Oconv(LastDate, 'D4/') : ' ' : Oconv(LastTime, 'MTS'), 'DTS') LastDateTime = Iconv(Oconv(LastDate, 'D4/') : ' ' : Oconv(LastTime, 'MTS'), 'DTS')
SessionAge = (Datetime() - lastDateTime) * 86400 SessionAge = (Datetime() - LastDateTime) * SECONDS_IN_DAY$
// 600 seconds = 10 minutes MaxAge = HOUR_IN_SECONDS$ * 12
If SessionAge LT 600 then If SessionAge LT MaxAge then Valid = True$
Valid = True$
end
end end
ActionFlow = Valid ActionFlow = Valid
@ -164,8 +164,9 @@ EXPIRY:
LastTime = {CREATED_TIME} LastTime = {CREATED_TIME}
end end
lastDateTime = Iconv(Oconv(LastDate, 'D4/') : ' ' : Oconv(LastTime, 'MTS'), 'DTS') 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 // Set expiry to last updated datetime (i.e. last time the session was updated/validated)
Expiry = lastDateTime + (600 / 86400) // plus 12 hours (0.5 of a day).
Expiry = lastDateTime + 0.5
end end
ActionFlow = Expiry ActionFlow = Expiry
@ -288,3 +289,4 @@ Restore_System_Variables:
@FILE.ERROR = OrigFileError @FILE.ERROR = OrigFileError
return return

View File

@ -1,9 +1,10 @@
Compile function OI_Wizard_Services(@Service, @Params) Compile function OI_Wizard_Services(@Service, @Params)
#pragma precomp SRP_PreCompiler #pragma precomp SRP_PreCompiler
$insert LOGICAL $Insert LOGICAL
$insert OI_WIZARD_EQUATES $Insert OI_WIZARD_EQUATES
$insert OI_WIZARD_TRANSACTIONS_EQUATES $Insert OI_WIZARD_TRANSACTIONS_EQUATES
$Insert REACT_MODE_NG_EQUATES $Insert REACT_MODE_NG_EQUATES
$Insert TIME_INSERTS
Declare function RTI_CreateGUID, Database_Services, Error_Services, SRP_Json, MemberOf Declare function RTI_CreateGUID, Database_Services, Error_Services, SRP_Json, MemberOf
Declare function OI_Wizard_Services, Reactor_Services, Reactor_Modes_Services, Datetime Declare function OI_Wizard_Services, Reactor_Services, Reactor_Modes_Services, Datetime
@ -198,9 +199,9 @@ Service ValidateSession(OIWizardID)
LastTime = OIWizardRec<OI_WIZARD.CREATED_TIME$> LastTime = OIWizardRec<OI_WIZARD.CREATED_TIME$>
end end
lastDateTime = Iconv(Oconv(LastDate, 'D4/') : ' ' : Oconv(LastTime, 'MTS'), 'DTS') lastDateTime = Iconv(Oconv(LastDate, 'D4/') : ' ' : Oconv(LastTime, 'MTS'), 'DTS')
SessionAge = (Datetime() - lastDateTime) * 86400 SessionAge = (Datetime() - lastDateTime) * SECONDS_IN_DAY$
// 600 seconds = 10 minutes MaxAge = HOUR_IN_SECONDS$ * 12
If SessionAge LT 600 then If SessionAge LT MaxAge then
OIWizardRec<OI_WIZARD.UPDATED_DATES$, -1> = Date() OIWizardRec<OI_WIZARD.UPDATED_DATES$, -1> = Date()
OIWizardRec<OI_WIZARD.UPDATED_TIMES$, -1> = Time() OIWizardRec<OI_WIZARD.UPDATED_TIMES$, -1> = Time()
Database_Services('WriteDataRow', 'OI_WIZARD', OIWizardID, OIWizardRec) Database_Services('WriteDataRow', 'OI_WIZARD', OIWizardID, OIWizardRec)
@ -498,11 +499,3 @@ Service ConvertMVTransactionToJSON(TransactionID, mvTransaction, itemURL)
end service end service

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -39,7 +39,7 @@ $Insert PRS_PROP_EQUATES
Options SpecTypes = 'CLEAN', 'SURFSCAN', 'THICK', 'THICKA', 'RES', 'SRES', 'CRES', 'CONC' 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 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 Declare subroutine Database_Services, Psn_Services, Error_Services, SRP_JSON, Extract_Si_Keys
GoToService else GoToService else
@ -116,8 +116,11 @@ Service GetMetrologyRecipesAndPatterns(PSNo)
Extract_Si_Keys('PRS_PROP', 'PS_NO', PSNo, PropKeys) Extract_Si_Keys('PRS_PROP', 'PS_NO', PSNo, PropKeys)
for each PropKey in PropKeys using @VM setting pPos for each PropKey in PropKeys using @VM setting pPos
Recipe = Xlate('PRS_PROP', PropKey, PRS_PROP_RECIPE$, 'X') 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 = Xlate('PRS_PROP', PropKey, PRS_PROP_PATTERN$, 'X')
Pattern = SRP_String('Trim', Pattern, FB)
Tool = Xlate('PRS_PROP', PropKey, PRS_PROP_TOOL$, 'X') Tool = Xlate('PRS_PROP', PropKey, PRS_PROP_TOOL$, 'X')
Tool = SRP_String('Trim', Tool, FB)
Convert @LOWER_CASE to @UPPER_CASE in Tool Convert @LOWER_CASE to @UPPER_CASE in Tool
If Recipe NE '' and Pattern NE '' and Tool NE '' then 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 for each PRSStageKey in PRSStageKeys using @VM setting sPos
Recipes = Xlate('PRS_STAGE', PRSStageKey, PRS_STAGE_MET_RECIPE$, 'X') Recipes = Xlate('PRS_STAGE', PRSStageKey, PRS_STAGE_MET_RECIPE$, 'X')
for each Recipe in Recipes using @VM setting rPos 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 = 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 = 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 Convert @LOWER_CASE to @UPPER_CASE in Tool
If Recipe NE '' and Tool NE '' and Pattern NE '' then If Recipe NE '' and Tool NE '' and Pattern NE '' then

View File

@ -3122,9 +3122,7 @@ Service SignUnloadStage(RDSNo, Username, ScanEntry)
Lot_Services('MoveInLot', LotId, Username) ; // Move into POST_EPI operation 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 no production wafers in this run, then move out of POST_EPI and close the lot.
If Rds_Services('IsEpiProTestRun', RDSNo) then If Rds_Services('IsEpiProTestRun', RDSNo) then
Lot_Services('MoveOutLot', LotId, Username) ; // Move out of POST_EPI operation Lot_Services('AutoCloseLot', LotId, 'SYSTEM')
Lot_Services('MoveInLot', LotId, Username) ; // Move into RDS_CLOSE operation
Lot_Services('CloseLot', LotId)
end end
end end
end end
@ -3844,3 +3842,4 @@ return

View File

@ -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 Rds_Services, SRP_DateTime, SRP_Math, obj_WO_Mat, Lot_Services, SRP_Array
Declare function Lot_Event_Services, GetTickCount, Work_Order_Services Declare function Lot_Event_Services, GetTickCount, Work_Order_Services
Declare subroutine Error_Services, Database_Services, Logging_Services, Service_Services, obj_WO_React 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' LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\RDS'
LogDate = Oconv(Date(), 'D4/') LogDate = Oconv(Date(), 'D4/')
@ -905,18 +905,23 @@ WRITE_RECORD:
WMIKeys = {WM_IN_KEY} WMIKeys = {WM_IN_KEY}
For each WMIKey in WMIKeys using @VM setting vPos For each WMIKey in WMIKeys using @VM setting vPos
CassNo = Field(WMIKey, '*', 3) 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 Next WMIKey
end else end else
CassNo = Record<RDS_CASS_NO$> 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
end end
OrigPocketChar = OrigRecord<RDS_POCKET_CHAR$> OrigPocketChar = OrigRecord<RDS_POCKET_CHAR$>
NewPocketChar = Record<RDS_POCKET_CHAR$> NewPocketChar = Record<RDS_POCKET_CHAR$>
If (OrigPocketChar NE NewPocketChar) then 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 end
If {WO} NE '' then Service_Services('PostProcedure', 'RDS_SERVICES', 'VerifyWOLogRDSKeyIndex':SD$:Name) If {WO} NE '' then Service_Services('PostProcedure', 'RDS_SERVICES', 'VerifyWOLogRDSKeyIndex':SD$:Name)
@ -1018,3 +1023,4 @@ Restore_System_Variables:
return return

View File

@ -131,11 +131,13 @@ EQU NEW_EXIST$ To 0 ; * Reduce Mode 0
equ NEXT_CUR$ To 1 equ NEXT_CUR$ To 1
equ ADD_EXIST$ to 2 equ ADD_EXIST$ to 2
Equ NUM_ATTEMPTS$ to 60
AutoDisplayErrors = FALSE$ ; // Set this to True$ when debugging so all errors will automatically display. 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 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 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 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 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 Declare function Work_Order_Services, SRP_JSON, Logging_Services, Environment_Services, SRP_Trim, Error_Services
@ -753,31 +755,27 @@ end service
Service IsValidSubLot(RDSNo, RDSType, SupplierLot) 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$ IsValid = False$
rec = ''
Begin Case Begin Case
Case RDSType EQ 'SIC' Case RDSType EQ 'SIC'
compareLot = XLATE('RDS', RDSNo, RDS_LOT_NUM$, 'X') CompareLot = Xlate('RDS', RDSNo, RDS_LOT_NUM$, 'X')
if compareLot EQ SupplierLot then If Quote(CompareLot) EQ Quote(SupplierLot) then IsValid = True$
IsValid = True$
end
Case RDSType EQ 'EPP' Case RDSType EQ 'EPP'
CONVERT '.' TO '*' IN RDSNo Convert '.' to '*' in RDSNo
compareLot = XLATE('WM_IN', RDSNo, 'LOT_NO', 'X') CompareLot = Xlate('WM_IN', RDSNo, 'LOT_NO', 'X')
if compareLot EQ SupplierLot then If Quote(CompareLot) EQ Quote(SupplierLot) then IsValid = True$
IsValid = True$
end
Case RDSType EQ 'GAN' Case RDSType EQ 'GAN'
CONVERT '.' TO '*' IN RDSNo Convert '.' to '*' in RDSNo
compareLot = XLATE('WO_MAT', RDSNo, WO_MAT_LOT_NO$, 'X') CompareLot = Xlate('WO_MAT', RDSNo, WO_MAT_LOT_NO$, 'X')
if compareLot EQ SupplierLot then If Quote(CompareLot) EQ Quote(SupplierLot) then IsValid = True$
IsValid = True$
end
End Case End Case
Response = IsValid Response = IsValid
end service end service
@ -1157,37 +1155,47 @@ Service CopyRDSLayerParameters(RDSNo)
CopyRDSLayerKeys = Xlate('RDS', CopyRDSNo, 'RDS_LAYER_KEYS', 'X') CopyRDSLayerKeys = Xlate('RDS', CopyRDSNo, 'RDS_LAYER_KEYS', 'X')
If CopyRDSLayerKeys NE '' then If CopyRDSLayerKeys NE '' then
For each CopyRDSLayerKey in CopyRDSLayerKeys For each CopyRDSLayerKey in CopyRDSLayerKeys
Until ErrMsg NE ''
// Copy RDS layer records // Copy RDS layer records
LayerID = Field(CopyRDSLayerKey, '*', 2) LayerID = Field(CopyRDSLayerKey, '*', 2)
DestRDSLayerKey = RDSNo:'*':LayerID DestRDSLayerKey = RDSNo:'*':LayerID
CopyRDSLayerRec = Database_Services('ReadDataRow', 'RDS_LAYER', CopyRDSLayerKey) CopyRDSLayerRec = Database_Services('ReadDataRow', 'RDS_LAYER', CopyRDSLayerKey)
DestRDSLayerRec = Database_Services('ReadDataRow', 'RDS_LAYER', DestRDSLayerKey) if Error_Services('NoError') then
DestRDSLayerRec = Database_Services('ReadDataRow', 'RDS_LAYER', DestRDSLayerKey)
DestRDSLayerRec<RDS_LAYER_DOPANT$> = CopyRDSLayerRec<RDS_LAYER_DOPANT$> If Error_Services('NoError') then
DestRDSLayerRec<RDS_LAYER_EPI_DILUENT$> = CopyRDSLayerRec<RDS_LAYER_EPI_DILUENT$> DestRDSLayerRec<RDS_LAYER_DOPANT$> = CopyRDSLayerRec<RDS_LAYER_DOPANT$>
DestRDSLayerRec<RDS_LAYER_EPI_TIME$> = CopyRDSLayerRec<RDS_LAYER_EPI_TIME$> DestRDSLayerRec<RDS_LAYER_EPI_DILUENT$> = CopyRDSLayerRec<RDS_LAYER_EPI_DILUENT$>
DestRDSLayerRec<RDS_LAYER_DILUENT_ADJ_PARAM$> = CopyRDSLayerRec<RDS_LAYER_DILUENT_ADJ_PARAM$> DestRDSLayerRec<RDS_LAYER_EPI_TIME$> = CopyRDSLayerRec<RDS_LAYER_EPI_TIME$>
DestRDSLayerRec<RDS_LAYER_DOPANT_FLOW$> = CopyRDSLayerRec<RDS_LAYER_DOPANT_FLOW$> DestRDSLayerRec<RDS_LAYER_DILUENT_ADJ_PARAM$> = CopyRDSLayerRec<RDS_LAYER_DILUENT_ADJ_PARAM$>
DestRDSLayerRec<RDS_LAYER_HCL_FLOW$> = CopyRDSLayerRec<RDS_LAYER_HCL_FLOW$> DestRDSLayerRec<RDS_LAYER_DOPANT_FLOW$> = CopyRDSLayerRec<RDS_LAYER_DOPANT_FLOW$>
DestRDSLayerRec<RDS_LAYER_BAKE_TIME$> = CopyRDSLayerRec<RDS_LAYER_BAKE_TIME$> DestRDSLayerRec<RDS_LAYER_HCL_FLOW$> = CopyRDSLayerRec<RDS_LAYER_HCL_FLOW$>
DestRDSLayerRec<RDS_LAYER_EPI_H2_FLOW$> = CopyRDSLayerRec<RDS_LAYER_EPI_H2_FLOW$> DestRDSLayerRec<RDS_LAYER_BAKE_TIME$> = CopyRDSLayerRec<RDS_LAYER_BAKE_TIME$>
DestRDSLayerRec<RDS_LAYER_TCS_FLOW$> = CopyRDSLayerRec<RDS_LAYER_TCS_FLOW$> DestRDSLayerRec<RDS_LAYER_EPI_H2_FLOW$> = CopyRDSLayerRec<RDS_LAYER_EPI_H2_FLOW$>
DestRDSLayerRec<RDS_LAYER_DCS_FLOW$> = CopyRDSLayerRec<RDS_LAYER_DCS_FLOW$> DestRDSLayerRec<RDS_LAYER_TCS_FLOW$> = CopyRDSLayerRec<RDS_LAYER_TCS_FLOW$>
DestRDSLayerRec<RDS_LAYER_AUX1$> = CopyRDSLayerRec<RDS_LAYER_AUX1$> DestRDSLayerRec<RDS_LAYER_DCS_FLOW$> = CopyRDSLayerRec<RDS_LAYER_DCS_FLOW$>
DestRDSLayerRec<RDS_LAYER_AUX2$> = CopyRDSLayerRec<RDS_LAYER_AUX2$> DestRDSLayerRec<RDS_LAYER_AUX1$> = CopyRDSLayerRec<RDS_LAYER_AUX1$>
DestRDSLayerRec<RDS_LAYER_F_OFFSET$> = CopyRDSLayerRec<RDS_LAYER_F_OFFSET$> DestRDSLayerRec<RDS_LAYER_AUX2$> = CopyRDSLayerRec<RDS_LAYER_AUX2$>
DestRDSLayerRec<RDS_LAYER_S_OFFSET$> = CopyRDSLayerRec<RDS_LAYER_S_OFFSET$> DestRDSLayerRec<RDS_LAYER_F_OFFSET$> = CopyRDSLayerRec<RDS_LAYER_F_OFFSET$>
DestRDSLayerRec<RDS_LAYER_R_OFFSET$> = CopyRDSLayerRec<RDS_LAYER_R_OFFSET$> DestRDSLayerRec<RDS_LAYER_S_OFFSET$> = CopyRDSLayerRec<RDS_LAYER_S_OFFSET$>
DestRDSLayerRec<RDS_LAYER_ETCH1$> = CopyRDSLayerRec<RDS_LAYER_ETCH1$> DestRDSLayerRec<RDS_LAYER_R_OFFSET$> = CopyRDSLayerRec<RDS_LAYER_R_OFFSET$>
DestRDSLayerRec<RDS_LAYER_ETCH2$> = CopyRDSLayerRec<RDS_LAYER_ETCH2$> DestRDSLayerRec<RDS_LAYER_ETCH1$> = CopyRDSLayerRec<RDS_LAYER_ETCH1$>
DestRDSLayerRec<RDS_LAYER_ETCH3$> = CopyRDSLayerRec<RDS_LAYER_ETCH3$> DestRDSLayerRec<RDS_LAYER_ETCH2$> = CopyRDSLayerRec<RDS_LAYER_ETCH2$>
DestRDSLayerRec<RDS_LAYER_OVERGROW_REQ$> = CopyRDSLayerRec<RDS_LAYER_OVERGROW_REQ$> DestRDSLayerRec<RDS_LAYER_ETCH3$> = CopyRDSLayerRec<RDS_LAYER_ETCH3$>
DestRDSLayerRec<RDS_LAYER_SUSC_ETCH$> = CopyRDSLayerRec<RDS_LAYER_SUSC_ETCH$> DestRDSLayerRec<RDS_LAYER_OVERGROW_REQ$> = CopyRDSLayerRec<RDS_LAYER_OVERGROW_REQ$>
DestRDSLayerRec<RDS_LAYER_UL_TEMP$> = CopyRDSLayerRec<RDS_LAYER_UL_TEMP$> DestRDSLayerRec<RDS_LAYER_SUSC_ETCH$> = CopyRDSLayerRec<RDS_LAYER_SUSC_ETCH$>
DestRDSLayerRec<RDS_LAYER_MODIFY_USER$, -1> = 'CopyService' DestRDSLayerRec<RDS_LAYER_UL_TEMP$> = CopyRDSLayerRec<RDS_LAYER_UL_TEMP$>
DestRDSLayerRec<RDS_LAYER_MODIFY_DTM$, -1> = DateTime() DestRDSLayerRec<RDS_LAYER_MODIFY_USER$, -1> = 'CopyService'
Database_Services('WriteDataRow', 'RDS_LAYER', DestRDSLayerKey, DestRDSLayerRec, True$, True$, True$) 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 Next CopyRDSLayerKey
end end
end else 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' 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' Headers = 'Logging DTM':@FM:'RDSNo':@FM:'WOMatKey':@FM:'Result'
objVerifyRDSNoLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, COMMA$, Headers, '', False$, False$) objVerifyRDSNoLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, COMMA$, Headers, '', False$, False$)
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
LogData = '' LogData = ''
LogData<1> = LoggingDtm LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<2> = RDSNo LogData<2> = RDSNo
LogData<4> = 'Begin ':Service LogData<4> = 'Begin ':Service
Logging_Services('AppendLog', objVerifyRDSNoLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyRDSNoLog, LogData, @RM, @FM)
@ -2267,35 +2274,48 @@ Service VerifyWOMatRDSNoIndex(RDSNo)
WOMatKey = Xlate('RDS', RDSNo, 'WO_MAT_KEY', 'X') WOMatKey = Xlate('RDS', RDSNo, 'WO_MAT_KEY', 'X')
If WOMatKey NE '' then If WOMatKey NE '' then
WOMatRDSNo = Xlate('WO_MAT', WOMatKey, 'RDS_NO', 'X') WOMatRDSNo = Xlate('WO_MAT', WOMatKey, 'RDS_NO', 'X')
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<3> = WOMatKey LogData<3> = WOMatKey
Logging_Services('AppendLog', objVerifyRDSNoLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyRDSNoLog, LogData, @RM, @FM)
If WOMatRDSNo EQ '' then If WOMatRDSNo EQ '' then
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<4> = 'RDSNo missing from WO_MAT record. Generating index transaction.' LogData<4> = 'RDSNo missing from WO_MAT record. Generating index transaction.'
Logging_Services('AppendLog', objVerifyRDSNoLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyRDSNoLog, LogData, @RM, @FM)
// Add index transaction to update RDS_NO relational index (target WO_MAT table) // 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 IndexTransactionRow = 'WO_MAT*RDS_NO*AR':@FM:RDSNo:@FM:"":@FM:WOMatKey:@FM
Open "!RDS" to BangTable then Open "!RDS" to BangTable then
Lock BangTable, 0 then Done = False$
Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM For AttemptNo = 1 to NUM_ATTEMPTS$
PendingTrans := IndexTransactionRow If AttemptNo GT 1 then Delay(1)
Write PendingTrans on BangTable, 0 then Lock BangTable, 0 then
LogData<4> = 'Index transaction successfully added.' Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM
Logging_Services('AppendLog', objVerifyRDSNoLog, LogData, @RM, @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 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 end
Unlock BangTable, 0 else ErrorMsg = 'Unable to Open !RDS to add index transaction. ':RDSNo Until Done or ErrorMsg
end else Next AttemptNo
ErrorMsg = 'Unable to Lock !RDS to add index transaction. ':RDSNo
end
end else end else
ErrorMsg = 'Unable to Open !RDS to add index transaction. ':RDSNo ErrorMsg = 'Unable to Open !RDS to add index transaction. ':RDSNo
end end
end else end else
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<4> = 'Index ok. RDSNo not missing from WO_MAT record.' LogData<4> = 'Index ok. RDSNo not missing from WO_MAT record.'
Logging_Services('AppendLog', objVerifyRDSNoLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyRDSNoLog, LogData, @RM, @FM)
end end
end else end else
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<4> = 'WO_MAT key for RDS ':RDSNo:' is null. Nothing to update.' LogData<4> = 'WO_MAT key for RDS ':RDSNo:' is null. Nothing to update.'
Logging_Services('AppendLog', objVerifyRDSNoLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyRDSNoLog, LogData, @RM, @FM)
end end
@ -2303,10 +2323,12 @@ Service VerifyWOMatRDSNoIndex(RDSNo)
end end
If ErrorMsg NE '' then If ErrorMsg NE '' then
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<4> = ErrorMsg LogData<4> = ErrorMsg
Logging_Services('AppendLog', objVerifyRDSNoLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyRDSNoLog, LogData, @RM, @FM)
end end
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<4> = 'End ':Service LogData<4> = 'End ':Service
Logging_Services('AppendLog', objVerifyRDSNoLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyRDSNoLog, LogData, @RM, @FM)
@ -2317,16 +2339,15 @@ end service
Service VerifyWOStepRDSKeyIndex(RDSNo) Service VerifyWOStepRDSKeyIndex(RDSNo)
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\RDS' LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\RDS'
LogDate = Oconv(Date(), 'D4/') LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS') LogTime = Oconv(Time(), 'MTS')
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' !RDS WO_STEP{RDS_KEY} Log.csv' 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' Headers = 'Logging DTM':@FM:'RDSNo':@FM:'WOStep':@FM:'Result'
objVerifyRDSKeyLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, COMMA$, Headers, '', False$, False$) objVerifyRDSKeyLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, COMMA$, Headers, '', False$, False$)
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
LogData = '' LogData = ''
LogData<1> = LoggingDtm LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<2> = RDSNo LogData<2> = RDSNo
LogData<4> = 'Begin ':Service LogData<4> = 'Begin ':Service
Logging_Services('AppendLog', objVerifyRDSKeyLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyRDSKeyLog, LogData, @RM, @FM)
@ -2337,35 +2358,48 @@ Service VerifyWOStepRDSKeyIndex(RDSNo)
WOStepKey = Xlate('RDS', RDSNo, 'WO_STEP_KEY', 'X') WOStepKey = Xlate('RDS', RDSNo, 'WO_STEP_KEY', 'X')
If WOStepKey NE '' then If WOStepKey NE '' then
WOStepRDSKeys = Xlate('WO_STEP', WOStepKey, 'RDS_KEY', 'X') WOStepRDSKeys = Xlate('WO_STEP', WOStepKey, 'RDS_KEY', 'X')
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<3> = WOStepKey LogData<3> = WOStepKey
Logging_Services('AppendLog', objVerifyRDSKeyLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyRDSKeyLog, LogData, @RM, @FM)
Locate RDSNo in WOStepRDSKeys using @VM setting vPos then 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.' LogData<4> = 'Index ok. RDSNo not missing from WO_STEP record.'
Logging_Services('AppendLog', objVerifyRDSKeyLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyRDSKeyLog, LogData, @RM, @FM)
end else end else
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<4> = 'RDSNo missing from WO_STEP record. Generating index transaction.' LogData<4> = 'RDSNo missing from WO_STEP record. Generating index transaction.'
Logging_Services('AppendLog', objVerifyRDSKeyLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyRDSKeyLog, LogData, @RM, @FM)
// Add index transaction to update RDS_KEY relational index (target WO_STEP table) // 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 IndexTransactionRow = 'WO_STEP*RDS_KEY*AR':@FM:RDSNo:@FM:"":@FM:WOStepKey:@FM
Open "!RDS" to BangTable then Open "!RDS" to BangTable then
Lock BangTable, 0 then Done = False$
Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM For AttemptNo = 1 to NUM_ATTEMPTS$
PendingTrans := IndexTransactionRow If AttemptNo GT 1 then Delay(1)
Write PendingTrans on BangTable, 0 then Lock BangTable, 0 then
LogData<4> = 'Index transaction successfully added.' Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM
Logging_Services('AppendLog', objVerifyRDSKeyLog, LogData, @RM, @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 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 end
Unlock BangTable, 0 else ErrorMsg = 'Unable to Open !RDS to add index transaction. ':RDSNo Until Done or ErrorMsg
end else Next AttemptNo
ErrorMsg = 'Unable to Lock !RDS to add index transaction. ':RDSNo
end
end else end else
ErrorMsg = 'Unable to Open !RDS to add index transaction. ':RDSNo ErrorMsg = 'Unable to Open !RDS to add index transaction. ':RDSNo
end end
end end
end else end else
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<4> = 'WO_STEP key for RDS ':RDSNo:' is null. Nothing to update.' LogData<4> = 'WO_STEP key for RDS ':RDSNo:' is null. Nothing to update.'
Logging_Services('AppendLog', objVerifyRDSKeyLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyRDSKeyLog, LogData, @RM, @FM)
end end
@ -2373,10 +2407,12 @@ Service VerifyWOStepRDSKeyIndex(RDSNo)
end end
If ErrorMsg NE '' then If ErrorMsg NE '' then
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<4> = ErrorMsg LogData<4> = ErrorMsg
Logging_Services('AppendLog', objVerifyRDSKeyLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyRDSKeyLog, LogData, @RM, @FM)
end end
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<4> = 'End ':Service LogData<4> = 'End ':Service
Logging_Services('AppendLog', objVerifyRDSKeyLog, LogData, @RM, @FM) 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' LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' !RDS RDS{WO} Log.csv'
Headers = 'Logging DTM':@FM:'RDSNo':@FM:'WOStep':@FM:'Result' Headers = 'Logging DTM':@FM:'RDSNo':@FM:'WOStep':@FM:'Result'
objVerifyRDSWoIndexLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, COMMA$, Headers, '', False$, False$) objVerifyRDSWoIndexLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, COMMA$, Headers, '', False$, False$)
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
LogData = '' LogData = ''
LogData<1> = LoggingDtm LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<2> = RDSNo LogData<2> = RDSNo
LogData<4> = 'Begin ':Service LogData<4> = 'Begin ':Service
Logging_Services('AppendLog', objVerifyRDSWoIndexLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyRDSWoIndexLog, LogData, @RM, @FM)
@ -2411,32 +2446,44 @@ Service VerifyWOLogRDSKeyIndex(RDSNo)
LogData<3> = WONo LogData<3> = WONo
Logging_Services('AppendLog', objVerifyRDSWoIndexLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyRDSWoIndexLog, LogData, @RM, @FM)
Locate RDSNo in WOLogRDSKeys using @VM setting vPos then 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.' LogData<4> = 'Index ok. RDSNo not missing from Btree index.'
Logging_Services('AppendLog', objVerifyRDSWoIndexLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyRDSWoIndexLog, LogData, @RM, @FM)
end else end else
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<4> = 'RDSNo missing from Btree index. Generating index transaction.' LogData<4> = 'RDSNo missing from Btree index. Generating index transaction.'
Logging_Services('AppendLog', objVerifyRDSWoIndexLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyRDSWoIndexLog, LogData, @RM, @FM)
// Add index transaction to update RDS_KEY relational index (target WO_STEP table) // Add index transaction to update RDS_KEY relational index (target WO_STEP table)
IndexTransactionRow = 'WO':@FM:RDSNo:@FM:"":@FM:WONo:@FM IndexTransactionRow = 'WO':@FM:RDSNo:@FM:"":@FM:WONo:@FM
Open "!RDS" to BangTable then Open "!RDS" to BangTable then
Lock BangTable, 0 then Done = False$
Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM For AttemptNo = 1 to NUM_ATTEMPTS$
PendingTrans := IndexTransactionRow If AttemptNo GT 1 then Delay(1)
Write PendingTrans on BangTable, 0 then Lock BangTable, 0 then
LogData<4> = 'Index transaction successfully added.' Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM
Logging_Services('AppendLog', objVerifyRDSWoIndexLog, LogData, @RM, @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 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 end
Unlock BangTable, 0 else ErrorMsg = 'Error in ':Service:' service. Unable to Open !RDS to add index transaction. ':RDSNo Until Done or ErrorMsg
end else Next AttemptNo
ErrorMsg = 'Error in ':Service:' service. Unable to Lock !RDS to add index transaction. ':RDSNo
end
end else end else
ErrorMsg = 'Error in ':Service:' service. Unable to Open !RDS to add index transaction. ':RDSNo ErrorMsg = 'Error in ':Service:' service. Unable to Open !RDS to add index transaction. ':RDSNo
end end
end end
end else end else
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<4> = 'WONo for RDS ':RDSNo:' is null. Nothing to update.' LogData<4> = 'WONo for RDS ':RDSNo:' is null. Nothing to update.'
Logging_Services('AppendLog', objVerifyRDSWoIndexLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyRDSWoIndexLog, LogData, @RM, @FM)
end end
@ -2446,10 +2493,12 @@ Service VerifyWOLogRDSKeyIndex(RDSNo)
end end
If ErrorMsg NE '' then If ErrorMsg NE '' then
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<4> = ErrorMsg LogData<4> = ErrorMsg
Logging_Services('AppendLog', objVerifyRDSWoIndexLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyRDSWoIndexLog, LogData, @RM, @FM)
end end
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<4> = 'End ':Service LogData<4> = 'End ':Service
Logging_Services('AppendLog', objVerifyRDSWoIndexLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyRDSWoIndexLog, LogData, @RM, @FM)
@ -3380,4 +3429,3 @@ ClearCursors:
return return

View 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

View File

@ -58,9 +58,9 @@ $Insert NICA_ORDERS_EQUATES
$Insert REACTOR_INJECTOR_SETTINGS_EQUATES $Insert REACTOR_INJECTOR_SETTINGS_EQUATES
$Insert REACTOR_RATIOS_EQUATES $Insert REACTOR_RATIOS_EQUATES
$Insert REACT_STATE_EQUATES $Insert REACT_STATE_EQUATES
$Insert TIME_INSERTS
Equ WOCust$ to 2 Equ WOCust$ to 2
Equ SECONDS_IN_DAY$ to 86400
// Uptime Percentage Equates // Uptime Percentage Equates
Equ PRODUCTIVE$ to 1 Equ PRODUCTIVE$ to 1
@ -4515,4 +4515,3 @@ ClearCursors:
return return

View 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

View File

@ -632,23 +632,25 @@ Service GetMaterialTrackJSON()
SRP_JSON(objRow, 'SetValue', 'SapProdNo', Row<MATERIAL_REPORT.PROD_ORD_NO$>) 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', 'SubPartNo', Row<MATERIAL_REPORT.SUB_PART_NO$>)
SRP_JSON(objRow, 'SetValue', 'EpiPartNo', Row<MATERIAL_REPORT.EPI_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 Swap ',' with '' in WOQty
SRP_JSON(objRow, 'SetValue', 'WoQty', 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 Swap ',' with '' in RxQty
SRP_JSON(objRow, 'SetValue', 'RxQty', 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 Swap ',' with '' in UnRelQty
SRP_JSON(objRow, 'SetValue', 'UnRelQty', UnRelQty) SRP_JSON(objRow, 'SetValue', 'UnRelQty', UnRelQty)
SRP_JSON(objRow, 'SetValue', 'KitLoc', Row<MATERIAL_REPORT.KIT_LOCATION$>) 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 Swap ',' with '' in KitQty
SRP_JSON(objRow, 'SetValue', 'KitQty', KitQty) SRP_JSON(objRow, 'SetValue', 'KitQty', KitQty)
SRP_JSON(objRow, 'SetValue', 'CassDelta', Row<MATERIAL_REPORT.CASS_DELTA$>) SRP_JSON(objRow, 'SetValue', 'CassDelta', Row<MATERIAL_REPORT.CASS_DELTA$>)
Swap ',' with ', ' in KitRunOrder Swap ',' with ', ' in KitRunOrder
SRP_JSON(objRow, 'SetValue', 'KitRunOrder', 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 Swap ',' with ', ' in PTIRunOrder
SRP_JSON(objRow, 'SetValue', 'PtiRunOrder', PTIRunOrder) SRP_JSON(objRow, 'SetValue', 'PtiRunOrder', PTIRunOrder)
Swap ',' with ', ' in LoadRunOrder Swap ',' with ', ' in LoadRunOrder
@ -1080,7 +1082,9 @@ Service CalcDailyPerformanceData(DateOut)
end service end service
Service GenerateOrUpdateDailyReactorUptimeData() Service GenerateOrUpdateDailyReactorUptimeData()
//Generates new or updates existing Reactor uptime data for all reactors in the current day. //Generates new or updates existing Reactor uptime data for all reactors in the current day.
hSysLists = Database_Services('GetTableHandle', 'SYSLISTS') hSysLists = Database_Services('GetTableHandle', 'SYSLISTS')
Lock hSysLists, ServiceKeyID then Lock hSysLists, ServiceKeyID then
@ -1104,9 +1108,12 @@ Service GenerateOrUpdateDailyReactorUptimeData()
Database_Services('WriteDataRow', 'REACTOR_DAILY_UPTIME', ALLRecordKey, ALLUptimeRec, True$, False$, True$) Database_Services('WriteDataRow', 'REACTOR_DAILY_UPTIME', ALLRecordKey, ALLUptimeRec, True$, False$, True$)
Unlock hSysLists, ServiceKeyID else Null Unlock hSysLists, ServiceKeyID else Null
end end
end service end service
Service GetDailyReactorUptimeDataJSON(ReportStartDt, ReportEndDt) Service GetDailyReactorUptimeDataJSON(ReportStartDt, ReportEndDt)
Response = '' Response = ''
Begin Case Begin Case
Case ReportStartDt EQ '' Case ReportStartDt EQ ''
@ -1253,8 +1260,10 @@ Service GetDailyReactorUptimeDataJSON(ReportStartDt, ReportEndDt)
SRP_Json(ReactorUptimeJson, "Release") SRP_Json(ReactorUptimeJson, "Release")
Response = ResponseJson Response = ResponseJson
end end
end service end service
Service GetDailyPerformanceDataJSON(DateOut) Service GetDailyPerformanceDataJSON(DateOut)
Response = '' Response = ''
@ -1453,11 +1462,12 @@ Service GenerateMaterialTrackRows()
OPEN 'DICT.SCHED_DET_NG' TO SchedDetDict then OPEN 'DICT.SCHED_DET_NG' TO SchedDetDict then
Today = Datetime() Today = Datetime()
ReactList = '' ReactList = ''
WOList = '' RemainingReactorDemandList = ''
SchedDetKeys = '' WOList = ''
PrevReactNo = '' SchedDetKeys = ''
PrevWO = '' PrevReactNo = ''
PrevWO = ''
SelectSent = 'SELECT SCHED_DET_NG WITH STOP_DTM GE "':OCONV(Today, 'DT'):'" BY REACT_NO BY START_DTM' 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 RETURN
END 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 Done = 0
CurrSchedDetKey = '' CurrSchedDetKey = ''
LOOP LOOP
@ -1479,13 +1493,25 @@ Service GenerateMaterialTrackRows()
WONo = SchedDetRec<SCHED_DET_NG.WO_NO$> WONo = SchedDetRec<SCHED_DET_NG.WO_NO$>
If ReactNo NE '' then If ReactNo NE '' then
LOCATE ReactNo IN ReactList BY 'AR' USING @FM SETTING Pos ELSE 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
END END
If WONo NE '' then If WONo NE '' then
LOCATE WONo IN WOList<Pos> USING @VM SETTING WPos ELSE LOCATE WONo IN WOList<Pos> USING @VM SETTING WPos ELSE
WOList = INSERT(WOList,Pos,-1,0,WONo) WOList = Insert(WOList,Pos,-1,0,WONo)
SchedDetKeys = INSERT(SchedDetKeys,-1,0,0,CurrSchedDetKey) SchedDetKeys = Insert(SchedDetKeys,-1,0,0,CurrSchedDetKey)
END END
END END
END END
@ -1498,7 +1524,7 @@ Service GenerateMaterialTrackRows()
RowIndex = 0 RowIndex = 0
AllReportData = '' AllReportData = ''
RecCount = 0 RecCount = 0
FirstPass = 1 FirstPass = 1
LastRecord = 0 LastRecord = 0
FirstLine = 1 FirstLine = 1
@ -1714,36 +1740,42 @@ Service GenerateMaterialTrackRows()
PTICassList = SRP_Array('SortSimpleList', PTICassList, 'AscendingNumbers', ',') PTICassList = SRP_Array('SortSimpleList', PTICassList, 'AscendingNumbers', ',')
LoadedCassList = SRP_Array('SortSimpleList', LoadedCassList, 'AscendingNumbers', ',') LoadedCassList = SRP_Array('SortSimpleList', LoadedCassList, 'AscendingNumbers', ',')
CassNeeded = '' Locate S.ReactNo in ReactList using @FM setting rPos then
EpiPartNo = Xlate('WO_LOG', S.WONo, 'EPI_PART_NO', 'X') ThisReactorRemainingDemand = RemainingReactorDemandList<rPos>
If EpiPartNo NE '' then PTICassCount = DCount(PTICassList, ',')
WPDAdjusted = Epi_Part_Services('GetAdjustedWafersPerDayScheduler', EpiPartNo, S.React_Type) ThisReactorRemainingDemand -= PTICassCount
If WPDAdjusted NE '' then If ThisReactorRemainingDemand LT 0 then ThisReactorRemainingDemand = 0
CPDAdjusted = SRP_Math('CEILING', (WPDAdjusted/25) ) RemainingReactorDemandList<rPos> = ThisReactorRemainingDemand
CassInCR = DCount(KitCassList, ',') + DCount(PTICassList, ',') + DCount(LoadedCassList, ',') If ThisReactorRemainingDemand GT 0 then
CassNeeded = CassInCR - CPDAdjusted KitDemand = Field(KitCassList, ',', 1, ThisReactorRemainingDemand)
end ThisReactorRemainingDemand -= DCount(KitDemand, ',')
end RemainingReactorDemandList<rPos> = ThisReactorRemainingDemand
end else
KitDemand = ''
end
end else
KitDemand = ''
end
RowIndex += 1 RowIndex += 1
Swap '.1' with '' in S.ProdOrdNo Swap '.1' with '' in S.ProdOrdNo
AllReportData<RowIndex, 1> = S.ReactNo AllReportData<RowIndex, MATERIAL_REPORT.REACT_NO$> = S.ReactNo
AllReportData<RowIndex, 2> = S.React_Type AllReportData<RowIndex, MATERIAL_REPORT.REACT_TYPE$> = S.React_Type
AllReportData<RowIndex, 3> = S.WONo AllReportData<RowIndex, MATERIAL_REPORT.WO_NO$> = S.WONo
AllReportData<RowIndex, 4> = S.ProdOrdNo AllReportData<RowIndex, MATERIAL_REPORT.PROD_ORD_NO$> = S.ProdOrdNo
AllReportData<RowIndex, 5> = S.SubPartNo AllReportData<RowIndex, MATERIAL_REPORT.SUB_PART_NO$> = S.SubPartNo
AllReportData<RowIndex, 6> = S.EpiPartNo AllReportData<RowIndex, MATERIAL_REPORT.EPI_PART_NO$> = S.EpiPartNo
AllReportData<RowIndex, 7> = S.WO_Qty AllReportData<RowIndex, MATERIAL_REPORT.WO_QTY$> = S.WO_Qty
AllReportData<RowIndex, 8> = S.WO_RX_Qty AllReportData<RowIndex, MATERIAL_REPORT.WO_RX_QTY$> = S.WO_RX_Qty
AllReportData<RowIndex, 9> = S.WO_UnRel_Qty AllReportData<RowIndex, MATERIAL_REPORT.WO_UNREL_QTY$> = S.WO_UnRel_Qty
AllReportData<RowIndex, 10> = S.KitLocation AllReportData<RowIndex, MATERIAL_REPORT.KIT_LOCATION$> = S.KitLocation
AllReportData<RowIndex, 11> = S.KitQty AllReportData<RowIndex, MATERIAL_REPORT.KIT_QTY$> = S.KitQty
AllReportData<RowIndex, 12> = CassNeeded AllReportData<RowIndex, MATERIAL_REPORT.KIT_RO$> = KitCassList
AllReportData<RowIndex, 13> = KitCassList ; // Skip field 14, it is populated by users AllReportData<RowIndex, MATERIAL_REPORT.KIT_DEMAND$> = KitDemand
AllReportData<RowIndex, 15> = PTICassList AllReportData<RowIndex, MATERIAL_REPORT.PTI_RO$> = PTICassList
AllReportData<RowIndex, 16> = LoadedCassList ; // Skip field 17, it is populated by users AllReportData<RowIndex, MATERIAL_REPORT.LOAD_RO$> = LoadedCassList
AllReportData<RowIndex, 18> = S.StartDtm AllReportData<RowIndex, MATERIAL_REPORT.START_DTM$> = S.StartDtm
end end
end else end else
@ -1762,7 +1794,6 @@ Service GenerateMaterialTrackRows()
Rec = Database_Services('ReadDataRow', 'MATERIAL_REPORT', Key) Rec = Database_Services('ReadDataRow', 'MATERIAL_REPORT', Key)
If Error_Services('NoError') then If Error_Services('NoError') then
// Preserve user input fields // Preserve user input fields
Row<MATERIAL_REPORT.KIT_DEMAND$> = Rec<MATERIAL_REPORT.KIT_DEMAND$>
Row<MATERIAL_REPORT.COMMENTS$> = Rec<MATERIAL_REPORT.COMMENTS$> Row<MATERIAL_REPORT.COMMENTS$> = Rec<MATERIAL_REPORT.COMMENTS$>
Database_Services('WriteDataRow', 'MATERIAL_REPORT', Key, Row) Database_Services('WriteDataRow', 'MATERIAL_REPORT', Key, Row)
end end
@ -1814,13 +1845,11 @@ Service UpdateMaterialTrackData(MaterialTrackJSON)
For ArrayIndex = 1 to ArrayCount For ArrayIndex = 1 to ArrayCount
objRow = SRP_JSON(objArray, 'Get', '[':ArrayIndex:']') objRow = SRP_JSON(objArray, 'Get', '[':ArrayIndex:']')
KeyId = SRP_JSON(objRow, 'GetValue', 'KeyId') KeyId = SRP_JSON(objRow, 'GetValue', 'KeyId')
KitDemand = SRP_JSON(objRow, 'GetValue', 'KitDemand', '')
Comments = SRP_JSON(objRow, 'GetValue', 'Comments', '') Comments = SRP_JSON(objRow, 'GetValue', 'Comments', '')
HaveLock = Database_Services('GetKeyIDLock', 'MATERIAL_REPORT', KeyId, True$) HaveLock = Database_Services('GetKeyIDLock', 'MATERIAL_REPORT', KeyId, True$)
If HaveLock then If HaveLock then
MatRepRec = Database_Services('ReadDataRow', 'MATERIAL_REPORT', KeyId) MatRepRec = Database_Services('ReadDataRow', 'MATERIAL_REPORT', KeyId)
If Error_Services('NoError') then If Error_Services('NoError') then
MatRepRec<MATERIAL_REPORT.KIT_DEMAND$> = KitDemand
MatRepRec<MATERIAL_REPORT.COMMENTS$> = Comments MatRepRec<MATERIAL_REPORT.COMMENTS$> = Comments
Database_Services('WriteDataRow', 'MATERIAL_REPORT', KeyId, MatRepRec, True$, False$, False$) Database_Services('WriteDataRow', 'MATERIAL_REPORT', KeyId, MatRepRec, True$, False$, False$)
end end
@ -1839,508 +1868,6 @@ Service UpdateMaterialTrackData(MaterialTrackJSON)
end service 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() Service GetOpenNCRReportJson()
ErrorMessage = '' ErrorMessage = ''

View File

@ -93,7 +93,7 @@ Service CreateReturnToFabRecord(CassId, UserId)
end end
If NGLotId NE '' then If NGLotId NE '' then
//Assign default return to fab operations and move in. //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 If Error_Services('NoError') then
//Move in the lot //Move in the lot
Lot_Services('MoveInLot', NGLotId, UserId) Lot_Services('MoveInLot', NGLotId, UserId)
@ -165,48 +165,51 @@ Service CreateReturnToFabRecord(CassId, UserId)
End Service End Service
Service AddDefaultRTFOperations(LotId, UserId) Service AddDefaultRTFOperations(LotId)
ErrorMessage = '' ErrorMessage = ''
// Todo: add these to a configuration for return to fab. If LotId NE '' then
CurrentOperationsSeq = Lot_Services('GetLotOperationSequence', LotId) // Todo: add these to a configuration for return to fab.
if CurrentOperationsSeq EQ '' then CurrentOperationsSeq = Lot_Services('GetLotOperationSequence', LotId)
CurrSeq = 0 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 end else
CurrSeq = DCount(CurrentOperationsSeq, @FM) ErrorMessage = 'LotID Parameter was null.'
end 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 If ErrorMessage NE '' then
Error_Services('Add', ErrorMessage) Error_Services('Add', ErrorMessage)
end end
@ -1268,7 +1271,7 @@ Service MigrateLegacyRTFRecord(RTFRecordId)
LotId = Lot_Services('CreateNewLot', CassType, '', '', '', '', '', 'SYSTEM', '', CassId) LotId = Lot_Services('CreateNewLot', CassType, '', '', '', '', '', 'SYSTEM', '', CassId)
end end
If LotId NE '' then If LotId NE '' then
Return_To_Fab_Services('AddDefaultRTFOperations', LotId, 'SYSTEM') Return_To_Fab_Services('AddDefaultRTFOperations', LotId)
If Error_Services('NoError') then If Error_Services('NoError') then
//Now get all the created lot Operation records //Now get all the created lot Operation records
LotOperationIds = Lot_Services('GetLotOperationSequence', LotId) LotOperationIds = Lot_Services('GetLotOperationSequence', LotId)
@ -1321,3 +1324,4 @@ Service MigrateLegacyRTFRecord(RTFRecordId)
end service end service

View File

@ -990,7 +990,7 @@ Service ProcessScanData(ScanID, ScanJSON)
ScannedSuppLot = ScansRow<SCANS.SUPPLIER_LOT$> ScannedSuppLot = ScansRow<SCANS.SUPPLIER_LOT$>
RDSSuppLot = RDSRec<RDS_LOT_NUM$> RDSSuppLot = RDSRec<RDS_LOT_NUM$>
If (ScannedSuppLot NE '') then If (ScannedSuppLot NE '') then
If (ScannedSuppLot _EQC RDSSuppLot) then If (ScannedSuppLot _EQSC RDSSuppLot) then
IsTWLoggingReqd = RDS_Services('IsTWLoggingReqd', RDSNo) IsTWLoggingReqd = RDS_Services('IsTWLoggingReqd', RDSNo)
If IsTWLoggingReqd NE True$ OR TestWaferLotData NE '' then If IsTWLoggingReqd NE True$ OR TestWaferLotData NE '' then
WaferCountAckReq = Xlate('RDS', RDSNo, 'WAFER_COUNT_ACK_REQ', 'X') WaferCountAckReq = Xlate('RDS', RDSNo, 'WAFER_COUNT_ACK_REQ', 'X')
@ -999,32 +999,38 @@ Service ProcessScanData(ScanID, ScanJSON)
LoadStageReady = '' LoadStageReady = ''
PreStageReady = QA_Services('PreEpiSignatureReady', RDSNo, Username, WaferQty, Reactor) PreStageReady = QA_Services('PreEpiSignatureReady', RDSNo, Username, WaferQty, Reactor)
If PreStageReady EQ True$ then If PreStageReady EQ True$ then
LoadStageReady = QA_Services('LoadSignatureReady', RDSNo, Username, WaferQty, LLSide, True$, Reactor) RDSLayerAckReq = Xlate('RDS', RDSNo, 'RDS_LAYER_ACK_REQ', 'X')
If (LoadStageReady NE True$) then If RDSLayerAckReq EQ False$ then
// Why is it not ready? LoadStageReady = QA_Services('LoadSignatureReady', RDSNo, Username, WaferQty, LLSide, True$, Reactor)
ErrMsg = Error_Services('GetMessage') If (LoadStageReady NE True$) then
Begin Case // Why is it not ready?
Case IndexC(ErrMsg, 'supplement', 1) ErrMsg = Error_Services('GetMessage')
// Clear the error to return a JSON payload and handle the acknowledgements. Begin Case
Error_Services('Clear') Case IndexC(ErrMsg, 'supplement', 1)
Scan_Services('AddNotAcceptableReason', ErrMsg) // Clear the error to return a JSON payload and handle the acknowledgements.
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') Error_Services('Clear')
Scan_Services('AddNotAcceptableReason', "ROTR Load Block Enabled") Scan_Services('AddNotAcceptableReason', ErrMsg)
end else Case IndexC(ErrMsg, 'ROTR', 1)
ScansRow<SCANS.OVERRIDE_REQD$> = False$ ROTRBlock = Database_Services('ReadDataColumn', 'REACTOR', Reactor, REACTOR_ROTR_STATUS$, True$, 0, False$)
ScansRow<SCANS.OVERRIDE_REASON$> = '' ROTRBlockReason = Database_Services('ReadDataColumn', 'REACTOR', Reactor, REACTOR_ROTR_STATUS_REASON$, True$, 0, False$)
ScansRow<SCANS.OVERRIDE_TYPE$> = '' ROTREnabled = Database_Services('ReadDataColumn', 'REACTOR', Reactor, REACTOR_ENABLE_ROTR$, True$, 0, False$)
end If ( (ROTRBlock NE 'P') AND (ROTREnabled EQ True$) ) then
End Case // 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
end else end else
// Why is it not ready? // Why is it not ready?
@ -1062,7 +1068,7 @@ Service ProcessScanData(ScanID, ScanJSON)
ScannedSuppLot = ScansRow<SCANS.SUPPLIER_LOT$> ScannedSuppLot = ScansRow<SCANS.SUPPLIER_LOT$>
RDSSuppLot = RDSRec<RDS_LOT_NUM$> RDSSuppLot = RDSRec<RDS_LOT_NUM$>
If (ScannedSuppLot NE '') then If (ScannedSuppLot NE '') then
If (ScannedSuppLot _EQC RDSSuppLot) then If (ScannedSuppLot _EQSC RDSSuppLot) then
IsTWLoggingReqd = RDS_Services('IsTWLoggingReqd', RDSNo) IsTWLoggingReqd = RDS_Services('IsTWLoggingReqd', RDSNo)
If IsTWLoggingReqd NE True$ OR TestWaferLotData NE '' then If IsTWLoggingReqd NE True$ OR TestWaferLotData NE '' then
// Scheduled tool verification (only supports reactors at the moment) // 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_REASON$> = ROTRBlockReason
ScansRow<SCANS.OVERRIDE_TYPE$> = 'ROTR' ScansRow<SCANS.OVERRIDE_TYPE$> = 'ROTR'
Error_Services('Clear') Error_Services('Clear')
ErrMsg = ''
Scan_Services('AddNotAcceptableReason', "ROTR Load Block Enabled") Scan_Services('AddNotAcceptableReason', "ROTR Load Block Enabled")
end else end else
ScansRow<SCANS.OVERRIDE_REQD$> = False$ 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.') Scan_Services('AddNotAcceptableReason', 'The LWI stage engineering instructions must be acknowledged before the load operation can be signed.')
end end
end else end else
ErrMsg = 'RDS layer parameters must be reviewed for accuracy and acknowledged before the load operation can be signed.' Scan_Services('AddNotAcceptableReason', 'RDS layer parameters must be reviewed for accuracy and acknowledged before the load operation can be signed.')
Scan_Services('AddNotAcceptableReason', ErrMsg)
end end
end else end else
ErrMsg = 'Scanned tool ':ScanTool:' does not match the scheduled tool ':SchedTool:'. (':RDSNo:')' ErrMsg = 'Scanned tool ':ScanTool:' does not match the scheduled tool ':SchedTool:'. (':RDSNo:')'
@ -2419,7 +2425,3 @@ ClearCursors:
return return

View File

@ -30,22 +30,23 @@ Function Schedule_Services(@Service, @Params)
#pragma precomp SRP_PreCompiler #pragma precomp SRP_PreCompiler
$insert APP_INSERTS $Insert APP_INSERTS
$insert SERVICE_SETUP $Insert SERVICE_SETUP
$insert RLIST_EQUATES $Insert RLIST_EQUATES
$insert REACTOR_EQUATES $Insert REACTOR_EQUATES
$insert SCHED_DET_NG_EQUATES $Insert SCHED_DET_NG_EQUATES
$insert WO_LOG_EQUATES $Insert WO_LOG_EQUATES
$Insert WO_MAT_EQUATES $Insert WO_MAT_EQUATES
$insert WO_SCHEDULE_NG_EQUATES $Insert WO_SCHEDULE_NG_EQUATES
$insert COMPANY_EQUATES $Insert COMPANY_EQUATES
$insert PROD_VER_EQUATES $Insert PROD_VER_EQUATES
$insert PRS_LAYER_EQU $Insert PRS_LAYER_EQU
$insert SCHEDULE_EVENT_SUMMMARY_EQUATES $Insert SCHEDULE_EVENT_SUMMMARY_EQUATES
$insert EPI_PART_EQUATES $Insert EPI_PART_EQUATES
$insert PROD_SPEC_EQUATES $Insert PROD_SPEC_EQUATES
$insert SCHED_HIST_EQUATES $Insert SCHED_HIST_EQUATES
$Insert RDS_EQUATES $Insert RDS_EQUATES
$Insert WM_IN_EQUATES
Equ new_exist$ To 0 ; * Reduce Mode 0 Equ new_exist$ To 0 ; * Reduce Mode 0
Equ next_cur$ To 1 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 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 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 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/') Date = Oconv(Date(), 'D4/')
LogFileName = Date[7, 4] : '-' : Date[1, 2] : '-' : Date[4, 2] : ' Scheduler Log.csv' LogFileName = Date[7, 4] : '-' : Date[1, 2] : '-' : Date[4, 2] : ' Scheduler Log.csv'
@ -1246,13 +1247,56 @@ Service AdjustScheduleEvents(ReactNo)
Schedule_Services('LogActivity', ReactNo, LogData) Schedule_Services('LogActivity', ReactNo, LogData)
LogData<3> = 'Event complete: ':OConv(EventRec<SCHED_DET_NG.EVENT_COMP$>, "Btrue,false") LogData<3> = 'Event complete: ':OConv(EventRec<SCHED_DET_NG.EVENT_COMP$>, "Btrue,false")
Schedule_Services('LogActivity', ReactNo, LogData) 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$> UnprocessedCass = EventRec<SCHED_DET_NG.UNPROCESSED_CASS$>
ProcessedCass = EventRec<SCHED_DET_NG.PROCESSED_CASS$> ProcessedCass = EventRec<SCHED_DET_NG.PROCESSED_CASS$>
AllCassList = SRP_Array('Join', UnprocessedCass, ProcessedCass, 'OR', @VM) AllCassList = SRP_Array('Join', UnprocessedCass, ProcessedCass, 'OR', @VM)
AllCassList = SRP_Array('SortSimpleList', AllCassList, 'AscendingNumbers', @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 If Not(EventRec<SCHED_DET_NG.EVENT_COMP$>) and EventComp then
LogData = '' LogData = ''
@ -1263,9 +1307,7 @@ Service AdjustScheduleEvents(ReactNo)
end end
EventRec<SCHED_DET_NG.EVENT_COMP$> = EventComp EventRec<SCHED_DET_NG.EVENT_COMP$> = EventComp
WONo = EventRec<SCHED_DET_NG.WO_NO$>
ReactNo = EventRec<SCHED_DET_NG.REACT_NO$> ReactNo = EventRec<SCHED_DET_NG.REACT_NO$>
EventWfrs = EventRec<SCHED_DET_NG.EVENT_TOTAL_WFRS$>
WOQty = Xlate('WO_LOG', WONo, 'QTY', 'X') WOQty = Xlate('WO_LOG', WONo, 'QTY', 'X')
// If work order event is engaged then set start DTM to first cassette DTM in. // 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) // If previous event end time overlaps (e.g. soft block finished sooner than scheduled)
@ -2258,6 +2300,7 @@ end service
Service AddSchedEvent(ReactorNo, WorkOrderNo, StartDTM, StopDTM, Description, WaferQty) Service AddSchedEvent(ReactorNo, WorkOrderNo, StartDTM, StopDTM, Description, WaferQty)
// Create a unique key ID for the new event // Create a unique key ID for the new event
ErrorMsg = ''
NewEventKeyID = RTI_CreateGUID() NewEventKeyID = RTI_CreateGUID()
NewEventRec = '' NewEventRec = ''
NewEventRec<SCHED_DET_NG.REACT_NO$> = ReactorNo 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 NewEventRec<SCHED_DET_NG.EVENT_TOTAL_WFRS$> = WaferQty
EpiPro = (Xlate('WO_LOG', WorkOrderNo, 'REACT_TYPE', 'X') EQ 'EPP') EpiPro = (Xlate('WO_LOG', WorkOrderNo, 'REACT_TYPE', 'X') EQ 'EPP')
CurrDTM = Datetime() CurrDTM = Datetime()
EventProcCassList = '' EventProcCassList = ''
EventUnprocCassList = '' EventUnprocCassList = ''
LastLoadedRDS = '' LastLoadedRDS = ''
LastUnloadedRDS = '' LastUnloadedRDS = ''
// Determine start cassette and slot number // Determine start cassette and slot number
PrevSchedQty = Schedule_Services('GetScheduledWfrQty', WorkOrderNo) PrevSchedQty = Schedule_Services('GetScheduledWfrQty', WorkOrderNo)
StartCass = SRP_Math('CEILING', ( (PrevSchedQty + 1) / 25)) VoidedQty = Work_Order_Services('GetVoidedWaferCount', WorkOrderNo)
StartCass = SRP_Math('CEILING', ( (PrevSchedQty + VoidedQty + 1) / 25))
If StartCass EQ 0 then StartCass = 1 If StartCass EQ 0 then StartCass = 1
StartSlot = Mod(PrevSchedQty, 25) + 1 StartSlot = Mod(PrevSchedQty, 25) + 1
TotalSchedQty = PrevSchedQty + WaferQty TotalSchedQty = PrevSchedQty + WaferQty + VoidedQty
StopCass = SRP_Math('CEILING', ( TotalSchedQty / 25 ) ) StopCass = SRP_Math('CEILING', ( TotalSchedQty / 25 ) )
StopSlot = Mod(TotalSchedQty, 25) StopSlot = Mod(TotalSchedQty, 25)
If StopSlot EQ 0 then StopSlot = 25 If StopSlot EQ 0 then StopSlot = 25
@ -2284,128 +2328,192 @@ Service AddSchedEvent(ReactorNo, WorkOrderNo, StartDTM, StopDTM, Description, Wa
RDSKeys = '' RDSKeys = ''
If EpiPro then If EpiPro then
For CassNo = StartCass to StopCass For CassNo = StartCass to StopCass
WMIKey = WorkOrderNo:'*1*':CassNo WMIKey = WorkOrderNo:'*1*':CassNo
WMIRdsList = Xlate('WM_IN', WMIKey, 'RDS_NO', 'X') If RowExists('WM_IN', WMIKey) then
If WMIRdsList NE '' then WMIRec = Database_Services('ReadDataRow', 'WM_IN', WMIKey)
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 end else
// No RDS keys exist for this cassette yet, so it's unprocessed // Material not received yet
EventUnprocCassList<0, -1> = CassNo WMIRec = ''
end 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 Next CassNo
If RDSKeys NE '' then If (ErrorMsg EQ '') then
RDSKeys = SRP_Array('Clean', RDSKeys, 'TrimAndMakeUnique', @VM) If RDSKeys NE '' then
For each RDSKey in RDSKeys using @VM setting vPos RDSKeys = SRP_Array('Clean', RDSKeys, 'TrimAndMakeUnique', @VM)
DtmOut = Xlate('RDS', RDSKey, 'DATETIME_OUT', 'X') For each RDSKey in RDSKeys using @VM setting vPos
WMIKeys = Xlate('RDS', RDSKey, 'WM_IN_KEY', 'X') RDSRec = Database_Services('ReadDataRow', 'RDS', RDSKey)
For each WMIKey in WMIKeys using @VM If Error_Services('NoError') then
CassNo = Field(WMIKey, '*', 3) DateOut = RDSRec<RDS_DATE_OUT$>
If DtmOut NE '' then TimeOut = RDSRec<RDS_TIME_OUT$>
LastUnloadedRDS = RDSKey TimeOut = TimeOut/86400
Locate CassNo in EventProcCassList using @VM setting Dummy else TimeOut = SRP_Math('ROUND', TimeOut, 5)
EventProcCassList<0, -1> = CassNo TimeOut = TimeOut[2, 6]
end DtmOut = DateOut:TimeOut
end else end else
Locate CassNo in EventUnprocCassList using @VM setting Dummy else ErrorMsg = Error_Services('GetMessage')
EventUnprocCassList<0, -1> = CassNo
end
end end
Next WMIKey If (ErrorMsg EQ '' ) then
Next RDSKey WMIKeys = Xlate('RDS', RDSKey, 'WM_IN_KEY', 'X')
end 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) EventUnprocCassList = SRP_Array('SortSimpleList', EventUnprocCassList, 'AscendingNumbers', @VM)
// This line ensures EpiPro cassettes are not recorded as both processed and unprocessed. // This line ensures EpiPro cassettes are not recorded as both processed and unprocessed.
EventProcCassList = SRP_Array('Join', EventProcCassList, EventUnprocCassList, 'NOT', @VM) EventProcCassList = SRP_Array('Join', EventProcCassList, EventUnprocCassList, 'NOT', @VM)
end
end else end else
For CassNo = StartCass to StopCass For CassNo = StartCass to StopCass
WOMatKey = WorkOrderNo:'*':CassNo DtmOut = ''
RDSKey = Xlate('WO_MAT', WOMatKey, 'RDS_NO', 'X') WOMatKey = WorkOrderNo:'*':CassNo
DtmOut = Xlate('RDS', RDSKey, 'DATETIME_OUT', 'X') If RowExists('WO_MAT', WOMatKey) then
If DtmOut NE '' then WOMatRec = Database_Services('ReadDataRow', 'WO_MAT', WOMatKey)
LastUnloadedRDS = RDSKey end else
Locate CassNo in EventProcCassList using @VM setting Dummy else // Material not received yet
EventProcCassList<0, -1> = CassNo 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
end else end else
Locate CassNo in EventUnprocCassList using @VM setting Dummy else ErrorMsg = Error_Services('GetMessage')
EventUnprocCassList<0, -1> = CassNo 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
end end
Until (ErrorMsg NE '')
Next CassNo Next CassNo
end end
EventComp = (EventUnprocCassList EQ '') If (ErrorMsg EQ '') then
If EventComp then StopDtm = Xlate('RDS', LastUnloadedRDS, 'DATETIME_OUT', 'X')
// Update event EventComp = (EventUnprocCassList EQ '')
NewEventRec<SCHED_DET_NG.EVENT_COMP$> = EventComp If EventComp then StopDtm = Xlate('RDS', LastUnloadedRDS, 'DATETIME_OUT', 'X')
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 // Update event
// Determine where to insert the event in the REACTOR record linked list NewEventRec<SCHED_DET_NG.EVENT_COMP$> = EventComp
// Add the event to the REACTOR record event list NewEventRec<SCHED_DET_NG.PROCESSED_CASS$> = EventProcCassList
ReactRec = Database_Services('ReadDataRow', 'REACTOR', ReactorNo) NewEventRec<SCHED_DET_NG.UNPROCESSED_CASS$> = EventUnprocCassList
ReactSchedEvents = ReactRec<REACTOR_SCHED_EVENTS$> NewEventRec<SCHED_DET_NG.STOP_DTM$> = StopDtm
CurrNumEvents = DCount(ReactSchedEvents, @VM) Database_Services('WriteDataRow', 'SCHED_DET_NG', NewEventKeyID, NewEventRec)
// 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 If Error_Services('NoError') then
// start DTM. // Determine where to insert the event in the REACTOR record linked list
If NewNumEvents GT 1 then // Add the event to the REACTOR record event list
PrevEventKey = ReactSchedEvents<0, (NewNumEvents - 1)> ReactRec = Database_Services('ReadDataRow', 'REACTOR', ReactorNo)
If PrevEventKey NE '' then ReactSchedEvents = ReactRec<REACTOR_SCHED_EVENTS$>
PrevEventRec = Database_Services('ReadDataRow', 'SCHED_DET_NG', PrevEventKey) CurrNumEvents = DCount(ReactSchedEvents, @VM)
PrevEventStopDTM = PrevEventRec<SCHED_DET_NG.STOP_DTM$> // Add our new event key ID to the reactor event list
If PrevEventStopDTM GT StartDTM then NewNumEvents = CurrNumEvents + 1
PrevEventStopDTM = StartDTM InsertPos = ''
PrevEventRec<SCHED_DET_NG.STOP_DTM$> = PrevEventStopDTM For EventIndex = 1 to CurrNumEvents Step 1
Database_Services('WriteDataRow', 'SCHED_DET_NG', PrevEventKey, PrevEventRec, True$, False$, True$) 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
end end
// Record schedule change in SCHED_HIST table
Schedule_Services('AddSchedHist', NewEventKeyID, ReactorNo, 'ADD', @User4)
Response = NewEventKeyID
end end
// Record schedule change in SCHED_HIST table
Schedule_Services('AddSchedHist', NewEventKeyID, ReactorNo, 'ADD', @User4)
Response = NewEventKeyID
end end
If ErrorMsg NE '' then Error_Services('Add', ErrorMsg)
end service end service
@ -3151,73 +3259,155 @@ Service GetAvailableWorkOrders(ReactorType, SusceptorSize, ReactorNo)
end service end service
Service MarkCassProcessed(WONo, CassNo, ProcessedDTM) Service UpdateCassProcStatus(WONo, CassNo, ProcessedDTM)
ErrorMsg = ''
If ((WONo NE '') and (CassNo NE '') and (ProcessedDTM NE '') ) then If ((WONo NE '') and (CassNo NE '') and (ProcessedDTM NE '') ) then
If Num(ProcessedDTM) then ProcessedDTM = OConv(ProcessedDTM, 'DT2/^H') If Num(ProcessedDTM) then ProcessedDTM = OConv(ProcessedDTM, 'DT2/^H')
// Find the SCHED_DET_NG event record that contains the cassette number // 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 = '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 GoSub ClearCursors
RList(Query, TARGET_ACTIVELIST$, '', '', '') RList(Query, TARGET_ACTIVELIST$, '', '', '')
EOF = False$ EOF = False$
Done = False$ Done = False$
Loop Loop
Readnext SchedDetNGKey else EOF = True$ Readnext SchedDetNGKey else EOF = True$
Until EOF = True$ Until EOF
SchedDetNGRec = Database_Services('ReadDataRow', 'SCHED_DET_NG', SchedDetNGKey) Schedule_Services('UpdateEventCassProcStatus', WONo, CassNo, SchedDetNGKey)
CassComp = False$ If Error_Services('HasError') then ErrorMsg = Error_Services('GetMessage')
ReactType = Xlate('WO_LOG', WONo, 'REACT_TYPE', 'X') 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 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 WMIKey = WONo:'*1*':CassNo
WMIRdsList = Xlate('WM_IN', WMIKey, 'RDS_NO', 'X') If RowExists('WM_IN', WMIKey) then
UnloadDtms = Xlate('RDS', WMIRdsList, 'DATETIME_OUT', 'X') // Since EpiPro splits WM_IN cassettes out into RDS runs, we need to determine if the
NumUnloadedWfrs = 0 // cassette has been emptied out or if enough wafers have been consumed such that
If UnloadDtms NE '' then // the wafer count equals the split work order event quantity.
For each UnloadDtm in UnloadDtms using @VM StopDtm = SchedDetNGRec<SCHED_DET_NG.STOP_DTM$>
NumUnloadedWfrs += (UnloadDtm NE '') SchedWfrQty = Schedule_Services('GetScheduledWfrQty', WONo, StopDtm)
Next UnloadDtm // Determine the cassette and slot this event should end on. This will be used to identify
end // cassettes that should be marked as complete when the event ends in the middle of the cassette.
CassRemWfrs = Xlate('WM_IN', WMIKey, 'REM_WFRS', 'X') // That is, the EpiPro work order events should end on an RDS when they are split around block
If ( (NumUnloadedWfrs EQ 25) or ( (CassNo EQ EndCassNo) and (NumUnloadedWfrs GE EndSlotNo) ) or (CassRemWfrs EQ 0) ) then // out events.
CassComp = True$ 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
end else end else
CassComp = True$ WOMatKey = WoNo:'*':CassNo
end If RowExists('WO_MAT', WOMatKey) then
UnprocessedCassettes = SchedDetNGRec<SCHED_DET_NG.UNPROCESSED_CASS$> CurrWaferCount = obj_WO_Mat('CurrWaferCnt', WOMatKey)
If CassComp then RDSNo = Xlate('WO_MAT', WOMatKey, 'RDS_NO', 'X')
Locate CassNo in UnprocessedCassettes using @VM setting vPos then DateOut = Xlate('RDS', RDSNo, 'DATE_OUT', 'X')
UnprocessedCassettes = Delete(UnprocessedCassettes, 0, vPos, 0) CassComp = ( (CurrWaferCount EQ 0) or (DateOut NE '') )
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$
end end
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 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 end service
@ -3529,6 +3719,226 @@ Service SendRefreshMessage()
end service 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 // Internal GoSubs
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -179,3 +179,27 @@ Test ScanNumDataPointsMatchesRdsTestSpecThickMPatternEpiProWithCorrectArgsShould
Matches = Metrology_Services('ScanNumDataPointsMatchesRdsTestSpecThickMPattern', '650028', '2', 9, '1722253':@VM:'1722259', 'FTIR', 2) Matches = Metrology_Services('ScanNumDataPointsMatchesRdsTestSpecThickMPattern', '650028', '2', 9, '1722253':@VM:'1722259', 'FTIR', 2)
Assert Matches equals True$ Assert Matches equals True$
end test 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

View File

@ -155,17 +155,23 @@ WRITE_RECORD_PRE:
return return
WRITE_RECORD: WRITE_RECORD:
OrigQty = OrigRecord<TW_USE_TW_QTY$>
NewQty = Record<TW_USE_TW_QTY$>
OrigSig = OrigRecord<TW_USE_SIGNATURE$>
NewSig = OrigRecord<TW_USE_SIGNATURE$>
If OrigRecord EQ '' or OrigQty NE NewQty or OrigSig NE NewSig then OrigQty = OrigRecord<TW_USE_TW_QTY$>
NewQty = Record<TW_USE_TW_QTY$>
OrigSig = OrigRecord<TW_USE_SIGNATURE$>
NewSig = OrigRecord<TW_USE_SIGNATURE$>
If ( (OrigRecord EQ '') or (OrigQty NE NewQty) or (OrigSig NE NewSig) ) then
MetrologyID = Field(Name, '*', 1) MetrologyID = Field(Name, '*', 1)
RDSNo = Xlate('RDS_TEST', MetrologyID, RDS_TEST_RDS_NO$, 'X') RDSNo = Xlate('RDS_TEST', MetrologyID, RDS_TEST_RDS_NO$, 'X')
Service_Services('PostProcedure', 'RDS_SERVICES', 'AllTWUseSigned':SD$:RDSNo) Service_Services('PostProcedure', 'RDS_SERVICES', 'AllTWUseSigned':SD$:RDSNo)
end end
If (OrigQty NE NewQty) then
ScrapAdj = NewQty - OrigQty
Work_Order_Services('AdjustScrappedQty', {WO_NO}, ScrapAdj)
end
return return
DELETE_RECORD_PRE: DELETE_RECORD_PRE:
@ -180,6 +186,11 @@ DELETE_RECORD:
LogData<3> = Name LogData<3> = Name
Logging_Services('AppendLog', objLog, LogData, @RM, @FM) 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 return
@ -228,3 +239,4 @@ Restore_System_Variables:
@FILE.ERROR = OrigFileError @FILE.ERROR = OrigFileError
return return

View 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

View File

@ -25,12 +25,23 @@ Event WINDOW.CREATE(CreateParam)
OIWizardBaseUrl = Environment_Services('GetOIWizardBaseUrl') OIWizardBaseUrl = Environment_Services('GetOIWizardBaseUrl')
Set_Property(@Window, '@BASE_URL', OIWizardBaseUrl) Set_Property(@Window, '@BASE_URL', OIWizardBaseUrl)
InitNavPage = CreateParam InitNavPage = CreateParam
Set_Property(@Window, '@INIT_NAV_PAGE', InitNavPage) Set_Property(@Window, '@INIT_NAV_PAGE', InitNavPage)
Set_Property(@Window, '@FIRST_RENDER', True$) Set_Property(@Window, '@FIRST_RENDER', True$)
Set_Property(@Window:'.WEBVIEW_MAIN', 'AUTOSIZEHEIGHT', True$) Set_Property(@Window:'.WEBVIEW_MAIN', 'AUTOSIZEHEIGHT', True$)
Set_Property(@Window:'.WEBVIEW_MAIN', 'AUTOSIZEWIDTH', 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 End Event
@ -103,4 +114,3 @@ Event WINDOW.TIMER()
end event end event

View File

@ -165,7 +165,7 @@ WRITE_RECORD:
CassNo = Field(Name, '*', 3) CassNo = Field(Name, '*', 3)
ProcessedDTM = Datetime() ProcessedDTM = Datetime()
// This service will determine if the cassette needs to be marked as complete. // 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) WfrCount = DCount(Record<WM_IN_SLOT_NO$>, @VM)
If WfrCount LT 25 then If WfrCount LT 25 then

View File

@ -60,6 +60,8 @@ $Insert CUST_EPI_PART_EQUATES
$Insert QUOTE_SPEC_EQU $Insert QUOTE_SPEC_EQU
$Insert WO_STEP_EQUATES $Insert WO_STEP_EQUATES
Equ NUM_ATTEMPTS$ to 60
EQU PI$LEFT TO 1 EQU PI$LEFT TO 1
EQU PI$TOP TO 2 EQU PI$TOP TO 2
EQU PI$RIGHT TO 3 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 PSN_Services, SRP_Rotate_Array, Datetime, Database_Services, Environment_Services, Logging_Services
Declare function obj_Install, SRP_Json 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 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 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.')
@ -218,19 +220,27 @@ Service VerifyWoStepWMIKeyIndex(WMIKey)
// Add index transaction to update WM_IN_KEYS relational index (target WO_STEP table) // 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 IndexTransactionRow = 'WO_STEP*WM_IN_KEYS*AR':@FM:WMIKey:@FM:"":@FM:WOStepKey:@FM
Open "!WM_IN" to BangTable then Open "!WM_IN" to BangTable then
Lock BangTable, 0 then Done = False$
Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM For AttemptNo = 1 to NUM_ATTEMPTS$
PendingTrans := IndexTransactionRow If AttemptNo GT 1 then Delay(1)
Write PendingTrans on BangTable, 0 then Lock BangTable, 0 then
LogData<4> = 'Index transaction successfully added.' Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM
Logging_Services('AppendLog', objVerifyWMIKeyLog, LogData, @RM, @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 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 end
Unlock BangTable, 0 else ErrorMsg = 'Unable to Open !WM_IN to add index transaction. ':WMIKey Until Done or ErrorMsg
end else Next AttemptNo
ErrorMsg = 'Unable to Lock !WM_IN to add index transaction. ':WMIKey
end
end else end else
ErrorMsg = 'Unable to Open !WM_IN to add index transaction. ':WMIKey ErrorMsg = 'Unable to Open !WM_IN to add index transaction. ':WMIKey
end 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' 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' Headers = 'Logging DTM':@FM:'WMIKey':@FM:'WOStep':@FM:'Result'
objVerifyWMIWoIndexLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, COMMA$, Headers, '', False$, False$) objVerifyWMIWoIndexLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, COMMA$, Headers, '', False$, False$)
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
LogData = '' LogData = ''
LogData<1> = LoggingDtm LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<2> = WMIKey LogData<2> = WMIKey
LogData<4> = 'Begin ':Service LogData<4> = 'Begin ':Service
Logging_Services('AppendLog', objVerifyWMIWoIndexLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyWMIWoIndexLog, LogData, @RM, @FM)
@ -278,32 +287,44 @@ Service VerifyWOLogWMIKeyIndex(WMIKey)
If WONo NE '' then If WONo NE '' then
WOLogRDSKeys = '' WOLogRDSKeys = ''
Extract_Si_Keys('WM_IN', 'WO_NO', WONo, WOLogRDSKeys) Extract_Si_Keys('WM_IN', 'WO_NO', WONo, WOLogRDSKeys)
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<3> = WONo LogData<3> = WONo
Logging_Services('AppendLog', objVerifyWMIWoIndexLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyWMIWoIndexLog, LogData, @RM, @FM)
Locate WMIKey in WOLogRDSKeys using @VM setting vPos else 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.' LogData<4> = 'WMIKey missing from Btree index. Generating index transaction.'
Logging_Services('AppendLog', objVerifyWMIWoIndexLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyWMIWoIndexLog, LogData, @RM, @FM)
// Add index transaction to update WO_NO btree index // Add index transaction to update WO_NO btree index
IndexTransactionRow = 'WO_NO':@FM:WMIKey:@FM:"":@FM:WONo:@FM IndexTransactionRow = 'WO_NO':@FM:WMIKey:@FM:"":@FM:WONo:@FM
Open "!WM_IN" to BangTable then Open "!WM_IN" to BangTable then
Lock BangTable, 0 then Done = False$
Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM For AttemptNo = 1 to NUM_ATTEMPTS$
PendingTrans := IndexTransactionRow If AttemptNo GT 1 then Delay(1)
Write PendingTrans on BangTable, 0 then Lock BangTable, 0 then
LogData<4> = 'Index transaction successfully added.' Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM
Logging_Services('AppendLog', objVerifyWMIWoIndexLog, LogData, @RM, @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 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 end
Unlock BangTable, 0 else ErrorMsg = 'Error in ':Service:' service. Unable to Open !WM_IN to add index transaction. ':WMIKey Until Done or ErrorMsg
end else Next AttemptNo
ErrorMsg = 'Error in ':Service:' service. Unable to Lock !WM_IN to add index transaction. ':WMIKey
end
end else end else
ErrorMsg = 'Error in ':Service:' service. Unable to Open !WM_IN to add index transaction. ':WMIKey ErrorMsg = 'Error in ':Service:' service. Unable to Open !WM_IN to add index transaction. ':WMIKey
end end
end end
end else end else
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<4> = 'WONo for WM_IN ':WMIKey:' is null. Nothing to update.' LogData<4> = 'WONo for WM_IN ':WMIKey:' is null. Nothing to update.'
Logging_Services('AppendLog', objVerifyWMIWoIndexLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyWMIWoIndexLog, LogData, @RM, @FM)
end end
@ -313,10 +334,12 @@ Service VerifyWOLogWMIKeyIndex(WMIKey)
end end
If ErrorMsg NE '' then If ErrorMsg NE '' then
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<4> = ErrorMsg LogData<4> = ErrorMsg
Logging_Services('AppendLog', objVerifyWMIWoIndexLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyWMIWoIndexLog, LogData, @RM, @FM)
end end
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<4> = 'End ':Service LogData<4> = 'End ':Service
Logging_Services('AppendLog', objVerifyWMIWoIndexLog, LogData, @RM, @FM) 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' 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' Headers = 'Logging DTM':@FM:'WMIKey':@FM:'WOMatKey':@FM:'Result'
objVerifyWoMatWmiKeyLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, COMMA$, Headers, '', False$, False$) objVerifyWoMatWmiKeyLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, COMMA$, Headers, '', False$, False$)
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
LogData = '' LogData = ''
LogData<1> = LoggingDtm LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<2> = WMIKey LogData<2> = WMIKey
LogData<4> = 'Begin ':Service LogData<4> = 'Begin ':Service
Logging_Services('AppendLog', objVerifyWoMatWmiKeyLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyWoMatWmiKeyLog, LogData, @RM, @FM)
@ -347,32 +369,44 @@ Service VerifyWOMatWMIKeyIndex(WMIKey)
WOMatKey = Field(WMIKey, '*', 1, 1):'*':Field(WMIKey, '*', 3, 1) WOMatKey = Field(WMIKey, '*', 1, 1):'*':Field(WMIKey, '*', 3, 1)
If WOMatKey NE '' then If WOMatKey NE '' then
WOMatWMIKey = Xlate('WO_MAT', WOMatKey, 'WMI_KEY', 'X') WOMatWMIKey = Xlate('WO_MAT', WOMatKey, 'WMI_KEY', 'X')
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<3> = WOMatKey LogData<3> = WOMatKey
Logging_Services('AppendLog', objVerifyWoMatWmiKeyLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyWoMatWmiKeyLog, LogData, @RM, @FM)
If WOMatWMIKey EQ '' then If WOMatWMIKey EQ '' then
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<4> = 'WMIKey missing from WO_MAT record. Generating index transaction.' LogData<4> = 'WMIKey missing from WO_MAT record. Generating index transaction.'
Logging_Services('AppendLog', objVerifyWoMatWmiKeyLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyWoMatWmiKeyLog, LogData, @RM, @FM)
// Add index transaction to update WMI_KEY relational index (target WO_MAT table) // 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 IndexTransactionRow = 'WO_MAT*WMI_KEY*TOP':@FM:WMIKey:@FM:"":@FM:WOMatKey:@FM
Open "!WM_IN" to BangTable then Open "!WM_IN" to BangTable then
Lock BangTable, 0 then Done = False$
Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM For AttemptNo = 1 to NUM_ATTEMPTS$
PendingTrans := IndexTransactionRow If AttemptNo GT 1 then Delay(1)
Write PendingTrans on BangTable, 0 then Lock BangTable, 0 then
LogData<4> = 'Index transaction successfully added.' Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM
Logging_Services('AppendLog', objVerifyWoMatWmiKeyLog, LogData, @RM, @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 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 end
Unlock BangTable, 0 else ErrorMsg = 'Unable to Open !WM_IN to add index transaction. ':WMIKey Until Done or ErrorMsg
end else Next AttemptNo
ErrorMsg = 'Unable to Lock !WM_IN to add index transaction. ':WMIKey
end
end else end else
ErrorMsg = 'Unable to Open !WM_IN to add index transaction. ':WMIKey ErrorMsg = 'Unable to Open !WM_IN to add index transaction. ':WMIKey
end end
end end
end else end else
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<4> = 'WO_MAT key for WM_IN ':WMIKey:' is null. Nothing to update.' LogData<4> = 'WO_MAT key for WM_IN ':WMIKey:' is null. Nothing to update.'
Logging_Services('AppendLog', objVerifyWoMatWmiKeyLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyWoMatWmiKeyLog, LogData, @RM, @FM)
end end
@ -380,10 +414,12 @@ Service VerifyWOMatWMIKeyIndex(WMIKey)
end end
If ErrorMsg NE '' then If ErrorMsg NE '' then
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<4> = ErrorMsg LogData<4> = ErrorMsg
Logging_Services('AppendLog', objVerifyWoMatWmiKeyLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyWoMatWmiKeyLog, LogData, @RM, @FM)
end end
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<4> = 'End ':Service LogData<4> = 'End ':Service
Logging_Services('AppendLog', objVerifyWoMatWmiKeyLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyWoMatWmiKeyLog, LogData, @RM, @FM)

View File

@ -57,21 +57,23 @@ $Insert WO_MAT_EQUATES
$Insert WO_LOG_EQUATES $Insert WO_LOG_EQUATES
$Insert COMPANY_EQUATES $Insert COMPANY_EQUATES
$Insert RETURN_TO_FAB_LOTS_EQUATES $Insert RETURN_TO_FAB_LOTS_EQUATES
$INSERT PROD_SPEC_EQUATES $Insert PROD_SPEC_EQUATES
$INSERT WO_STEP_EQUATES $Insert WO_STEP_EQUATES
$INSERT EPI_PART_EQUATES $Insert EPI_PART_EQUATES
$INSERT CUST_EPI_PART_EQUATES $Insert CUST_EPI_PART_EQUATES
$INSERT PRS_STAGE_EQUATES $Insert PRS_STAGE_EQUATES
$insert UNIT_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 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 PSN_Services, SRP_Rotate_Array, Datetime, Return_To_Fab_Services, Environment_Services
Declare function Logging_Services Declare function Logging_Services
Declare subroutine Database_Services, SRP_JSON, Error_Services, Extract_Si_Keys, Set_Status, obj_wo_mat_log 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 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 end
Return Response else '' Return Response else ''
@ -94,7 +96,7 @@ Service GetComments(WMOutNo)
CommentArray = '' CommentArray = ''
WMOutRow = Database_Services('ReadDataRow', 'WM_OUT', WMOutNo) 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$> CommentUsers = WMOutRow<WM_OUT_EPP_COMMENT_USER$>
Comments = WMOutRow<WM_OUT_EPP_COMMENT_NOTE$> Comments = WMOutRow<WM_OUT_EPP_COMMENT_NOTE$>
@ -119,25 +121,25 @@ Service AddComment(WMOutNo, Comment, UsernameOpt)
WMOutRow = Database_Services('ReadDataRow', 'WM_OUT', WMOutNo) WMOutRow = Database_Services('ReadDataRow', 'WM_OUT', WMOutNo)
UserName = @USER4 UserName = @USER4
If Assigned(UsernameOpt) then If Assigned(UsernameOpt) then
If UsernameOpt NE '' then If UsernameOpt NE '' then
Username = UsernameOpt Username = UsernameOpt
end end
end end
CommentTime = Datetime() CommentTime = Datetime()
OldDates = WMOutRow<WM_OUT_EPP_COMMENT_DATE$> OldDates = WMOutRow<WM_OUT_EPP_COMMENT_DATE$>
OldUsers = WMOutRow<WM_OUT_EPP_COMMENT_USER$> OldUsers = WMOutRow<WM_OUT_EPP_COMMENT_USER$>
OldComments = WMOutRow<WM_OUT_EPP_COMMENT_NOTE$> OldComments = WMOutRow<WM_OUT_EPP_COMMENT_NOTE$>
If (OldDates EQ '' AND OldUsers EQ '' AND OldComments EQ '') then If (OldDates EQ '' AND OldUsers EQ '' AND OldComments EQ '') then
WMOutRow<WM_OUT_EPP_COMMENT_DATE$> = CommentTime WMOutRow<WM_OUT_EPP_COMMENT_DATE$> = CommentTime
WMOutRow<WM_OUT_EPP_COMMENT_USER$> = UserName WMOutRow<WM_OUT_EPP_COMMENT_USER$> = UserName
WMOutRow<WM_OUT_EPP_COMMENT_NOTE$> = Comment WMOutRow<WM_OUT_EPP_COMMENT_NOTE$> = Comment
end else end else
WMOutRow<WM_OUT_EPP_COMMENT_DATE$> = CommentTime :@VM: OldDates WMOutRow<WM_OUT_EPP_COMMENT_DATE$> = CommentTime :@VM: OldDates
WMOutRow<WM_OUT_EPP_COMMENT_USER$> = UserName :@VM: OldUsers WMOutRow<WM_OUT_EPP_COMMENT_USER$> = UserName :@VM: OldUsers
WMOutRow<WM_OUT_EPP_COMMENT_NOTE$> = Comment :@VM: OldComments WMOutRow<WM_OUT_EPP_COMMENT_NOTE$> = Comment :@VM: OldComments
end end
Database_Services('WriteDataRow', 'WM_OUT', WMOutNo, WMOutRow, 1, 0, 0) Database_Services('WriteDataRow', 'WM_OUT', WMOutNo, WMOutRow, 1, 0, 0)
End Service End Service
@ -167,9 +169,9 @@ Service ConvertRecordToJSON(KeyID, Record, ItemURL)
SRP_JSON(objWMOut, 'SetValue', 'CURR_WFR_CNT', CurrWfrQty) SRP_JSON(objWMOut, 'SetValue', 'CURR_WFR_CNT', CurrWfrQty)
CustNo = Database_Services('ReadDataColumn', 'WO_LOG', {WO_NO}, WO_LOG_CUST_NO$, True$, 0, False$) 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$) CustReshipNo = Database_Services('ReadDataColumn', 'WO_MAT', WoMatKey, WO_MAT_RESHIP_CUST_NO$, True$, 0, False$)
If CustReshipNo NE '' then If CustReshipNo NE '' then
CustNo = CustReshipNo CustNo = CustReshipNo
end end
CustName = Database_Services('ReadDataColumn', 'COMPANY', CustNo, COMPANY_CO_NAME$, True$, 0, False$) CustName = Database_Services('ReadDataColumn', 'COMPANY', CustNo, COMPANY_CO_NAME$, True$, 0, False$)
CustAbbrev = Database_Services('ReadDataColumn', 'COMPANY', CustNo, COMPANY_ABBREV$, True$, 0, False$) CustAbbrev = Database_Services('ReadDataColumn', 'COMPANY', CustNo, COMPANY_ABBREV$, True$, 0, False$)
SRP_JSON(objWMOut, 'SetValue', 'CustNo', CustNo) SRP_JSON(objWMOut, 'SetValue', 'CustNo', CustNo)
@ -229,13 +231,13 @@ Service ConvertRecordToJSON(KeyID, Record, ItemURL)
For each RTFRecordId in AllRTFRecords using @VM setting vPos For each RTFRecordId in AllRTFRecords using @VM setting vPos
objRTF = '' objRTF = ''
If SRP_JSON(objRTF, 'New', 'Object') then If SRP_JSON(objRTF, 'New', 'Object') then
RTFRecord = Database_Services('ReadDataRow', 'RETURN_TO_FAB_LOTS', RTFRecordId, True$, 0, False$) RTFRecord = Database_Services('ReadDataRow', 'RETURN_TO_FAB_LOTS', RTFRecordId, True$, 0, False$)
SRP_JSON(objRTF, 'SetValue', 'ReturnToFabLotsId', RTFRecordId) 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', '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(objRTF, 'SetValue', 'Completed', RTFRecord<RETURN_TO_FAB_LOTS_COMPLETED$>, 'Boolean')
SRP_JSON(objRTFRecords, 'Set', 'ReturnToFabRecord', objRTF) SRP_JSON(objRTFRecords, 'Set', 'ReturnToFabRecord', objRTF)
SRP_JSON(objRTFRecords, 'Add', objRTF) SRP_JSON(objRTFRecords, 'Add', objRTF)
SRP_JSON(objRTF, 'Release') SRP_JSON(objRTF, 'Release')
end end
Next RTFRecordId Next RTFRecordId
@ -331,28 +333,28 @@ Service GetWMOData(WorkOrderNo, Columns, ShowGasGauge, WMOOverrideList)
If Error_Services('NoError') then If Error_Services('NoError') then
For each Column in Columns using @VM setting vPos For each Column in Columns using @VM setting vPos
Begin Case Begin Case
Case Column EQ 'HOLD' Case Column EQ 'HOLD'
HoldStatus = Calculate(Column) HoldStatus = Calculate(Column)
If HoldStatus EQ True$ then If HoldStatus EQ True$ then
HoldStatus = 'On Hold' HoldStatus = 'On Hold'
end else end else
HoldStatus = 'Off Hold' HoldStatus = 'Off Hold'
end end
WMOList<fPos, vPos> = HoldStatus WMOList<fPos, vPos> = HoldStatus
Case Otherwise$ Case Otherwise$
Val = Calculate(Column) Val = Calculate(Column)
Conv = Xlate('DICT.WM_OUT', Column, DICT_CONV$, 'X') Conv = Xlate('DICT.WM_OUT', Column, DICT_CONV$, 'X')
If Conv NE '' then If Conv NE '' then
Val = OConv(Val, Conv) Val = OConv(Val, Conv)
end end
WMOList<fPos, vPos> = Val WMOList<fPos, vPos> = Val
End Case End Case
Next Column Next Column
end else end else
Error_Services('Add', 'Error reading WM_OUT Record ' : @ID : ' in the ' : Service : ' service.') Error_Services('Add', 'Error reading WM_OUT Record ' : @ID : ' in the ' : Service : ' service.')
end end
* update the gauge * update the gauge
If ShowGasGauge then Msg(@Window, MsgUp, fPos, MSGINSTUPDATE$) If ShowGasGauge then Msg(@Window, MsgUp, fPos, MSGINSTUPDATE$)
Next @ID Next @ID
end else end else
Error_Services('Add', 'Error opening WM_OUT dictionary in the ' : Service : ' service.') Error_Services('Add', 'Error opening WM_OUT dictionary in the ' : Service : ' service.')
@ -408,50 +410,129 @@ Service GetWaferMap(WMOKey)
end service end service
Service SetVoidFlag(WMOutKey, Username) Service SetVoidFlag(WMOutKey, Username)
ErrorMessage = '' ErrorMessage = ''
If RowExists('WM_OUT', WMOutKey) then If RowExists('WM_OUT', WMOutKey) then
WMOutRec = Database_Services('ReadDataRow', 'WM_OUT', WMOutKey, True$, 0, False$) WMOutRec = Database_Services('ReadDataRow', 'WM_OUT', WMOutKey, True$, 0, False$)
If Error_Services('NoError') then If Error_Services('NoError') then
WMOutRec<WM_OUT_VOID$> = True$ WMOutRec<WM_OUT_VOID$> = True$
Database_Services('WriteDataRow', 'WM_OUT', WMOutKey, WMOutRec, True$, False, False$) Database_Services('WriteDataRow', 'WM_OUT', WMOutKey, WMOutRec, True$, False, False$)
If Error_Services('NoError') then If Error_Services('NoError') then
Set_Status(0) Set_Status(0)
WONo = Field(WMOutKey, '*', 1) WONo = Field(WMOutKey, '*', 1)
CassNo = Field(WMOutKey, '*', 3) CassNo = Field(WMOutKey, '*', 3)
WOMLParms = '' WOMLParms = ''
LogFile = 'WO_MAT' ; WOMLParms = LogFile:@RM LogFile = 'WO_MAT' ; WOMLParms = LogFile:@RM
LogDTM = OConv(Datetime(), 'DT') ; WOMLParms := LogDTM:@RM LogDTM = OConv(Datetime(), 'DT') ; WOMLParms := LogDTM:@RM
Action = 'WM_OUT_VOID' ; WOMLParms := Action:@RM Action = 'WM_OUT_VOID' ; WOMLParms := Action:@RM
WhCd = 'CR' ; WOMLParms := WhCd:@RM WhCd = 'CR' ; WOMLParms := WhCd:@RM
LocCd = 'VOID' ; WOMLParms := LocCd:@RM LocCd = 'VOID' ; WOMLParms := LocCd:@RM
WONos = WONo ; WOMLParms := WONos:@RM WONos = WONo ; WOMLParms := WONos:@RM
CassNos = CassNo ; WOMLParms := CassNos:@RM CassNos = CassNo ; WOMLParms := CassNos:@RM
UserID = Username ; WOMLParms := UserID:@RM UserID = Username ; WOMLParms := UserID:@RM
Tags = '' ; WOMLParms := Tags:@RM Tags = '' ; WOMLParms := Tags:@RM
ToolID = '' ; WOMLParms := ToolID:@RM ToolID = '' ; WOMLParms := ToolID:@RM
WOMLParms := '' WOMLParms := ''
obj_WO_Mat_Log('Create',WOMLParms) obj_WO_Mat_Log('Create',WOMLParms)
IF Get_Status(errCode) THEN IF Get_Status(errCode) THEN
ErrorMessage = 'Error writing inventory transactions' ErrorMessage = 'Error writing inventory transactions'
end end
end else end else
ErrorMessage = 'Failed to write to the WM_OUT record ' : WMOutKey : ' while attempting to set void status.' ErrorMessage = 'Failed to write to the WM_OUT record ' : WMOutKey : ' while attempting to set void status.'
end end
end else end else
ErrorMessage = 'Failed to read WM_OUT record ' : WMOutKey : ' while attempting to set void status.' ErrorMessage = 'Failed to read WM_OUT record ' : WMOutKey : ' while attempting to set void status.'
end end
end else end else
ErrorMessage = 'Invalid WM_OUT Key ' : WMOutKey : ' passed to SetVoidFlag routine.' ErrorMessage = 'Invalid WM_OUT Key ' : WMOutKey : ' passed to SetVoidFlag routine.'
end end
If ErrorMessage NE '' then If ErrorMessage NE '' then
Error_Services('Add', ErrorMessage) Error_Services('Add', ErrorMessage)
end end
end service end service
Service VerifyWoStepWMOKeyIndex(WMOKey) 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' LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WM_OUT'
LogDate = Oconv(Date(), 'D4/') LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS') LogTime = Oconv(Time(), 'MTS')
@ -468,39 +549,61 @@ Service VerifyWoStepWMOKeyIndex(WMOKey)
ErrorMsg = '' ErrorMsg = ''
If WMOKey NE '' then If WMOKey NE '' then
If RowExists('WM_OUT', WMOKey) then
WOStepKey = Field(WMOKey, '*', 1, 2) WOStepKey = Field(WMOKey, '*', 1, 2)
If WOStepKey NE '' then If WOStepKey NE '' then
WOStepWMOKeys = Xlate('WO_STEP', WOStepKey, 'WM_OUT_KEYS', 'X') WOStepWMOKeys = Xlate('WO_STEP', WOStepKey, 'WM_OUT_KEYS', 'X')
LogData<3> = WOStepKey LogData<3> = WOStepKey
Logging_Services('AppendLog', objVerifyWMOKeyLog, LogData, @RM, @FM) 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.' LogData<4> = 'WMOKey missing from WO_STEP record. Generating index transaction.'
Logging_Services('AppendLog', objVerifyWMOKeyLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyWMOKeyLog, LogData, @RM, @FM)
// Add index transaction to update WM_OUT_KEYS relational index (target WO_STEP table) // 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 If RowExists('WM_OUT', WMOKey) then
Lock BangTable, 0 then IndexTransactionRow = 'WO_STEP*WM_OUT_KEYS*AR':@FM:WMOKey:@FM:"":@FM:WOStepKey:@FM
Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM end else
PendingTrans := IndexTransactionRow IndexTransactionRow = 'WO_STEP*WM_OUT_KEYS*AR':@FM:WMOKey:@FM:WOStepKey:@FM:"":@FM
Write PendingTrans on BangTable, 0 then end
LogData<4> = 'Index transaction successfully added.' Done = False$
Logging_Services('AppendLog', objVerifyWMOKeyLog, LogData, @RM, @FM) For AttemptNo = 1 to NUM_ATTEMPTS$
end else 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 ErrorMsg = 'Unable to write index transaction to !WM_OUT. ':WMOKey
end end
Unlock BangTable, 0 else ErrorMsg = 'Unable to Open !WM_OUT to add index transaction. ':WMOKey end
end else 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 ErrorMsg = 'Unable to Lock !WM_OUT to add index transaction. ':WMOKey
end end
end else end
end else
If AttemptNo GE NUM_ATTEMPTS$ then
ErrorMsg = 'Unable to Open !WM_OUT to add index transaction. ':WMOKey ErrorMsg = 'Unable to Open !WM_OUT to add index transaction. ':WMOKey
end end
end end
end else Until Done or ErrorMsg
LogData<4> = 'WO_STEP key for WM_OUT ':WMOKey:' is null. Nothing to update.' Next AttemptNo
Logging_Services('AppendLog', objVerifyWMOKeyLog, LogData, @RM, @FM) 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
end else
LogData<4> = 'WO_STEP key for WM_OUT ':WMOKey:' is null. Nothing to update.'
Logging_Services('AppendLog', objVerifyWMOKeyLog, LogData, @RM, @FM)
end end
end 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' 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' Headers = 'Logging DTM':@FM:'WMOKey':@FM:'WOStep':@FM:'Result'
objVerifyWMOWoIndexLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, COMMA$, Headers, '', False$, False$) objVerifyWMOWoIndexLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, COMMA$, Headers, '', False$, False$)
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
LogData = '' LogData = ''
LogData<1> = LoggingDtm LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<2> = WMOKey LogData<2> = WMOKey
LogData<4> = 'Begin ':Service LogData<4> = 'Begin ':Service
Logging_Services('AppendLog', objVerifyWMOWoIndexLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyWMOWoIndexLog, LogData, @RM, @FM)
@ -540,6 +642,7 @@ Service VerifyWOLogWMOKeyIndex(WMOKey)
If WONo NE '' then If WONo NE '' then
WOLogRDSKeys = '' WOLogRDSKeys = ''
Extract_Si_Keys('WM_OUT', 'WO_NO', WONo, WOLogRDSKeys) Extract_Si_Keys('WM_OUT', 'WO_NO', WONo, WOLogRDSKeys)
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<3> = WONo LogData<3> = WONo
Logging_Services('AppendLog', objVerifyWMOWoIndexLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyWMOWoIndexLog, LogData, @RM, @FM)
Locate WMOKey in WOLogRDSKeys using @VM setting vPos else 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 // Add index transaction to update WO_NO btree index
IndexTransactionRow = 'WO_NO':@FM:WMOKey:@FM:"":@FM:WONo:@FM IndexTransactionRow = 'WO_NO':@FM:WMOKey:@FM:"":@FM:WONo:@FM
Open "!WM_OUT" to BangTable then Open "!WM_OUT" to BangTable then
Lock BangTable, 0 then Done = False$
Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM For AttemptNo = 1 to NUM_ATTEMPTS$
PendingTrans := IndexTransactionRow If AttemptNo GT 1 then Delay(1)
Write PendingTrans on BangTable, 0 then Lock BangTable, 0 then
LogData<4> = 'Index transaction successfully added.' Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM
Logging_Services('AppendLog', objVerifyWMOWoIndexLog, LogData, @RM, @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 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 end
Unlock BangTable, 0 else ErrorMsg = 'Error in ':Service:' service. Unable to Open !WM_OUT to add index transaction. ':WMOKey Until Done or ErrorMsg
end else Next AttemptNo
ErrorMsg = 'Error in ':Service:' service. Unable to Lock !WM_OUT to add index transaction. ':WMOKey
end
end else end else
ErrorMsg = 'Error in ':Service:' service. Unable to Open !WM_OUT to add index transaction. ':WMOKey ErrorMsg = 'Error in ':Service:' service. Unable to Open !WM_OUT to add index transaction. ':WMOKey
end end
end end
end else end else
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<4> = 'WONo for WM_OUT ':WMOKey:' is null. Nothing to update.' LogData<4> = 'WONo for WM_OUT ':WMOKey:' is null. Nothing to update.'
Logging_Services('AppendLog', objVerifyWMOWoIndexLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyWMOWoIndexLog, LogData, @RM, @FM)
end end
@ -575,10 +688,12 @@ Service VerifyWOLogWMOKeyIndex(WMOKey)
end end
If ErrorMsg NE '' then If ErrorMsg NE '' then
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<4> = ErrorMsg LogData<4> = ErrorMsg
Logging_Services('AppendLog', objVerifyWMOWoIndexLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyWMOWoIndexLog, LogData, @RM, @FM)
end end
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<4> = 'End ':Service LogData<4> = 'End ':Service
Logging_Services('AppendLog', objVerifyWMOWoIndexLog, LogData, @RM, @FM) 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' 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' Headers = 'Logging DTM':@FM:'WMOKey':@FM:'WOMatKey':@FM:'Result'
objVerifyWOMatWmoKeyLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, COMMA$, Headers, '', False$, False$) objVerifyWOMatWmoKeyLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, COMMA$, Headers, '', False$, False$)
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
LogData = '' LogData = ''
LogData<1> = LoggingDtm LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<2> = WMOKey LogData<2> = WMOKey
LogData<4> = 'Begin ':Service LogData<4> = 'Begin ':Service
Logging_Services('AppendLog', objVerifyWOMatWmoKeyLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyWOMatWmoKeyLog, LogData, @RM, @FM)
@ -609,32 +723,44 @@ Service VerifyWOMatWMOKeyIndex(WMOKey)
WOMatKey = Field(WMOKey, '*', 1, 1):'*':Field(WMOKey, '*', 3, 1) WOMatKey = Field(WMOKey, '*', 1, 1):'*':Field(WMOKey, '*', 3, 1)
If WOMatKey NE '' then If WOMatKey NE '' then
WOMatWMOKey = Xlate('WO_MAT', WOMatKey, 'WMO_KEY', 'X') 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) Logging_Services('AppendLog', objVerifyWOMatWmoKeyLog, LogData, @RM, @FM)
If WOMatWMOKey EQ '' then If WOMatWMOKey EQ '' then
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<4> = 'WMOKey missing from WO_MAT record. Generating index transaction.' LogData<4> = 'WMOKey missing from WO_MAT record. Generating index transaction.'
Logging_Services('AppendLog', objVerifyWOMatWmoKeyLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyWOMatWmoKeyLog, LogData, @RM, @FM)
// Add index transaction to update WMO_KEY relational index (target WO_MAT table) // 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 IndexTransactionRow = 'WO_MAT*WMO_KEY*TOP':@FM:WMOKey:@FM:"":@FM:WOMatKey:@FM
Open "!WM_OUT" to BangTable then Open "!WM_OUT" to BangTable then
Lock BangTable, 0 then Done = False$
Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM For AttemptNo = 1 to NUM_ATTEMPTS$
PendingTrans := IndexTransactionRow If AttemptNo GT 1 then Delay(1)
Write PendingTrans on BangTable, 0 then Lock BangTable, 0 then
LogData<4> = 'Index transaction successfully added.' Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM
Logging_Services('AppendLog', objVerifyWOMatWmoKeyLog, LogData, @RM, @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 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 end
Unlock BangTable, 0 else ErrorMsg = 'Unable to Open !WM_OUT to add index transaction. ':WMOKey Until Done or ErrorMsg
end else Next AttemptNo
ErrorMsg = 'Unable to Lock !WM_OUT to add index transaction. ':WMOKey
end
end else end else
ErrorMsg = 'Unable to Open !WM_OUT to add index transaction. ':WMOKey ErrorMsg = 'Unable to Open !WM_OUT to add index transaction. ':WMOKey
end end
end end
end else end else
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<4> = 'WO_MAT key for WM_OUT ':WMOKey:' is null. Nothing to update.' LogData<4> = 'WO_MAT key for WM_OUT ':WMOKey:' is null. Nothing to update.'
Logging_Services('AppendLog', objVerifyWOMatWmoKeyLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyWOMatWmoKeyLog, LogData, @RM, @FM)
end end
@ -642,10 +768,12 @@ Service VerifyWOMatWMOKeyIndex(WMOKey)
end end
If ErrorMsg NE '' then If ErrorMsg NE '' then
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<4> = ErrorMsg LogData<4> = ErrorMsg
Logging_Services('AppendLog', objVerifyWOMatWmoKeyLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyWOMatWmoKeyLog, LogData, @RM, @FM)
end end
LogData<1> = OConv(Datetime(), 'DT/^S')
LogData<4> = 'End ':Service LogData<4> = 'End ':Service
Logging_Services('AppendLog', objVerifyWOMatWmoKeyLog, LogData, @RM, @FM) Logging_Services('AppendLog', objVerifyWOMatWmoKeyLog, LogData, @RM, @FM)
@ -653,6 +781,7 @@ Service VerifyWOMatWMOKeyIndex(WMOKey)
end service end service
Service GetWMOutKeys(WOLogId) Service GetWMOutKeys(WOLogId)
ErrorMsg = '' ErrorMsg = ''
@ -949,3 +1078,5 @@ Service GetWmOutZpl(WmOutKey)
end service end service

File diff suppressed because it is too large Load Diff

View File

@ -215,15 +215,20 @@ FORM_CREATE:
END END
DailySchedName = 'WO_DAILY_SCHED':I DailySchedName = 'WO_DAILY_SCHED':I
DSR = XLATE( 'CONFIG', DailySchedName, '', 'X' ) DSR = XLATE( 'CONFIG', DailySchedName, '', 'X' )
WOCust = DSR<WOCust$> WOCust = DSR<WOCust$>
WO = FIELD( WOCust, ' ', 1 ) WO = FIELD( WOCust, ' ', 1 )
Cust = FIELD( WOCust, ' ', 2, 999 ) Cust = FIELD( WOCust, ' ', 2, 999 )
Size = Xlate('REACTOR', I, REACTOR_SUSC_POCKET_SIZE$, 'X') Size = Xlate('REACTOR', I, REACTOR_SUSC_POCKET_SIZE$, 'X')
Size = Field(Size, ' ' , 3, 2) Begin Case
Case Index(Size, '6', 1)
CONVERT ' ' TO '' IN Size Size = '6in'
Case Index(Size, '8', 1)
Size = '8in'
Case Otherwise$
Size = ''
End Case
WONo = WO[1,'.'] WONo = WO[1,'.']
@ -325,4 +330,3 @@ REACT_DETAIL:
return return
*===============================================================================================* *===============================================================================================*

View File

@ -42,14 +42,15 @@ Function WO_LOG_Actions(Action, CalcColName, FSList, Handle, Name, FMC, Record,
***********************************************************************************************************************/ ***********************************************************************************************************************/
#pragma precomp SRP_PreCompiler #pragma precomp SRP_PreCompiler
$insert APP_INSERTS $Insert APP_INSERTS
$insert FILE.SYSTEM.EQUATES $Insert FILE.SYSTEM.EQUATES
$insert ACTION_SETUP $Insert ACTION_SETUP
$insert WO_MAT_EQUATES $Insert WO_MAT_EQUATES
$insert WO_LOG_EQUATES $Insert WO_LOG_EQUATES
$insert WO_STEP_EQUATES $Insert WO_STEP_EQUATES
$insert RLIST_EQUATES $Insert RLIST_EQUATES
$insert SCHED_DET_NG_EQUATES $Insert SCHED_DET_NG_EQUATES
$Insert IFX_EQUATES
Equ Comma$ to ',' 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 function GaN_Services, obj_WO_Log, SRP_Date
Declare subroutine Error_Services, Database_Services, Environment_Services, Logging_Services, Obj_SAP 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 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' LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WO_LOG'
LogDate = Oconv(Date(), 'D4/') LogDate = Oconv(Date(), 'D4/')
@ -205,12 +206,12 @@ WRITE_RECORD_PRE:
OrigQty = OrigRecord<WO_LOG_QTY$> OrigQty = OrigRecord<WO_LOG_QTY$>
NewQty = Record<WO_LOG_QTY$> NewQty = Record<WO_LOG_QTY$>
ModifyQty = NewQty - OrigQty
OrigCassList = OrigRecord<WO_LOG_WO_MAT_KEY$> OrigCassList = OrigRecord<WO_LOG_WO_MAT_KEY$>
NewCassList = Record<WO_LOG_WO_MAT_KEY$> NewCassList = Record<WO_LOG_WO_MAT_KEY$>
If ( (OrigQty NE NewQty) or (OrigCassList NE NewCassList) ) then If ( (OrigQty NE NewQty) or (OrigCassList NE NewCassList) ) then
// Update released, unreleased, and received quantities // Update unreleased, open (i.e., not received) quantities
RelQty = obj_WO_Log('RelQty', Name:@RM:Record) RelQty = OrigRecord<WO_LOG_REL_QTY_STATIC$>
Record<WO_LOG_REL_QTY_STATIC$> = RelQty
If RelQty GT NewQty then If RelQty GT NewQty then
UnRelQty = 0 UnRelQty = 0
end else end else
@ -218,9 +219,14 @@ WRITE_RECORD_PRE:
end end
Record<WO_LOG_UNREL_QTY_STATIC$> = UnRelQty Record<WO_LOG_UNREL_QTY_STATIC$> = UnRelQty
RXQty = obj_WO_Log('RxQty', Name:@RM:Record) RxQty = OrigRecord<WO_LOG_RX_QTY_STATIC$>
Record<WO_LOG_RX_QTY_STATIC$> = RXQty If RxQty GT NewQty then
SaveRecord = Record OpenQty = 0
end else
OpenQty = NewQty - RxQty
end
Record<WO_LOG_OPEN_QTY_STATIC$> = OpenQty
SaveRecord = Record
end end
// Check if we need to auto-close the work order // Check if we need to auto-close the work order
@ -278,202 +284,7 @@ WRITE_RECORD:
NewQty = Record<WO_LOG_QTY$> NewQty = Record<WO_LOG_QTY$>
ModifyQty = NewQty - OrigQty ModifyQty = NewQty - OrigQty
WONo = Name WONo = Name
SchedDetNGKey = '' If ModifyQty NE 0 then Service_Services('PostProcedure', 'SCHEDULE_SERVICES', 'AdjustWorkOrderScheduleQty':SD$:WONo:SD$:ModifyQty)
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
return return

View File

@ -44,16 +44,17 @@ Function WO_MAT_Actions(Action, CalcColName, FSList, Handle, Name, FMC, Record,
***********************************************************************************************************************/ ***********************************************************************************************************************/
$insert APP_INSERTS $Insert APP_INSERTS
$insert FILE.SYSTEM.EQUATES $Insert FILE.SYSTEM.EQUATES
$insert DICT_EQUATES $Insert DICT_EQUATES
$insert ACTION_SETUP $Insert ACTION_SETUP
$insert WO_MAT_EQUATES $Insert WO_MAT_EQUATES
$insert WO_LOG_EQUATES $Insert WO_LOG_EQUATES
$insert WO_STEP_EQUATES $Insert WO_STEP_EQUATES
$insert MAKEUP_WAFERS_EQUATES $Insert MAKEUP_WAFERS_EQUATES
$insert RLIST_EQUATES $Insert WM_OUT_EQUATES
$insert IFX_EQUATES $Insert RLIST_EQUATES
$Insert IFX_EQUATES
Equ Comma$ to ',' Equ Comma$ to ','
@ -269,45 +270,45 @@ return
WRITE_RECORD_PRE: WRITE_RECORD_PRE:
WOMatKeyID = Name WOMatKeyID = Name
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$
CriticalFields = WO_MAT_RDS_NO$:@VM:WO_MAT_LOT_NO$:@VM:WO_MAT_WAFER_QTY$:@VM:WO_MAT_CUST_PART_NO$:@VM For each CriticalField in CriticalFields using @VM setting vPos
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
If ( (OrigRecord<CriticalField> NE '') and (Record<CriticalField> EQ '') ) then Recipients = ''
WOMatFieldNos = Xlate('DICT.WO_MAT', '%FIELDS%', DICT_PART$, 'X') SentFrom = 'SYSTEM'
WOMatFieldNames = Xlate('DICT.WO_MAT', '%FIELDS%', DICT_DISPLAY$, 'X') Subject = 'WO_MAT_ACTIONS - Critical Field Erased'
Locate CriticalField in WOMatFieldNos using @VM setting FieldNo then Message = OConv(Datetime(), 'DT2/^H')
CriticalFieldName = WOMatFieldNames<0, FieldNo> Message<2> = 'Computer: ':@Station
end else Message<3> = 'User: ':@User4
CriticalFieldName = 'Error determining field name' Message<4> = 'WO_MAT key: ':Name
end 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
Recipients = '' Next CriticalField
SentFrom = 'SYSTEM' end
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
WaferQty = Record<WO_MAT_WAFER_QTY$> WaferQty = Record<WO_MAT_WAFER_QTY$>
If ( (WaferQty LT 0) or (WaferQty GT 25) ) then If ( (WaferQty LT 0) or (WaferQty GT 25) ) then
@ -610,13 +611,17 @@ WRITE_RECORD:
CassNo = Field(Name, '*', 2) CassNo = Field(Name, '*', 2)
WOMatKeyID = Name WOMatKeyID = Name
OrigWfrQty = OrigRecord<WO_MAT_WAFER_QTY$> OrigWfrQty = OrigRecord<WO_MAT_WAFER_QTY$>
NewWfrQty = Record<WO_MAT_WAFER_QTY$> NewWfrQty = Record<WO_MAT_WAFER_QTY$>
OrigRelDtm = OrigRecord<WO_MAT_REL_DTM$> OrigRelDtm = OrigRecord<WO_MAT_REL_DTM$>
NewRelDtm = Record<WO_MAT_REL_DTM$> NewRelDtm = Record<WO_MAT_REL_DTM$>
OrigRecDtm = OrigRecord<WO_MAT_RX_DTM$> OrigRecDtm = OrigRecord<WO_MAT_RX_DTM$>
NewRecDtm = Record<WO_MAT_RX_DTM$> NewRecDtm = Record<WO_MAT_RX_DTM$>
AdjustQty = NewWfrQty - OrigWfrQty 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 If ( (OrigWfrQty NE '' ) and (OrigWfrQty NE NewWfrQty) and (OrigRecDtm NE '' and NewRecDtm NE '') ) then
// Cassette already received, but casssette quantity has changed. // Cassette already received, but casssette quantity has changed.
@ -624,7 +629,7 @@ WRITE_RECORD:
end end
If ( (OrigRecDtm EQ '') and (NewRecDtm NE '') ) then If ( (OrigRecDtm EQ '') and (NewRecDtm NE '') ) then
// Cassette was just received. Increment received quantity of work order by the entire cassette wafer count. // 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 end
If ( (OrigWfrQty NE '') and (OrigWfrQty NE NewWfrQty) and ( (OrigRelDtm NE '') and (NewRelDtm NE '') ) ) then If ( (OrigWfrQty NE '') and (OrigWfrQty NE NewWfrQty) and ( (OrigRelDtm NE '') and (NewRelDtm NE '') ) ) then
@ -633,7 +638,47 @@ WRITE_RECORD:
end end
If ( (OrigRelDtm EQ '') and (NewRelDtm NE '') ) then If ( (OrigRelDtm EQ '') and (NewRelDtm NE '') ) then
// Cassette was just released. Increment released quantity of work order by the entire cassette wafer count. // 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 end
If {REACTOR_TYPE} NE 'EPP' then If {REACTOR_TYPE} NE 'EPP' then
@ -878,7 +923,7 @@ WRITE_RECORD:
CurrWaferCount = obj_WO_Mat('CurrWaferCnt', WOMatKeyID) CurrWaferCount = obj_WO_Mat('CurrWaferCnt', WOMatKeyID)
If CurrWaferCount EQ 0 then If CurrWaferCount EQ 0 then
// This should catch cases where the entire cassette is "peeled off", NCR'ed, or used for destructive testing. // 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 end
return return
@ -889,6 +934,35 @@ return
DELETE_RECORD: 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 return

View File

@ -57,6 +57,8 @@ $Insert PRS_LAYER_EQUATES
$Insert PRS_STAGE_EQUATES $Insert PRS_STAGE_EQUATES
$Insert PROD_VER_EQUATES $Insert PROD_VER_EQUATES
$Insert QA_MET_EQUATES ;* Used in GetQAMet data structure return variable $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 function Database_Services, SRP_JSON, Error_Services, obj_Prod_Spec, Wo_Mat_Qa_Services
Declare subroutine Database_Services, SRP_JSON, Error_Services Declare subroutine Database_Services, SRP_JSON, Error_Services
@ -196,126 +198,164 @@ Service UpdateQAMet(WOMatKey)
WOMatQARec = '' WOMatQARec = ''
ErrorMsg = '' ErrorMsg = ''
If (WOMatKey NE '') then If (WOMatKey NE '') then
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$>
WONo = Field(WOMatKey, '*', 1) FOR WOStepNo = 1 TO StepCnt
CassNo = Field(WOMatKey, '*', 2) 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)
* * * * * * * * Build QA_MET profile - Work Order scheduled only * * * * * * * * If (ReactNo NE '') then
WOStepKeys = XLATE('WO_LOG', WONo, WO_LOG_WO_STEP_KEY$, 'X') WOReactKey = WONo:'*':WOStepNo:'*':ReactNo
end else
WOReactKey = ''
end
StepCnt = DCount(WOStepKeys,@VM) 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
EpiProPSNo = '' If (ErrorMsg EQ '') then
EpiProPSRec = '' 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$
MetLine = 1 If ( (Interval NE '') and (Start NE '') ) then
// Add Work Order scheduled tests (i.e., not reactor scheduled tests)
// Get original WO_MAT_QA record to copy any test results If Not(ReactSched) then
OrigWOMatQARec = Database_Services('ReadDataRow', 'WO_MAT_QA', WOMatKey) If Interval = Start then
OrigQAStages = OrigWOMatQARec<WO_MAT_QA_STAGE$> If ( Rem(CassNo, Interval) EQ 0 ) then TestFlag = True$
OrigQAProfiles = OrigWOMatQARec<WO_MAT_QA_PROFILE$> end else
OrigQASlots = OrigWOMatQARec<WO_MAT_QA_SLOT$> If ( Abs( (Start + Int(CassNo / Interval)*Interval) - CassNo ) EQ 0) then TestFlag = True$
OrigQASlotTests = OrigWOMatQARec<WO_MAT_QA_SLOT_TEST$> end
OrigQAResults = OrigWOMatQARec<WO_MAT_QA_RESULT$> end else
OrigQASigs = OrigWOMatQARec<WO_MAT_QA_SIG$> Locate RDSNo in WOReactRDSNos using @VM setting TestSeq then
OrigQASigDtms = OrigWOMatQARec<WO_MAT_QA_SIG_DTM$> If ( Rem( (TestSeq - Start), Interval) EQ 0 ) then TestFlag = True$
OrigQAStdResults = OrigWOMatQARec<WO_MAT_QA_STD_RESULT$> end
OrigQADataPoints = OrigWOMatQARec<WO_MAT_QA_DATA_POINTS$> end
OrigQAMinResults = OrigWOMatQARec<WO_MAT_QA_MIN_RESULT$> If TestFlag then
OrigQAMaxResults = OrigWOMatQARec<WO_MAT_QA_MAX_RESULT$> WOMatQARec<WO_MAT_QA_PROFILE$,MetLine> = WOStepNo:MetTest
OrigQARangeResults = OrigWOMatQARec<WO_MAT_QA_RANGE_PCT_RESULT$> WOMatQARec<WO_MAT_QA_PROP$,MetLine> = QAMetData<COL$QA_MET_PROP,StageNo>
OrigQAEdgeResults = OrigWOMatQARec<WO_MAT_QA_EDGE_MEAN_RESULT$> WOMatQARec<WO_MAT_QA_TOOL_CLASS$,MetLine> = QAMetData<COL$QA_MET_TOOL_CLASS,StageNo>
OrigQA5mmResults = OrigWOMatQARec<WO_MAT_QA_5MM_PCT_RESULT$> WOMatQARec<WO_MAT_QA_STAGE$,MetLine> = Stage
OrigQAOutOfSpecs = OrigWOMatQARec<WO_MAT_QA_OUT_OF_SPEC$> WOMatQARec<WO_MAT_QA_MIN$,MetLine> = QAMetData<COL$QA_MET_MIN,StageNo>
OrigQAFailReasons = OrigWOMatQARec<WO_MAT_QA_FAIL_REASON$> WOMatQARec<WO_MAT_QA_MAX$,MetLine> = QAMetData<COL$QA_MET_MAX,StageNo>
WOMatQARec<WO_MAT_QA_SLOT$,MetLine> = QAMetData<COL$QA_MET_SLOT,StageNo>
* WO_MAT record is used to check for pre-existing signatures jch 6/7/2015 WOMatQARec<WO_MAT_QA_RECIPE$,MetLine> = QAMetData<COL$QA_MET_RECIPE,StageNo>
WOMatRec = Database_Services('ReadDataRow', 'WO_MAT', WOMatKey) 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>
FOR WOStepNo = 1 TO StepCnt WOMatQARec<WO_MAT_QA_WFR_TYPE$,MetLine> = QAMetData<COL$QA_MET_WFR_TYPE,StageNo>
PSNo = XLATE('WO_STEP', WOStepKeys<1,WOStepNo>, WO_STEP_PROD_SPEC_ID$, 'X') WOMatQARec<WO_MAT_QA_REACT_SCHED$,MetLine> = ReactSched
PSRec = Database_Services('ReadDataRow', 'PROD_SPEC', PSNo) WOMatQARec<WO_MAT_QA_SHIP_DOC$,MetLine> = QAMetData<COL$QA_MET_SHIP_DOC,StageNo>
QAMetData = obj_Prod_Spec('GetQAMet',PSNo:@RM:PSRec) WOMatQARec<WO_MAT_QA_PHASE_MIN$,MetLine> = QAMetData<COL$QA_MET_PHASE_MIN,StageNo>
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)
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 end else
ErrorMsg = 'Error in ':Service:' service. Null WOMatKey passed in.' ErrorMsg = 'Error in ':Service:' service. Null WOMatKey passed in.'
end end
If ErrorMsg NE '' then If (ErrorMsg NE '') then
Error_Services('Add', ErrorMsg) Error_Services('Add', ErrorMsg)
end else end else
Response = WOMatQARec Response = WOMatQARec
@ -521,4 +561,3 @@ Service GetMUWaferQAComplete(WOMatKey)
end service end service

View File

@ -1,19 +1,24 @@
compile insert ARCHIVE_EQUATES compile insert ARCHIVE_EQUATES
/*---------------------------------------- /*----------------------------------------
Author : Table Create Insert Routine Author : Table Create Insert Routine
Written : 28/08/2025 Written : 15/10/2025
Description : Insert for Table ARCHIVE Description : Insert for Table ARCHIVE
----------------------------------------*/ ----------------------------------------*/
#ifndef __ARCHIVE_EQUATES__ #ifndef __ARCHIVE_EQUATES__
#define __ARCHIVE_EQUATES__ #define __ARCHIVE_EQUATES__
equ ARCHIVE_ARCHIVE_DTM$ to 1 equ ARCHIVE_ARCHIVE_CREATION_DTM$ to 1
equ ARCHIVE_COMPLETE$ to 2 equ ARCHIVE_ARCHIVE_PATH$ to 2
equ ARCHIVE_CHILD_RECORD$ to 3 equ ARCHIVE_COMPLETE$ to 3
equ ARCHIVE_CHILD_TABLE$ to 4 equ ARCHIVE_ARCHIVE_COMPLETION_DTM$ to 4
equ ARCHIVE_CHILD_RECORD_ARCHIVED$ to 5 equ ARCHIVE_CHILD_RECORD$ to 5
equ ARCHIVE_CHILD_RECORD_DELETED$ to 6 equ ARCHIVE_CHILD_TABLE$ to 6
equ ARCHIVE_CHILD_RECORD_ARCHIVE_DTM$ to 7 equ ARCHIVE_CHILD_RECORD_ARCHIVED$ to 7
equ ARCHIVE_CHILD_RECORD_DELETE_DTM$ to 8 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 #endif

View 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

View 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

View 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

View 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

View File

@ -18,12 +18,12 @@ compile insert MATERIAL_REPORT_EQUATES
equ MATERIAL_REPORT.WO_UNREL_QTY$ to 9 equ MATERIAL_REPORT.WO_UNREL_QTY$ to 9
equ MATERIAL_REPORT.KIT_LOCATION$ to 10 equ MATERIAL_REPORT.KIT_LOCATION$ to 10
equ MATERIAL_REPORT.KIT_QTY$ to 11 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_RO$ to 13
equ MATERIAL_REPORT.KIT_DEMAND$ to 14 equ MATERIAL_REPORT.KIT_DEMAND$ to 14
equ MATERIAL_REPORT.PTI_RO$ to 15 equ MATERIAL_REPORT.PTI_RO$ to 15
equ MATERIAL_REPORT.LOAD_RO$ to 16 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 equ MATERIAL_REPORT.START_DTM$ to 18
#endif #endif

View File

@ -25,3 +25,4 @@ Equ Server.Port$ to 25000
Equ Server.KeepAlive$ to 60000 Equ Server.KeepAlive$ to 60000
Equ MessageProcessor$ to 'NDW_MESSAGING_PROCESSOR' Equ MessageProcessor$ to 'NDW_MESSAGING_PROCESSOR'

View File

@ -154,3 +154,7 @@ Equ RDS_TEST_TEST_RUN_HGCV_DTM$ To 146
Equ RDS_TEST_MODIFY_OVERRIDE$ To 147 Equ RDS_TEST_MODIFY_OVERRIDE$ To 147
Equ RDS_TEST_OVERRIDE_USERNAME$ To 148 Equ RDS_TEST_OVERRIDE_USERNAME$ To 148
Equ RDS_TEST_OVERRIDE_DTM$ To 149 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

View 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
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////