Compare commits

1 Commits

Author SHA1 Message Date
aaf415e62c Common IndexOf on six methods 2025-09-30 09:10:29 -07:00
65 changed files with 13051 additions and 10337 deletions

View File

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

1515
LSL2/OIWIN/DIALOG_SCHED.json Normal file

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

@ -9,7 +9,7 @@
"<2>": "-2", "<2>": "-2",
"<3>": "-1", "<3>": "-1",
"<4>": "-1", "<4>": "-1",
"<5>": "-2", "<5>": "16777215",
"<6>": { "<6>": {
"<6,1>": { "<6,1>": {
"<6,1,1>": "Tahoma", "<6,1,1>": "Tahoma",
@ -43,8 +43,7 @@
"<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>": {
@ -81,17 +80,7 @@
"<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

@ -1,240 +0,0 @@
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

View File

@ -1,238 +0,0 @@
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):' AND WITH EQ_LOC NE "Out of Service" BY NEXT_CAL_DT' SelectSent = 'SELECT CALIB_LIST WITH NEXT_CAL_DT < ':QUOTE(CheckDt):' BY NEXT_CAL_DT'
RList(SelectSent,TARGET_ACTIVELIST$,'','','') RList(SelectSent,TARGET_ACTIVELIST$,'','','')
NoteText = '' NoteText = ''

View File

@ -695,15 +695,9 @@ PerformQuery:
end end
end end
If ErrorMsg EQ '' then If ErrorMsg EQ '' then
If WOKeys NE '' then WOKeys = SRP_Array('SortSimpleList', WOKeys, 'DescendingNumbers', @VM)
WOKeys = SRP_Array('SortSimpleList', WOKeys, 'DescendingNumbers', @VM) End_Dialog(@WINDOW,WOKeys)
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,7 +973,6 @@ 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
@ -1010,13 +1009,7 @@ 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.')
@ -1116,3 +1109,4 @@ end service
// Internal GoSubs // Internal GoSubs
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -1,133 +0,0 @@
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

@ -72,24 +72,24 @@ Options BOOLEAN = True$, False$
// Therefore, this will be removed before returning to the caller. // Therefore, this will be removed before returning to the caller.
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
Service GetServer() Service GetServer()
NumFields = DCount(@Station, '_') NumFields = DCount(@Station, '_')
Server = Field(@Station, '_', 1, NumFields - 1) Server = Field(@Station, '_', 1, NumFields - 1)
Response = Server Response = Server
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
@ -99,12 +99,12 @@ end service
// Returns the application's root path. If this is a server, the shared folder will be included. // Returns the application's root path. If this is a server, the shared folder will be included.
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
Service GetApplicationRootPath() Service GetApplicationRootPath()
RootIP = Environment_Services('GetApplicationRootIP') RootIP = Environment_Services('GetApplicationRootIP')
ApplicationRootPath = RootIP : '\Apps' ApplicationRootPath = RootIP : '\Apps'
Response = ApplicationRootPath Response = ApplicationRootPath
end service end service
@ -114,17 +114,17 @@ end service
// Returns the application's root IP. // Returns the application's root IP.
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
Service GetApplicationRootIP() 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'
@ -132,9 +132,9 @@ Service GetApplicationRootIP()
Case Machine EQ 'MESTST1010' ; ApplicationRootIP = '\\10.95.140.13' Case Machine EQ 'MESTST1010' ; ApplicationRootIP = '\\10.95.140.13'
Case Otherwise$ ; ApplicationRootIP = '\\10.95.140.14' Case Otherwise$ ; ApplicationRootIP = '\\10.95.140.14'
End Case End Case
Response = ApplicationRootIP Response = ApplicationRootIP
end service end service
@ -144,10 +144,10 @@ end service
// Returns the FTP root path. This is where the scripts and FTP transfer files will be located. // Returns the FTP root path. This is where the scripts and FTP transfer files will be located.
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
Service GetFTPRootPath() Service GetFTPRootPath()
Machine = Environment_Services('GetServer') Machine = Environment_Services('GetServer')
RootPath = Environment_Services('GetLocalRootPath') RootPath = Environment_Services('GetLocalRootPath')
Begin Case Begin Case
Case Machine EQ 'MESIRWAP001' ; FTPRootPath = RootPath Case Machine EQ 'MESIRWAP001' ; FTPRootPath = RootPath
Case Machine EQ 'MESSA005' ; FTPRootPath = RootPath : '\FTP' Case Machine EQ 'MESSA005' ; FTPRootPath = RootPath : '\FTP'
@ -156,9 +156,9 @@ Service GetFTPRootPath()
Case Machine EQ 'MESST6502' ; FTPRootPath = RootPath : '\FTP' Case Machine EQ 'MESST6502' ; FTPRootPath = RootPath : '\FTP'
Case Otherwise$ ; FTPRootPath = RootPath : '\FTP' Case Otherwise$ ; FTPRootPath = RootPath : '\FTP'
End Case End Case
Response = FTPRootPath Response = FTPRootPath
end service end service
@ -168,10 +168,10 @@ end service
// Returns the Reports root path. This is where various reports will be located. // Returns the Reports root path. This is where various reports will be located.
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
Service GetReportsRootPath() Service GetReportsRootPath()
RootPath = Environment_Services('GetLocalRootPath') RootPath = Environment_Services('GetLocalRootPath')
Response = RootPath : '\OIReports' Response = RootPath : '\OIReports'
end service end service
@ -181,10 +181,10 @@ end service
// Returns the user data root path. This is where various reports will be located. // Returns the user data root path. This is where various reports will be located.
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
Service GetUserDataRootPath() Service GetUserDataRootPath()
UserDataRootPath = '\\messdv002.na.infineon.com' UserDataRootPath = '\\messdv002.na.infineon.com'
Response = UserDataRootPath Response = UserDataRootPath
end service end service
@ -194,10 +194,10 @@ end service
// Returns the user data production path. This is where various reports will be located. // Returns the user data production path. This is where various reports will be located.
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
Service GetUserDataProductionPath() Service GetUserDataProductionPath()
ProductionPath = Environment_Services('GetUserDataRootPath') : '\IT' ProductionPath = Environment_Services('GetUserDataRootPath') : '\IT'
Response = ProductionPath Response = ProductionPath
end service end service
@ -207,17 +207,17 @@ end service
// Returns the SPC data path. // Returns the SPC data path.
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
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,17 +227,17 @@ end service
// Returns the SPC data path. // Returns the SPC data path.
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
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
@ -247,10 +247,10 @@ end service
// Returns the Metrology Viewer URL. // Returns the Metrology Viewer URL.
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
Service GetMetrologyViewerURL() Service GetMetrologyViewerURL()
ProductionPath = 'http://messa010ec.infineon.com/' ProductionPath = 'http://messa010ec.infineon.com/'
Response = ProductionPath Response = ProductionPath
end service end service
@ -260,10 +260,10 @@ end service
// Returns the wafer map production path. // Returns the wafer map production path.
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
Service GetWaferMapProductionPath() Service GetWaferMapProductionPath()
ProductionPath = '\\mesfs.infineon.com\EC_Metrology_Si\MetrologyAttachments\TencorRunData_' ProductionPath = '\\mesfs.infineon.com\EC_Metrology_Si\MetrologyAttachments\TencorRunData_'
Response = ProductionPath Response = ProductionPath
end service end service
@ -276,7 +276,7 @@ Service GetMetrologyProductionPath()
ProductionPath = 'messqlec1.infineon.com\PROD1,53959' ProductionPath = 'messqlec1.infineon.com\PROD1,53959'
Response = ProductionPath Response = ProductionPath
end service end service
@ -307,11 +307,11 @@ end service
// Returns the Control Plan production path. // Returns the Control Plan production path.
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
Service GetControlPlanProductionPath() Service GetControlPlanProductionPath()
ProductionPath = 'iqsdms1' ProductionPath = 'iqsdms1'
Response = ProductionPath Response = ProductionPath
end service end service
@ -321,11 +321,11 @@ end service
// Returns the Wafer Track data production path. // Returns the Wafer Track data production path.
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
Service GetWaferTrackProductionPath() Service GetWaferTrackProductionPath()
ProductionPath = 'IQSDMS1' ProductionPath = 'IQSDMS1'
Response = ProductionPath Response = ProductionPath
end service end service
@ -335,29 +335,29 @@ end service
// Returns the local root path. This is where the scripts and FTP transfer files will be located. // Returns the local root path. This is where the scripts and FTP transfer files will be located.
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
Service GetLocalRootPath() Service GetLocalRootPath()
Machine = Environment_Services('GetServer') Machine = Environment_Services('GetServer')
Begin Case Begin Case
Case Machine EQ 'MESIRWAP001' ; LocalRootPath = 'C:' Case Machine EQ 'MESIRWAP001' ; LocalRootPath = 'C:'
Case Machine EQ 'MESSA005' ; LocalRootPath = 'D:' Case Machine EQ 'MESSA005' ; LocalRootPath = 'D:'
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.
Case Machine EQ 'MESTST1007' ; LocalRootPath = 'C:' ; // This is a map to the user's actual C drive. Case Machine EQ 'MESTST1007' ; LocalRootPath = 'C:' ; // This is a map to the user's actual C drive.
Case Otherwise$ ; LocalRootPath = 'C:' Case Otherwise$ ; LocalRootPath = 'C:'
End Case End Case
Response = LocalRootPath Response = LocalRootPath
end service end service
@ -367,12 +367,12 @@ end service
// Returns the method that label programs should use for printing (i.e., OIPI or DirectPrint). // Returns the method that label programs should use for printing (i.e., OIPI or DirectPrint).
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
Service GetLabelPrintMethod() Service GetLabelPrintMethod()
LabelPrintMethod = Database_Services('ReadDataRow', 'APP_INFO', 'LABEL_PRINT_METHOD')<1> LabelPrintMethod = Database_Services('ReadDataRow', 'APP_INFO', 'LABEL_PRINT_METHOD')<1>
Locate LabelPrintMethod in 'OIPI,DirectPrint' using ',' setting cPos else LabelPrintMethod = 'OIPI' Locate LabelPrintMethod in 'OIPI,DirectPrint' using ',' setting cPos else LabelPrintMethod = 'OIPI'
Response = LabelPrintMethod Response = LabelPrintMethod
end service end service
@ -396,7 +396,7 @@ end service
// Returns printer server UNC path. // Returns printer server UNC path.
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
Service GetPrintServerPath() Service GetPrintServerPath()
ServerPath = '\\messp1002.na.infineon.com\' ServerPath = '\\messp1002.na.infineon.com\'
Response = ServerPath Response = ServerPath
@ -424,10 +424,10 @@ end service
// accessing the database. // accessing the database.
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
Service SetServerCanary() Service SetServerCanary()
hSysLists = Database_Services('GetTableHandle', 'SYSLISTS') hSysLists = Database_Services('GetTableHandle', 'SYSLISTS')
Lock hSysLists, ServiceKeyID then Lock hSysLists, ServiceKeyID then
DateTimeStamp = Oconv(Date(), 'D4/') : ' - ' : Oconv(Time(), 'MTHS') DateTimeStamp = Oconv(Date(), 'D4/') : ' - ' : Oconv(Time(), 'MTHS')
Database_Services('WriteDataRow', 'APP_INFO', 'CANARY', DateTimeStamp, True$, False$, True$) Database_Services('WriteDataRow', 'APP_INFO', 'CANARY', DateTimeStamp, True$, False$, True$)
If Error_Services('NoError') then If Error_Services('NoError') then
@ -443,7 +443,7 @@ Service SetServerCanary()
Message<7> = 'TEXT' Message<7> = 'TEXT'
Message<8> = 'Error in ' : Service : ' service. Message: ' : Error Message<8> = 'Error in ' : Service : ' service. Message: ' : Error
Message<9> = '' Message<9> = ''
Config = '' Config = ''
Config<1> = SendUsing_Port$ Config<1> = SendUsing_Port$
Config<3> = 25 Config<3> = 25
@ -454,10 +454,10 @@ Service SetServerCanary()
Config<8> = False$ Config<8> = False$
Result = SRP_Send_Mail(Message, Config) Result = SRP_Send_Mail(Message, Config)
end end
Unlock hSysLists, ServiceKeyID else Null Unlock hSysLists, ServiceKeyID else Null
end end
end service end service
@ -465,12 +465,12 @@ Service GetSAPPath()
Machine = Environment_Services('GetServer') Machine = Environment_Services('GetServer')
Environment = 'QA' Environment = 'QA'
Begin Case Begin Case
Case Machine EQ 'MESSA005' ; Environment = 'PRD' Case Machine EQ 'MESSA005' ; Environment = 'PRD'
Case Machine EQ 'MESSA01EC' ; Environment = 'PRD' Case Machine EQ 'MESSA01EC' ; Environment = 'PRD'
End Case End Case
Response = Environment Response = Environment
end service end service
@ -478,25 +478,25 @@ 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
Service GetUserDesktopPath() Service GetUserDesktopPath()
Response = '' Response = ''
UserRootPath = '' UserRootPath = ''
UserName = RTI_GetNetworkUserName() UserName = RTI_GetNetworkUserName()
@ -514,115 +514,94 @@ 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
Service GetServiceManagerPort() Service GetServiceManagerPort()
FilePath = Drive():'\SRPEngineServer.ini' FilePath = Drive():'\SRPEngineServer.ini'
OSRead IniFile from FilePath then OSRead IniFile from FilePath then
CharIndex = Index(IniFile, 'Port', 1) CharIndex = Index(IniFile, 'Port', 1)
Line = IniFile[CharIndex, 'F':CRLF$] Line = IniFile[CharIndex, 'F':CRLF$]
Response = Trim(Line[-1, 'B=']) Response = Trim(Line[-1, 'B='])
end end
end service end service
Service GetScrapeServerPort() Service GetScrapeServerPort()
FilePath = Drive():'\SRPEngineServerScrape.ini' FilePath = Drive():'\SRPEngineServerScrape.ini'
OSRead IniFile from FilePath then OSRead IniFile from FilePath then
CharIndex = Index(IniFile, 'Port', 1) CharIndex = Index(IniFile, 'Port', 1)
Line = IniFile[CharIndex, 'F':CRLF$] Line = IniFile[CharIndex, 'F':CRLF$]
Response = Trim(Line[-1, 'B=']) Response = Trim(Line[-1, 'B='])
end end
end service
Service GetTextDataBackupRootDir()
Machine = Environment_Services('GetServer')
DataBackupDir = ''
Begin Case
Case Machine = 'MESSA01EC'
// PROD SQL Servers
DataBackupDir = '\\MESFS.INFINEON.COM\MES_OpenInsight_Backups\DataBackups\'
Case ( (Machine = 'MESTSA01EC') or (Machine = 'MESTSA09EC') or (Machine = 'MESTSA010EC') or (Machine = 'MESTSA011EC') or (Machine = 'MESTSA012EC') )
// DEV SQL Servers
DataBackupDir = 'd:\MES_OpenInsight_Backups\DataBackups\'
Case Otherwise$
// Default to DEV SQL Servers just in case
DataBackupDir = 'd:\MES_OpenInsight_Backups\DataBackups\'
End Case
Response = DataBackupDir
end service end service
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Internal GoSubs // Internal GoSubs
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -425,38 +425,6 @@ 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 = ''
@ -492,3 +460,5 @@ 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('StartLot', CreatedLotNumber, 'SYSTEM') Lot_Services('MoveInLot', CreatedLotNumber, Username)
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,33 +792,6 @@ 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)
@ -846,14 +819,8 @@ 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
CurrOperation = Lot_Services('GetLotCurrOperationName', LotId) Lot_Services('MoveInLot', LotId, Operator)
Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'ARRIVAL', 'Lot arrived at operation ' : CurrOperation : '.', '', Operator) If Error_Services('HasError') then ErrorMessage = Error_Services('GetMessage')
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
@ -991,7 +958,12 @@ 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('HasError') then ErrorMessage = Error_Services('GetMessage') If Error_Services('NoError') then
Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'ARRIVAL', 'Lot arrived at operation ' : CurrOperation : '.', '', Operator)
If Error_Services('HasError') then ErrorMessage = Error_Services('GetMessage')
end else
ErrorMessage = Error_Services('GetMessage')
end
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
@ -1046,7 +1018,6 @@ 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)
@ -1058,23 +1029,7 @@ 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
IsLastLotOp = Lot_Services('IsLastOperation', LotId, ThisLotCurrOperationID) Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'MOVE_OUT', 'Lot moved out of operation ' : CurrOperation : '.', '', Operator)
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
@ -1274,7 +1229,9 @@ 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('HasError') then If Error_Services('NoError') 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
@ -1315,39 +1272,51 @@ Service CloseLot(LotId)
end service end service
Service AutoCloseLot(LotId, CloseUserId) Service AutoCloseTestWaferLot(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
MovedIn = Lot_Services('IsLotMovedIn', LotId) ThisLotOperationRec = Database_Services('ReadDataRow', 'LOT_OPERATION', ThisLotOperationId)
If MovedIn then if Error_Services('NoError') then
Lot_Services('MoveOutLot', LotId, CloseUserId) CurrLotQty = Database_Services('ReadDataColumn', 'LOT', LotId, LOT_WAFER_QTY$, True$, 0, False$)
If Error_Services('HasError') then If ThisLotOperationRec<LOT_OPERATION_DATETIME_IN$> EQ '' then
ErrorMessage = Error_Services('GetMessage') ThisLotOperationRec<LOT_OPERATION_DATETIME_IN$> = AutoCloseTime
end else end
ErrorMessage = Error_Services('GetMessage') If ThisLotOperationRec<LOT_OPERATION_DATETIME_OUT$> EQ '' then
end ThisLotOperationRec<LOT_OPERATION_DATETIME_OUT$> = AutoCloseTime
end else end
Lot_Services('MoveInLot', LotId, CloseUserId) if ThisLotOperationRec<LOT_OPERATION_OPERATOR_IN_ID$> EQ '' then
If Error_Services('NoError') then ThisLotOperationRec<LOT_OPERATION_OPERATOR_IN_ID$> = CloseUserId
If Lot_Services('IsLastOperation', LotId, ThisLotOperationId) then end
Lot_Services('MoveOutLot', LotId, CloseUserId) if ThisLotOperationRec<LOT_OPERATION_OPERATOR_OUT_ID$> EQ '' then
If Error_Services('HasError') then ThisLotOperationRec<LOT_OPERATION_OPERATOR_OUT_ID$> = CloseUserId
ErrorMessage = Error_Services('GetMessage') end
end if ThisLotOperationRec<LOT_OPERATION_DATETIME_START$> EQ '' then
end ThisLotOperationRec<LOT_OPERATION_DATETIME_START$> = AutoCloseTime
end else end
ErrorMessage = Error_Services('GetMessage') if ThisLotOperationRec<LOT_OPERATION_DATETIME_STOP$> EQ '' then
end ThisLotOperationRec<LOT_OPERATION_DATETIME_STOP$> = AutoCloseTime
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')
@ -1357,12 +1326,31 @@ Service AutoCloseLot(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
LogData = '' // Close Lot as there were no validation failures.
LogData<1> = LoggingDTM Lot_Services('CloseLot', LotId)
LogData<2> = LotId If Error_Services('NoError') then
LogData<3> = CloseUserId LogData = ''
LogData<4> = 'Successfully marked lot as closed.' LogData<1> = LoggingDTM
Logging_Services('AppendLog', objLotClosureLog, LogData, @RM, @FM, False$) LogData<2> = LotId
LogData<3> = CloseUserId
LogData<4> = 'Successfully marked lot as closed.'
Logging_Services('AppendLog', objLotClosureLog, LogData, @RM, @FM, False$)
end else
ErrorMessage = Error_Services('GetMessage')
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = LotId
LogData<3> = CloseUserId
LogData<4> = 'Error marking lot as closed.' : ErrorMessage
Logging_Services('AppendLog', objLotClosureLog, LogData, @RM, @FM, False$)
// Send a message to FI
Recipients = Xlate('NOTIFICATION', 'FI_SUPPORT', NOTIFICATION_USER_ID$, 'X')
SentFrom = 'SYSTEM'
Subject = 'TEST WAFER LOT AUTO-CLOSURE FAILURE'
Message = 'Error in ' : service : ' with lot id ' : LotId : ' attempting to set CLOSE flag on lot. ' : ErrorMessage
Obj_Notes('Create',Recipients:@RM:SentFrom:@RM:Subject:@RM:Message)
Error_Services('Add', 'Error in ' : service : ' with lot ' : LotId : ':' : ErrorMessage)
end
end else end else
ErrorMessage = 'Error in ' : service : ' with lot ' : LotId : ':' : ErrorMessage ErrorMessage = 'Error in ' : service : ' with lot ' : LotId : ':' : ErrorMessage
LogData = '' LogData = ''
@ -1425,7 +1413,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 = 'AutoCloseLot' : SD$ : LotId : SD$ : 'SYSTEM' ServiceParms = 'AutoCloseTestWaferLot' : 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')
@ -1631,4 +1619,3 @@ end service
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------

View File

@ -82,15 +82,12 @@ $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
@ -257,6 +254,7 @@ Service GetStratus(Handle)
Result<10> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].Batch'); // BatchID Result<10> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].Batch'); // BatchID
Result<11> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].Cassette'); // Cassette Result<11> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].Cassette'); // Cassette
Result<12> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].GradeMean'); // ThickAvg Result<12> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].GradeMean'); // ThickAvg
Result<13> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].IndexOf');
END END
ForOffset = (RecordIndex - 1) * FieldPositionIncrement; ForOffset = (RecordIndex - 1) * FieldPositionIncrement;
Result<FieldPosition + ForOffset> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].Slot'); // Position Result<FieldPosition + ForOffset> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].Slot'); // Position
@ -286,6 +284,7 @@ Service GetBioRad(Handle)
Result<8> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].Layer'); // RunDataLayer Result<8> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].Layer'); // RunDataLayer
Result<9> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].Zone'); // RunDataZone Result<9> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].Zone'); // RunDataZone
Result<11> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].Wafer'); // DataSlotId Result<11> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].Wafer'); // DataSlotId
Result<13> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].IndexOf');
END END
ForOffset = (RecordIndex - 1) * FieldPositionIncrement; ForOffset = (RecordIndex - 1) * FieldPositionIncrement;
Result<FieldPosition + ForOffset> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].Position'); // Position Result<FieldPosition + ForOffset> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].Position'); // Position
@ -313,6 +312,7 @@ Service GetCDE(Handle)
Result<8> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].PSN'); // PSN Result<8> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].PSN'); // PSN
Result<9> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].Layer'); // RunDataLayer Result<9> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].Layer'); // RunDataLayer
Result<10> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].Zone'); // RunDataZo Result<10> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].Zone'); // RunDataZo
Result<13> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].IndexOf');
END END
ForOffset = (RecordIndex - 1) * FieldPositionIncrement; ForOffset = (RecordIndex - 1) * FieldPositionIncrement;
Result<FieldPosition + ForOffset> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].InferredPoint'); // Position Result<FieldPosition + ForOffset> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].InferredPoint'); // Position
@ -341,7 +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 Result<13> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].IndexOf');
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
@ -363,6 +363,7 @@ Service GetTencor(Handle)
IF RecordIndex EQ 1 THEN IF RecordIndex EQ 1 THEN
Result<9> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].Date'); // Timestamp Result<9> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].Date'); // Timestamp
Result<10> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].HazeAverageAvg'); // HazeAvg Result<10> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].HazeAverageAvg'); // HazeAvg
Result<13> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].IndexOf');
Result<28> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].RDS'); // RDSKeyID Result<28> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].RDS'); // RDSKeyID
Result<30> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].WaferRecipe'); // ScanRecipe Result<30> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].WaferRecipe'); // ScanRecipe
Result<39> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].SumOfDefectsAvg'); // SoDAvg Result<39> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].SumOfDefectsAvg'); // SoDAvg
@ -385,6 +386,7 @@ Service GetSP1(Handle)
IF RecordIndex EQ 1 THEN IF RecordIndex EQ 1 THEN
Result<9> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].Date'); // Timestamp Result<9> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].Date'); // Timestamp
Result<10> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].DcnHazeAvgMean'); // HazeAvg Result<10> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].DcnHazeAvgMean'); // HazeAvg
Result<13> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].IndexOf');
Result<28> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].RDS'); // RDSKeyID Result<28> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].RDS'); // RDSKeyID
Result<30> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].Session'); // ScanRecipe Result<30> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].Session'); // ScanRecipe
Result<3> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].DcnLpdMean'); // SoDAvg Result<3> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].DcnLpdMean'); // SoDAvg
@ -408,7 +410,6 @@ 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
@ -435,10 +436,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$
ErrMsg = 'Error in ':Service:' service. Unsupported Machine "':Machine:'" passed into service' Error_Services('Add', 'Error in ':Service:' service. Unsupported Machine "':Machine:'" passed into service')
End Case End Case
If Error_Services('NoError') and ErrMsg EQ '' then If Error_Services('NoError') then
SearchPattern = '*.pdsf'; SearchPattern = '*.pdsf';
InitDir DataPath:SearchPattern InitDir DataPath:SearchPattern
FileList = DirList() FileList = DirList()
@ -530,28 +531,23 @@ Service ImportMetrologyFiles(Machine=MACHINE_TYPES)
************************* *************************
* Import metrology data * * Import metrology data *
************************* *************************
IF RunData NE '' then IF RunData NE '' then
AllowImport = Metrology_Services('AllowImport', RunData) Metrology_Services('ImportMetrologyRunData', Machine, DataPath, FileName, 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
ErrMsg = 'RunData argument was missing' Error_Services('Add', 'RunData argument was missing')
Metrology_Services('LogResults', '', '', 'UID001', Service : ' : ' : ErrMsg) Metrology_Services('LogResults', '', '', 'UID001', Service : ' : ' : Error_Services('GetMessage'))
END END
If Error_Services('NoError') and ErrMsg EQ '' then If Error_Services('NoError') then
Continue = True$ Continue = True$
end else end else
If ErrMsg EQ '' then ErrMsg = Error_Services('GetMessage') ErrorMessage = Error_Services('GetMessage')
FQAError = IndexC(ErrMsg, 'FQA has already been signed', 1) FQAError = IndexC(ErrorMessage, 'FQA has already been signed', 1)
If ( Index(ErrMsg, 'UID002', 1) and (ImportAttempts LE RETRY_ATTEMPTS$) and Not(FQAError) ) then If ( Index(ErrorMessage, '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
@ -571,9 +567,10 @@ 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 := ErrMsg : @FM MetrologyLog := ErrorMessage : @FM
Database_Services('WriteDataRow', 'SYSLISTS', UCase(Machine):'_METROLOGY_LOG', MetrologyLog, True$) Database_Services('WriteDataRow', 'SYSLISTS', UCase(Machine):'_METROLOGY_LOG', MetrologyLog, True$)
end end
@ -586,16 +583,13 @@ Service ImportMetrologyFiles(Machine=MACHINE_TYPES)
NEXT FileLoopIndex NEXT FileLoopIndex
end else end else
If ErrMsg EQ '' then ErrMsg = Error_Services('GetMessage') Metrology_Services('LogResults', '', '', 'UID001', Error_Services('GetMessage'))
Metrology_Services('LogResults', '', '', 'UID001', ErrMsg)
end end
Unlock hSysLists, ServiceKeyID:'*':Machine else Null Unlock hSysLists, ServiceKeyID:'*':Machine else Null
end end
end else end else
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
@ -3215,13 +3209,6 @@ 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
@ -3665,5 +3652,3 @@ LoadRunDataToDatabase:
end end
return return

View File

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

View File

@ -0,0 +1,587 @@
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

@ -0,0 +1,422 @@
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, Labeling_Services, Printer_Select Declare function Reactor_Services
Declare subroutine PlaceDialog, Labeling_Services Declare subroutine PlaceDialog, Labeling_Services
GoToEvent Event for CtrlEntId else GoToEvent Event for CtrlEntId else
@ -77,30 +77,15 @@ 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')
ReactorZpl = Labeling_Services('GetReactorLabelZPL', ReactNo, LLSide) Def = ""
If Error_Services('NoError') then Def<MTEXT$> = "Printing label..."
PrintPath = Printer_Select() Def<MTYPE$> = "U"
If PrintPath NE '' then MsgUp = Msg(@window, Def) ;* display the processing message
Def = "" Labeling_Services('PrintReactorLabel', ReactNo, LLSide)
Def<MTEXT$> = "Printing label..." Msg(@window, MsgUp) ;* take down the processing message
Def<MTYPE$> = "U" If Error_Services('HasError') then Error_Services('DisplayError')
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

@ -30,7 +30,8 @@ $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

@ -0,0 +1,162 @@
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

@ -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, RDS_Services DECLARE SUBROUTINE SRP_Stopwatch, Database_Services, Lot_Services, Supplement_Services
$INSERT MSG_EQUATES $INSERT MSG_EQUATES
$INSERT WO_VERIFY_EQU $INSERT WO_VERIFY_EQU
@ -375,10 +375,6 @@ 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
@ -1254,3 +1250,4 @@ CalcThickTarget:
RETURN RETURN

View File

@ -772,7 +772,9 @@ 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('AutoCloseLot', LotId, 'SYSTEM') Lot_Services('MoveOutLot', LotId, @User4) ; // Move out of POST_EPI operation
Lot_Services('MoveInLot', LotId, @User4) ; // Move into RDS_CLOSE operation
Lot_Services('CloseLot', LotId)
end end
end end
@ -1681,4 +1683,3 @@ 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, Datetime Declare function Environment_Services, Logging_Services, Error_Services
$insert LOGICAL $insert LOGICAL
@ -476,9 +476,7 @@ 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)
@ -2054,4 +2052,3 @@ 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, WM_In_Services DECLARE SUBROUTINE Logging_Services, obj_Notes
$INSERT MSG_EQUATES $INSERT MSG_EQUATES
$INSERT WO_LOG_EQU $INSERT WO_LOG_EQU
@ -128,9 +128,6 @@ 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
@ -943,3 +940,6 @@ 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, WM_Out_Services Declare Subroutine Service_Services, obj_Notes, Delay
$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 60 EQU NUM_RETRIES$ TO 50
ErrTitle = 'Error in Stored Procedure "obj_WM_Out"' ErrTitle = 'Error in Stored Procedure "obj_WM_Out"'
ErrorMsg = '' ErrorMsg = ''
@ -115,12 +115,13 @@ Create:
WONo = Parms[1,@RM] WONo = Parms[1,@RM]
WOStep = Parms[COL2()+1,@RM] WOStep = Parms[COL2()+1,@RM]
NewCassNo = Parms[COL2()+1,@RM] NewCassNos = 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 NewCassNo = '' THEN ErrorMsg = 'Null Parameter "NewCassNo" passed to routine. (':Method:')' IF NewCassNos = '' THEN ErrorMsg = 'Null Parameter "NewCassNos" passed to routine. (':Method:')'
IF ErrorMsg NE '' THEN RETURN IF ErrorMsg NE '' THEN RETURN
@ -160,8 +161,11 @@ Create:
WORec = XLATE('WO_LOG',WONo,'','X') WORec = XLATE('WO_LOG',WONo,'','X')
InboundWaferQty = 0 InboundWaferQty = 0
CassWfrQty = XLATE('WO_MAT',WONo:'*':NewCassNo,WO_MAT_WAFER_QTY$,'X') FOR I = 1 TO COUNT(NewCassNos,@VM) + (NewCassNos NE '')
InboundWaferQty += CassWfrQty NewCassNo = NewCassNos<1,I>
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')
@ -210,7 +214,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 EQ 0 UNTIL InboundWaferQty = 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 = ''
@ -246,7 +250,7 @@ Create:
NumAttempts = 0 NumAttempts = 0
Loop Loop
NumAttempts += 1 NumAttempts += 1
If NumAttempts GT 1 then Delay(1) If NumAttempts GT 1 then Delay(NumAttempts)
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
@ -268,9 +272,6 @@ 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
@ -1998,3 +1999,6 @@ 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, RDS_Services, WM_In_Services, WM_Out_Services DECLARE SUBROUTINE Work_Order_Services, Delay, Transaction_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 60 EQU NUM_RETRIES$ TO 50
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 = 'ReleaseCassette' ; GOSUB ReleaseCassette CASE Method = 'ReleaseCassettes' ; GOSUB ReleaseCassettes
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
* * * * * * * * * * * * * *
ReleaseCassette: ReleaseCassettes:
* * * * * * * * * * * * * *
WONo = Parms[1,@RM] WONo = Parms[1,@RM]
CassNo = Parms[COL2()+1,@RM] CassNos = 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 @@ ReleaseCassette:
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:' CassNo: ':CassNo:' ReleaseUser: ':ReleaseUser:' ||| Beginning ReleaseCassette routine.' LogData<4> = 'WONo: ':WONo:' CassNos: ':CassNos:' ReleaseUser: ':ReleaseUser:' ||| Beginning ReleaseCassettes 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,7 +1050,12 @@ ReleaseCassette:
OrdSummary = '' ;* Holds Order Detail Lot Numbers and Associated Order Item Numbers OrdSummary = '' ;* Holds Order Detail Lot Numbers and Associated Order Item Numbers
WOMKey = WONo:'*':CassNo CassCnt = COUNT(CassNos,@VM) + (CassNos NE '')
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')
@ -1060,7 +1065,7 @@ ReleaseCassette:
END END
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS') LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
LogData<4> = 'WONo:':WONo:' CassNo:':CassNo:' ||| Trace 1' LogData<4> = 'WONo:':WONo:' CassNos:':CassNos:' ||| 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$>
@ -1088,138 +1093,149 @@ ReleaseCassette:
// 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:' CassNo:':CassNo:' WMOLoadQty:':WMOLoadQty LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNos:':CassNos:' 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:CassNo:@RM:WMOLoadQty) OutOnlyCassIDS = obj_WM_Out('Create',WONO:@RM:WOStep:@RM:CassNos:@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:' CassNo:':CassNo:' WMOLoadQty:':WMOLoadQty LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNos:':CassNos:' CassCnt:':CassCnt:' 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:' CassNo:':CassNo:' WMOLoadQty:':WMOLoadQty:' ||| Trace 2' LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNos:':CassNos:' CassCnt:':CassCnt:' WMOLoadQty:':WMOLoadQty:' ||| Trace 2'
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM) Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
IF ReactorType EQ 'EPP' THEN FOR N = 1 TO CassCnt
CassWaferQty = XLATE('WO_MAT',WONo:'*':CassNo,WO_MAT_WAFER_QTY$,'X') LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
WMIKey = WONo:'*':WOStep:'*':CassNo LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNos:':CassNos:' CassCnt:':CassCnt:' WMOLoadQty:':WMOLoadQty:' ||| Trace 2.':N
obj_WM_IN('Create',WONo:@RM:WOStep:@RM:CassNo:@RM:CassWaferQty) Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
END ELSE CassNo = CassNos<1,N>
WOMatRec = XLATE('WO_MAT',WoNo:'*':CassNo,'','X') IF ReactorType EQ 'EPP' THEN
RDSNoCheck = WOMatRec<WO_MAT_RDS_NO$>
If RDSNoCheck EQ '' then
CassLotNo = WOMatRec<WO_MAT_LOT_NO$> CassWaferQty = XLATE('WO_MAT',WONo:'*':CassNo,WO_MAT_WAFER_QTY$,'X')
CassWaferQty = WOMatRec<WO_MAT_WAFER_QTY$> WMIKey = WONo:'*':WOStep:'*':CassNo
CassCustPartNo = WOMatRec<WO_MAT_CUST_PART_NO$> obj_WM_IN('Create',WONo:@RM:WOStep:@RM:CassNo:@RM:CassWaferQty)
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 END ELSE
QuoteNo = ''
END ELSE
QuoteNo = XLATE('ORDER_DET',OrderNo:'*':CassOrderItem,ORDER_DET_QUOTE_NO$,'X')
END
Parms = WONo:@RM WOMatRec = XLATE('WO_MAT',WoNo:'*':CassNo,'','X')
Parms := WOStep:@RM RDSNoCheck = WOMatRec<WO_MAT_RDS_NO$>
Parms := LastStep:@RM If RDSNoCheck EQ '' then
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
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS') CassLotNo = WOMatRec<WO_MAT_LOT_NO$>
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNo:':CassNo:' WMOLoadQty:':WMOLoadQty:' ||| Trace 2.1 - Start obj_RDS("Create")' CassWaferQty = WOMatRec<WO_MAT_WAFER_QTY$>
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM) CassCustPartNo = WOMatRec<WO_MAT_CUST_PART_NO$>
Done = False$ CassSubPartNo = WOMatRec<WO_MAT_SUB_PART_NO$>
For AttemptIndex = 1 to NUM_RETRIES$ CassSubInvID = ''
If (AttemptIndex GT 1) then Delay(1) CassOrderItem = WOMatRec<WO_MAT_ORDER_ITEM$>
NewRDSNo = obj_RDS('Create',Parms) ReprocessedMat = WOMatRec<WO_MAT_REPROCESSED_MAT$>
errCode = '' CassSubVendCd = WOMatRec<WO_MAT_SUB_VEND_CD$>
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
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS') IF OrderNo = '' THEN
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNo:':CassNo:' WMOLoadQty:':WMOLoadQty:' ||| Trace 2.2 - End obj_RDS("Create")' QuoteNo = ''
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM) END ELSE
QuoteNo = XLATE('ORDER_DET',OrderNo:'*':CassOrderItem,ORDER_DET_QUOTE_NO$,'X')
END
If ( (NewRDSNo EQ 0) or (NewRDSNo EQ '') ) then Parms = WONo:@RM
Parms := WOStep:@RM
Parms := LastStep:@RM
Parms := CassNo:@RM
Parms := QuoteNo:@RM
Parms := OrderNo:@RM
Parms := CassOrderItem:@RM
Parms := CustNo:@RM
Parms := PONo:@RM
Parms := ProcPSN:@RM
Parms := SubSupplyBy:@RM
Parms := SubPreClean:@RM
Parms := SubPostClean:@RM
Parms := PromiseDt:@RM
Parms := CassLotNo:@RM
Parms := CassCustPartNo:@RM
Parms := CassWaferQty:@RM
Parms := CassSubPartNo:@RM
Parms := '':@RM ;* QXJ Flag
Parms := CassSubVendCd
IF ReactorType NE 'GAN' then
ErrMsg(errCode) LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
ErrorMsg = "RDS '" : NewRDSNo : "' Create Failure - Check for missing data on Work Order" LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNos:':CassNos:' CassCnt:':CassCnt:' WMOLoadQty:':WMOLoadQty:' ||| Trace 2.':N:'.1 - Start obj_RDS("Create")'
If Error_Services('HasError') then Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
ErrMsg = Error_Services('GetMessage') Done = False$
LogData = LoggingDTM : ',' : ReleaseUser : ',' : WONo : ',' : ErrMsg For AttemptIndex = 1 to NUM_RETRIES$
Logging_Services('AppendLog', objLog, LogData, CRLF$, COMMA$, False$, '', LogData) If (AttemptIndex GT 1) then Delay(AttemptIndex)
NewRDSNo = obj_RDS('Create',Parms)
errCode = ''
Begin Case
Case Get_Status(errCode)
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNos:':CassNos:' CassCnt:':CassCnt:' WMOLoadQty:':WMOLoadQty:' ||| Trace 2.':N:'.1.1 - Attempt ':AttemptIndex:'. Error calling obj_RDS("Create"). Error message: ':errCode
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
Case (NewRDSNo EQ 0) or (NewRDSNo EQ '')
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNos:':CassNos:' CassCnt:':CassCnt:' WMOLoadQty:':WMOLoadQty:' ||| Trace 2.':N:'.1.1 - Attempt ':AttemptIndex:'. Error calling obj_RDS("Create"). Invalid RDSNo ':Quote(RDSNo):' returned.'
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
Case RowExists('RDS', NewRDSNo)
Done = True$
End Case
Until Done
Next AttemptIndex
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNos:':CassNos:' CassCnt:':CassCnt:' WMOLoadQty:':WMOLoadQty:' ||| Trace 2.':N:'.2 - End obj_RDS("Create")'
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
If ( (NewRDSNo EQ 0) or (NewRDSNo EQ '') ) then
ErrMsg(errCode)
ErrorMsg = "RDS '" : NewRDSNo : "' Create Failure - Check for missing data on Work Order"
If Error_Services('HasError') then
ErrMsg = Error_Services('GetMessage')
LogData = LoggingDTM : ',' : ReleaseUser : ',' : WONo : ',' : ErrMsg
Logging_Services('AppendLog', objLog, LogData, CRLF$, COMMA$, False$, '', LogData)
end
RTParms = 'RDS'
FOR I = 1 TO COUNT(StepRdsNos,@VM) + (StepRdsNos NE '')
RdsNo = StepRdsNos<1,I>
RTParms = FieldStore(RTParms, @RM, 2, 1, RdsNo)
obj_Tables('DeleteRec',RTParms)
NEXT I
RETURN
END else
// No error creating RDS record -> add it to the batch list.
StepRDSNos<1,-1> = NewRDSNo
end end
RTParms = 'RDS' IF ReprocessedMat THEN
FOR I = 1 TO COUNT(StepRdsNos,@VM) + (StepRdsNos NE '') OrgRDSNo = CassLotNo
RdsNo = StepRdsNos<1,I> obj_Reprocess('FixUp',OrgRDSNo:@RM:NewRDSNo)
RTParms = FieldStore(RTParms, @RM, 2, 1, RdsNo) END
obj_Tables('DeleteRec',RTParms)
NEXT I END ;* End of check for GAN reactor
RETURN END ;* End of Check for existing RDS
END else END ;* End of check for EpiPRO reactor type
// No error creating RDS record -> add it to the batch list. NEXT N
StepRDSNos<1,-1> = NewRDSNo
end
IF ReprocessedMat THEN
OrgRDSNo = CassLotNo
obj_Reprocess('FixUp',OrgRDSNo:@RM:NewRDSNo)
END
END ;* End of check for GAN reactor
END ;* End of Check for existing RDS
END ;* End of check for EpiPRO reactor type
NEXT WOStep NEXT WOStep
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS') LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNo:':CassNo:' WMOLoadQty:':WMOLoadQty:' ||| Trace 3' LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNos:':CassNos:' CassCnt:':CassCnt:' 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
@ -1235,91 +1251,95 @@ ReleaseCassette:
MaxShipQty = Xlate('WO_LOG', WONo, 'CUST_EPI_PART_SHIP_QTY', 'X') MaxShipQty = Xlate('WO_LOG', WONo, 'CUST_EPI_PART_SHIP_QTY', 'X')
CassNo = FIELD(WOMKey,'*',2) FOR N = 1 TO CassCnt
// Keep trying to get the lock. Another process may be updating this record at the same time. WOMKey = WOMKeys<1,N>
Done = False$ CassNo = FIELD(WOMKey,'*',2)
For AttemptIndex = 1 to NUM_RETRIES$ // Keep trying to get the lock. Another process may be updating this record at the same time.
Done = False$
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS') For AttemptIndex = 1 to NUM_RETRIES$
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:' CassNo:':CassNo:' WMOLoadQty:':WMOLoadQty:' ||| Trace 3.':AttemptIndex:' Have lock!' LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNos:':CassNos:' CassCnt:':CassCnt:' WMOLoadQty:':WMOLoadQty:' ||| Trace 3.':AttemptIndex
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM) Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
WOMatRec = XLATE('WO_MAT',WOMKey,'','X') ;* We have the lock, so just get the record this way If (AttemptIndex GT 1) then Delay(AttemptIndex)
HaveLock = Database_Services('GetKeyIDLock', 'WO_MAT', WOMKey)
IF WOMatRec<WO_MAT_REL_DTM$> = '' THEN If HaveLock then
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
WOMatRec<WO_MAT_WMI_CURR_STATUS$> = 'RTU'
END ELSE
WOMatRec<WO_MAT_WMI_CURR_STATUS$> = 'PREC'
END
WOMatRec<WO_MAT_WMO_CURR_STATUS$> = 'RTB'
thisInvDTM = ICONV(RelDTM,'DT')
WHCd = 'SR'
LocCd = 'RB'
InvAction = 'REL'
ScanUserID = ReleaseUser
Tag = ''
ToolID = ''
LOCATE thisInvDTM IN WOMatRec<WO_MAT_INV_DTM$> BY 'AR' USING @VM SETTING Pos ELSE
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_WH$,Pos,0,WHCd)
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_LOCATION$,Pos,0,LocCd)
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_ACTION$,Pos,0,InvAction)
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_DTM$,Pos,0,thisInvDTM)
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_USER$,Pos,0,ScanUserID)
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_TAG$,Pos,0,Tag)
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_TOOL_ID$,Pos,0,ToolID)
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_SCAN_ENTRY$,Pos,0,False$)
END
WOMatParms = 'WO_MAT':@RM:WOMKey:@RM:WOMTableVar:@RM:WOMatRec
obj_Tables('WriteRec',WOMatParms) ;* This writes and unlocks the WO_MAT records
If Not(Get_Status(errCode)) then
Done = True$
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNo:':CassNo:' WMOLoadQty:':WMOLoadQty:' ||| Trace 3.':AttemptIndex:' Successfully updated WO_MAT record ':WOMKey:' with REL operation.'
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
end else
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNo:':CassNo:' WMOLoadQty:':WMOLoadQty:' ||| Trace 3.':AttemptIndex:' Failed to update WO_MAT record ':WOMKey:' with REL operation.'
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
end
IF ReactType = 'EPP' OR ReactType = 'GAN' THEN
obj_WO_Wfr('CassRel',WOMKey) ;* Added 3/17/2016 JCH for wafer history
END
END else
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS') LogData<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.' LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNos:':CassNos:' CassCnt:':CassCnt:' WMOLoadQty:':WMOLoadQty:' ||| Trace 3.':AttemptIndex:' Have lock!'
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM) Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
WOMatRec = XLATE('WO_MAT',WOMKey,'','X') ;* We have the lock, so just get the record this way
IF WOMatRec<WO_MAT_REL_DTM$> = '' THEN
WOMatRec<WO_MAT_REL_DTM$> = IConv(RelDTM,'DT')
WOMatRec<WO_MAT_REL_BY$> = ReleaseUser
WOMatRec<WO_MAT_ORG_COMMIT_DT$> = PromiseDt
IF SubPreClean = 'No' OR SubPreClean = '' THEN
WOMatRec<WO_MAT_WMI_CURR_STATUS$> = 'RTU'
END ELSE
WOMatRec<WO_MAT_WMI_CURR_STATUS$> = 'PREC'
END
WOMatRec<WO_MAT_WMO_CURR_STATUS$> = 'RTB'
thisInvDTM = ICONV(RelDTM,'DT')
WHCd = 'SR'
LocCd = 'RB'
InvAction = 'REL'
ScanUserID = ReleaseUser
Tag = ''
ToolID = ''
LOCATE thisInvDTM IN WOMatRec<WO_MAT_INV_DTM$> BY 'AR' USING @VM SETTING Pos ELSE
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_WH$,Pos,0,WHCd)
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_LOCATION$,Pos,0,LocCd)
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_ACTION$,Pos,0,InvAction)
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_DTM$,Pos,0,thisInvDTM)
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_USER$,Pos,0,ScanUserID)
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_TAG$,Pos,0,Tag)
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_TOOL_ID$,Pos,0,ToolID)
WOMatRec = INSERT(WOMatRec,WO_MAT_INV_SCAN_ENTRY$,Pos,0,False$)
END
WOMatParms = 'WO_MAT':@RM:WOMKey:@RM:WOMTableVar:@RM:WOMatRec
obj_Tables('WriteRec',WOMatParms) ;* This writes and unlocks the WO_MAT records
If Not(Get_Status(errCode)) then
Done = True$
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNos:':CassNos:' CassCnt:':CassCnt:' WMOLoadQty:':WMOLoadQty:' ||| Trace 3.':AttemptIndex:' Successfully updated WO_MAT record ':WOMKey:' with REL operation.'
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
end else
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNos:':CassNos:' CassCnt:':CassCnt:' WMOLoadQty:':WMOLoadQty:' ||| Trace 3.':AttemptIndex:' Failed to update WO_MAT record ':WOMKey:' with REL operation.'
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
end
IF ReactType = 'EPP' OR ReactType = 'GAN' THEN
obj_WO_Wfr('CassRel',WOMKey) ;* Added 3/17/2016 JCH for wafer history
END
END else
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNos:':CassNos:' CassCnt:':CassCnt:' WMOLoadQty:':WMOLoadQty:' ||| Trace 3.':AttemptIndex:' Error! REL_DTM is not null.'
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
end
end end
end Until Done
Until Done Next AttemptIndex
Next AttemptIndex
NEXT N
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS') LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS')
LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNo:':CassNo:' WMOLoadQty:':WMOLoadQty:' ||| Trace 4' LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNos:':CassNos:' CassCnt:':CassCnt:' WMOLoadQty:':WMOLoadQty:' ||| Trace 4'
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM) Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
OutOnlyCnt = DCount(OutOnlyCassIDs, @VM) OutOnlyCnt = COUNT(OutOnlyCassIDs,@VM) + (OutOnlyCassIDs NE '')
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
@ -1331,7 +1351,7 @@ ReleaseCassette:
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:' CassNo:':CassNo:' WMOLoadQty:':WMOLoadQty:' ||| Trace 5' LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNos:':CassNos:' CassCnt:':CassCnt:' 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$
@ -1381,12 +1401,12 @@ ReleaseCassette:
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:' CassNo:':CassNo:' WMOLoadQty:':WMOLoadQty:' ||| Error Message: ':ErrorMsg LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNos:':CassNos:' CassCnt:':CassCnt:' 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:' CassNo:':CassNo:' WMOLoadQty:':WMOLoadQty:' ||| Ending ReleaseCassette routine' LogData<4> = 'WONo:':WONo:' WOStep:':WOStep:' CassNos:':CassNos:' CassCnt:':CassCnt:' WMOLoadQty:':WMOLoadQty:' ||| Ending ReleaseCassettes routine'
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM) Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM)
RETURN RETURN
@ -2328,6 +2348,7 @@ 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
@ -2365,6 +2386,7 @@ 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 = ''
@ -2396,43 +2418,8 @@ 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,11 +1258,10 @@ 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 = ''
ThisEntryAction = '' Done = False$
Done = False$ NumAttempts = 0
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$)
@ -1311,39 +1310,27 @@ 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)
If Pos EQ -1 then LastEntryIndex = DCount(WOMatRecVerify<WO_MAT_INV_WH$>, @VM)
LastEntryIndex = DCount(WOMatRecVerify<WO_MAT_INV_WH$>, @VM) LastEntryAction = WOMatRecVerify<WO_MAT_INV_ACTION$, LastEntryIndex>
LogPos = LastEntryIndex LastEntryLocCd = WOMatRecVerify<WO_MAT_INV_LOCATION$, LastEntryIndex>
ThisEntryAction = WOMatRecVerify<WO_MAT_INV_ACTION$, LastEntryIndex> If LastEntryAction EQ InvAction AND LastEntryLocCd = LocCd then
ThisEntryLocCd = WOMatRecVerify<WO_MAT_INV_LOCATION$, LastEntryIndex> Done = True$
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$, LogPos> LogData<1> = WOMatRecVerify<WO_MAT_INV_DTM$, LastEntryIndex>
LogData<2> = WONo LogData<2> = WONo
LogData<3> = CassNo LogData<3> = CassNo
LogData<4> = WOMatRecVerify<WO_MAT_INV_USER$, LogPos> LogData<4> = WOMatRecVerify<WO_MAT_INV_USER$, LastEntryIndex>
LogData<5> = LogPos LogData<5> = LastEntryIndex
LogData<6> = WOMatRecVerify<WO_MAT_INV_TAG$, LogPos> LogData<6> = WOMatRecVerify<WO_MAT_INV_TAG$, LastEntryIndex>
LogData<7> = WOMatRecVerify<WO_MAT_INV_WH$, LogPos> LogData<7> = WOMatRecVerify<WO_MAT_INV_WH$, LastEntryIndex>
LogData<8> = WOMatRecVerify<WO_MAT_INV_LOCATION$, LogPos> LogData<8> = WOMatRecVerify<WO_MAT_INV_LOCATION$, LastEntryIndex>
LogData<9> = ThisEntryAction LogData<9> = LastEntryAction
LogData<10> = WOMatRecVerify<WO_MAT_INV_TOOL_ID$, LogPos> LogData<10> = WOMatRecVerify<WO_MAT_INV_TOOL_ID$, LastEntryIndex>
LogData<11> = WOMatRecVerify<WO_MAT_INV_SCAN_ENTRY$, LogPos> LogData<11> = WOMatRecVerify<WO_MAT_INV_SCAN_ENTRY$, LastEntryIndex>
LogData<12> = NumAttempts LogData<12> = NumAttempts
Logging_Services('AppendLog', WOMatObjLog3, LogData, @RM, @FM) Logging_Services('AppendLog', WOMatObjLog3, LogData, @RM, @FM)
@ -5748,3 +5735,6 @@ ExpCOA:
RETURN RETURN

View File

@ -551,32 +551,23 @@ 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)
@ -763,3 +754,5 @@ QAResults:
RETURN RETURN

View File

@ -41,11 +41,9 @@ 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
@ -142,10 +140,12 @@ 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) * SECONDS_IN_DAY$ SessionAge = (Datetime() - lastDateTime) * 86400
MaxAge = HOUR_IN_SECONDS$ * 12 // 600 seconds = 10 minutes
If SessionAge LT MaxAge then Valid = True$ If SessionAge LT 600 then
Valid = True$
end
end end
ActionFlow = Valid ActionFlow = Valid
@ -164,9 +164,8 @@ 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) // Set expiry to last updated datetime (i.e. last time the session was updated/validated) plus 10 minutes
// plus 12 hours (0.5 of a day). Expiry = lastDateTime + (600 / 86400)
Expiry = lastDateTime + 0.5
end end
ActionFlow = Expiry ActionFlow = Expiry
@ -289,4 +288,3 @@ Restore_System_Variables:
@FILE.ERROR = OrigFileError @FILE.ERROR = OrigFileError
return return

View File

@ -1,10 +1,9 @@
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
@ -199,9 +198,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) * SECONDS_IN_DAY$ SessionAge = (Datetime() - lastDateTime) * 86400
MaxAge = HOUR_IN_SECONDS$ * 12 // 600 seconds = 10 minutes
If SessionAge LT MaxAge then If SessionAge LT 600 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)
@ -499,3 +498,11 @@ Service ConvertMVTransactionToJSON(TransactionID, mvTransaction, itemURL)
end service end service

View File

@ -0,0 +1,481 @@
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

@ -0,0 +1,534 @@
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

@ -0,0 +1,545 @@
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, SRP_String Declare function Prod_Ver_Services, PRS_Stage_Services, SRP_Array, Tool_Class_Services
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,11 +116,8 @@ 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
@ -139,11 +136,8 @@ 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,7 +3122,9 @@ 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('AutoCloseLot', LotId, 'SYSTEM') Lot_Services('MoveOutLot', LotId, Username) ; // Move out of POST_EPI operation
Lot_Services('MoveInLot', LotId, Username) ; // Move into RDS_CLOSE operation
Lot_Services('CloseLot', LotId)
end end
end end
end end
@ -3842,4 +3844,3 @@ 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, Work_Order_Services Declare Subroutine Mona_Services
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\RDS' LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\RDS'
LogDate = Oconv(Date(), 'D4/') LogDate = Oconv(Date(), 'D4/')
@ -905,23 +905,18 @@ 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', 'UpdateCassProcStatus':SD$:WONo:SD$:CassNo:SD$:DatetimeOut) Service_Services('PostProcedure', 'SCHEDULE_SERVICES', 'MarkCassProcessed':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', 'UpdateCassProcStatus':SD$:WONo:SD$:CassNo:SD$:DatetimeOut) Service_Services('PostProcedure', 'SCHEDULE_SERVICES', 'MarkCassProcessed':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
OrigScrapQty = Count(OrigPocketChar, 'TEST') Service_Services('PostProcedure', 'WORK_ORDER_SERVICES', 'UpdateScrappedQty':SD$:WONo)
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)
@ -1023,4 +1018,3 @@ Restore_System_Variables:
return return

View File

@ -131,13 +131,11 @@ 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, Delay Declare subroutine Dialog_Box, Obj_Notes, RList, Set_Status, Errmsg, Obj_React_Status, Reactor_Services
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
@ -754,28 +752,32 @@ 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 Quote(CompareLot) EQ Quote(SupplierLot) then IsValid = True$ if compareLot EQ SupplierLot then
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 Quote(CompareLot) EQ Quote(SupplierLot) then IsValid = True$ if compareLot EQ SupplierLot then
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 Quote(CompareLot) EQ Quote(SupplierLot) then IsValid = True$ if compareLot EQ SupplierLot then
IsValid = True$
end
End Case End Case
Response = IsValid Response = IsValid
end service end service
@ -2261,9 +2263,10 @@ 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> = OConv(Datetime(), 'DT/^S') LogData<1> = LoggingDtm
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)
@ -2274,48 +2277,35 @@ 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
Done = False$ Lock BangTable, 0 then
For AttemptNo = 1 to NUM_ATTEMPTS$ Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM
If AttemptNo GT 1 then Delay(1) PendingTrans := IndexTransactionRow
Lock BangTable, 0 then Write PendingTrans on BangTable, 0 then
Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM LogData<4> = 'Index transaction successfully added.'
PendingTrans := IndexTransactionRow Logging_Services('AppendLog', objVerifyRDSNoLog, LogData, @RM, @FM)
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
If AttemptNo GE NUM_ATTEMPTS$ then ErrorMsg = 'Unable to write index transaction to !RDS. ':RDSNo
ErrorMsg = 'Unable to Lock !RDS to add index transaction. ':RDSNo
end
end end
Until Done or ErrorMsg Unlock BangTable, 0 else ErrorMsg = 'Unable to Open !RDS to add index transaction. ':RDSNo
Next AttemptNo end else
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
@ -2323,12 +2313,10 @@ 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)
@ -2339,15 +2327,16 @@ 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> = OConv(Datetime(), 'DT/^S') LogData<1> = LoggingDtm
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)
@ -2358,48 +2347,35 @@ 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
Done = False$ Lock BangTable, 0 then
For AttemptNo = 1 to NUM_ATTEMPTS$ Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM
If AttemptNo GT 1 then Delay(1) PendingTrans := IndexTransactionRow
Lock BangTable, 0 then Write PendingTrans on BangTable, 0 then
Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM LogData<4> = 'Index transaction successfully added.'
PendingTrans := IndexTransactionRow Logging_Services('AppendLog', objVerifyRDSKeyLog, LogData, @RM, @FM)
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
If AttemptNo GE NUM_ATTEMPTS$ then ErrorMsg = 'Unable to write index transaction to !RDS. ':RDSNo
ErrorMsg = 'Unable to Lock !RDS to add index transaction. ':RDSNo
end
end end
Until Done or ErrorMsg Unlock BangTable, 0 else ErrorMsg = 'Unable to Open !RDS to add index transaction. ':RDSNo
Next AttemptNo end else
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
@ -2407,12 +2383,10 @@ 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)
@ -2429,9 +2403,10 @@ 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> = OConv(Datetime(), 'DT/^S') LogData<1> = LoggingDtm
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)
@ -2446,44 +2421,32 @@ 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
Done = False$ Lock BangTable, 0 then
For AttemptNo = 1 to NUM_ATTEMPTS$ Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM
If AttemptNo GT 1 then Delay(1) PendingTrans := IndexTransactionRow
Lock BangTable, 0 then Write PendingTrans on BangTable, 0 then
Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM LogData<4> = 'Index transaction successfully added.'
PendingTrans := IndexTransactionRow Logging_Services('AppendLog', objVerifyRDSWoIndexLog, LogData, @RM, @FM)
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
If AttemptNo GE NUM_ATTEMPTS$ then ErrorMsg = 'Error in ':Service:' service. Unable to write index transaction to !RDS. ':RDSNo
ErrorMsg = 'Error in ':Service:' service. Unable to Lock !RDS to add index transaction. ':RDSNo
end
end end
Until Done or ErrorMsg Unlock BangTable, 0 else ErrorMsg = 'Error in ':Service:' service. Unable to Open !RDS to add index transaction. ':RDSNo
Next AttemptNo end else
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
@ -2493,12 +2456,10 @@ 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)
@ -3429,3 +3390,5 @@ ClearCursors:
return return

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,3 +4515,4 @@ ClearCursors:
return return

View File

@ -1,133 +0,0 @@
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

@ -73,7 +73,7 @@ $Insert MATERIAL_REPORT_EQUATES
// Reduce modes (for Select statement) // Reduce modes (for Select statement)
Equ NEW_EXIST$ To 0 Equ NEW_EXIST$ To 0
Equ NEXT_CUR$ To 1 Equ NEXT_CUR$ To 1
Equ ADD_EXIST$ To 2 Equ ADD_EXIST$ To 2
Declare subroutine Utility, ErrMsg, Set_Status, Set_Printer, RList, SRP_Stopwatch, Btree.Extract, Error_Services, V119 Declare subroutine Utility, ErrMsg, Set_Status, Set_Printer, RList, SRP_Stopwatch, Btree.Extract, Error_Services, V119
Declare subroutine Push.Select, Pop.Select, Database_Services, SRP_JSON, Logging_Services, Reduce, FSMsg Declare subroutine Push.Select, Pop.Select, Database_Services, SRP_JSON, Logging_Services, Reduce, FSMsg
@ -632,25 +632,23 @@ 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)
KitDemand = Row<MATERIAL_REPORT.KIT_DEMAND$> SRP_JSON(objRow, 'SetValue', '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
@ -1082,9 +1080,7 @@ 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
@ -1108,12 +1104,9 @@ 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 ''
@ -1260,10 +1253,8 @@ 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 = ''
@ -1462,12 +1453,11 @@ Service GenerateMaterialTrackRows()
OPEN 'DICT.SCHED_DET_NG' TO SchedDetDict then OPEN 'DICT.SCHED_DET_NG' TO SchedDetDict then
Today = Datetime() Today = Datetime()
ReactList = '' ReactList = ''
RemainingReactorDemandList = '' WOList = ''
WOList = '' SchedDetKeys = ''
SchedDetKeys = '' PrevReactNo = ''
PrevReactNo = '' PrevWO = ''
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'
@ -1478,10 +1468,6 @@ 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
@ -1493,25 +1479,13 @@ 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
ReactType = Database_Services('ReadDataColumn', 'REACTOR', ReactNo, REACTOR_REACT_TYPE$) ReactList = INSERT(ReactList,Pos,0,0,ReactNo)
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
@ -1524,7 +1498,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
@ -1740,42 +1714,36 @@ 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', ',')
Locate S.ReactNo in ReactList using @FM setting rPos then CassNeeded = ''
ThisReactorRemainingDemand = RemainingReactorDemandList<rPos> EpiPartNo = Xlate('WO_LOG', S.WONo, 'EPI_PART_NO', 'X')
PTICassCount = DCount(PTICassList, ',') If EpiPartNo NE '' then
ThisReactorRemainingDemand -= PTICassCount WPDAdjusted = Epi_Part_Services('GetAdjustedWafersPerDayScheduler', EpiPartNo, S.React_Type)
If ThisReactorRemainingDemand LT 0 then ThisReactorRemainingDemand = 0 If WPDAdjusted NE '' then
RemainingReactorDemandList<rPos> = ThisReactorRemainingDemand CPDAdjusted = SRP_Math('CEILING', (WPDAdjusted/25) )
If ThisReactorRemainingDemand GT 0 then CassInCR = DCount(KitCassList, ',') + DCount(PTICassList, ',') + DCount(LoadedCassList, ',')
KitDemand = Field(KitCassList, ',', 1, ThisReactorRemainingDemand) CassNeeded = CassInCR - CPDAdjusted
ThisReactorRemainingDemand -= DCount(KitDemand, ',') end
RemainingReactorDemandList<rPos> = ThisReactorRemainingDemand end
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, MATERIAL_REPORT.REACT_NO$> = S.ReactNo AllReportData<RowIndex, 1> = S.ReactNo
AllReportData<RowIndex, MATERIAL_REPORT.REACT_TYPE$> = S.React_Type AllReportData<RowIndex, 2> = S.React_Type
AllReportData<RowIndex, MATERIAL_REPORT.WO_NO$> = S.WONo AllReportData<RowIndex, 3> = S.WONo
AllReportData<RowIndex, MATERIAL_REPORT.PROD_ORD_NO$> = S.ProdOrdNo AllReportData<RowIndex, 4> = S.ProdOrdNo
AllReportData<RowIndex, MATERIAL_REPORT.SUB_PART_NO$> = S.SubPartNo AllReportData<RowIndex, 5> = S.SubPartNo
AllReportData<RowIndex, MATERIAL_REPORT.EPI_PART_NO$> = S.EpiPartNo AllReportData<RowIndex, 6> = S.EpiPartNo
AllReportData<RowIndex, MATERIAL_REPORT.WO_QTY$> = S.WO_Qty AllReportData<RowIndex, 7> = S.WO_Qty
AllReportData<RowIndex, MATERIAL_REPORT.WO_RX_QTY$> = S.WO_RX_Qty AllReportData<RowIndex, 8> = S.WO_RX_Qty
AllReportData<RowIndex, MATERIAL_REPORT.WO_UNREL_QTY$> = S.WO_UnRel_Qty AllReportData<RowIndex, 9> = S.WO_UnRel_Qty
AllReportData<RowIndex, MATERIAL_REPORT.KIT_LOCATION$> = S.KitLocation AllReportData<RowIndex, 10> = S.KitLocation
AllReportData<RowIndex, MATERIAL_REPORT.KIT_QTY$> = S.KitQty AllReportData<RowIndex, 11> = S.KitQty
AllReportData<RowIndex, MATERIAL_REPORT.KIT_RO$> = KitCassList AllReportData<RowIndex, 12> = CassNeeded
AllReportData<RowIndex, MATERIAL_REPORT.KIT_DEMAND$> = KitDemand AllReportData<RowIndex, 13> = KitCassList ; // Skip field 14, it is populated by users
AllReportData<RowIndex, MATERIAL_REPORT.PTI_RO$> = PTICassList AllReportData<RowIndex, 15> = PTICassList
AllReportData<RowIndex, MATERIAL_REPORT.LOAD_RO$> = LoadedCassList AllReportData<RowIndex, 16> = LoadedCassList ; // Skip field 17, it is populated by users
AllReportData<RowIndex, MATERIAL_REPORT.START_DTM$> = S.StartDtm AllReportData<RowIndex, 18> = S.StartDtm
end end
end else end else
@ -1794,6 +1762,7 @@ 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
@ -1845,11 +1814,13 @@ 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
@ -1868,6 +1839,508 @@ 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) Return_To_Fab_Services('AddDefaultRTFOperations', NGLotId, UserId)
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,51 +165,48 @@ Service CreateReturnToFabRecord(CassId, UserId)
End Service End Service
Service AddDefaultRTFOperations(LotId) Service AddDefaultRTFOperations(LotId, UserId)
ErrorMessage = '' ErrorMessage = ''
If LotId NE '' then // Todo: add these to a configuration for return to fab.
// Todo: add these to a configuration for return to fab. CurrentOperationsSeq = Lot_Services('GetLotOperationSequence', LotId)
CurrentOperationsSeq = Lot_Services('GetLotOperationSequence', LotId) if CurrentOperationsSeq EQ '' then
if CurrentOperationsSeq EQ '' then CurrSeq = 0
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
ErrorMessage = 'LotID Parameter was null.' CurrSeq = DCount(CurrentOperationsSeq, @FM)
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
@ -1271,7 +1268,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) Return_To_Fab_Services('AddDefaultRTFOperations', LotId, 'SYSTEM')
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)
@ -1324,4 +1321,3 @@ 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 _EQSC RDSSuppLot) then If (ScannedSuppLot _EQC 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,38 +999,32 @@ 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
RDSLayerAckReq = Xlate('RDS', RDSNo, 'RDS_LAYER_ACK_REQ', 'X') LoadStageReady = QA_Services('LoadSignatureReady', RDSNo, Username, WaferQty, LLSide, True$, Reactor)
If RDSLayerAckReq EQ False$ then If (LoadStageReady NE True$) then
LoadStageReady = QA_Services('LoadSignatureReady', RDSNo, Username, WaferQty, LLSide, True$, Reactor) // Why is it not ready?
If (LoadStageReady NE True$) then ErrMsg = Error_Services('GetMessage')
// Why is it not ready? Begin Case
ErrMsg = Error_Services('GetMessage') Case IndexC(ErrMsg, 'supplement', 1)
Begin Case // Clear the error to return a JSON payload and handle the acknowledgements.
Case IndexC(ErrMsg, 'supplement', 1) Error_Services('Clear')
// Clear the error to return a JSON payload and handle the acknowledgements. Scan_Services('AddNotAcceptableReason', ErrMsg)
Case IndexC(ErrMsg, 'ROTR', 1)
ROTRBlock = Database_Services('ReadDataColumn', 'REACTOR', Reactor, REACTOR_ROTR_STATUS$, True$, 0, False$)
ROTRBlockReason = Database_Services('ReadDataColumn', 'REACTOR', Reactor, REACTOR_ROTR_STATUS_REASON$, True$, 0, False$)
ROTREnabled = Database_Services('ReadDataColumn', 'REACTOR', Reactor, REACTOR_ENABLE_ROTR$, True$, 0, False$)
If ( (ROTRBlock NE 'P') AND (ROTREnabled EQ True$) ) then
// Clear the error to return a JSON payload and allow for OVERRIDE scan.
ScansRow<SCANS.OVERRIDE_REQD$> = True$
ScansRow<SCANS.OVERRIDE_REASON$> = ROTRBlockReason
ScansRow<SCANS.OVERRIDE_TYPE$> = 'ROTR'
Error_Services('Clear') Error_Services('Clear')
Scan_Services('AddNotAcceptableReason', ErrMsg) Scan_Services('AddNotAcceptableReason', "ROTR Load Block Enabled")
Case IndexC(ErrMsg, 'ROTR', 1) end else
ROTRBlock = Database_Services('ReadDataColumn', 'REACTOR', Reactor, REACTOR_ROTR_STATUS$, True$, 0, False$) ScansRow<SCANS.OVERRIDE_REQD$> = False$
ROTRBlockReason = Database_Services('ReadDataColumn', 'REACTOR', Reactor, REACTOR_ROTR_STATUS_REASON$, True$, 0, False$) ScansRow<SCANS.OVERRIDE_REASON$> = ''
ROTREnabled = Database_Services('ReadDataColumn', 'REACTOR', Reactor, REACTOR_ENABLE_ROTR$, True$, 0, False$) ScansRow<SCANS.OVERRIDE_TYPE$> = ''
If ( (ROTRBlock NE 'P') AND (ROTREnabled EQ True$) ) then end
// Clear the error to return a JSON payload and allow for OVERRIDE scan. End Case
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?
@ -1068,7 +1062,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 _EQSC RDSSuppLot) then If (ScannedSuppLot _EQC 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)
@ -1102,7 +1096,6 @@ 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$
@ -1118,7 +1111,8 @@ 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
Scan_Services('AddNotAcceptableReason', 'RDS layer parameters must be reviewed for accuracy and acknowledged before the load operation can be signed.') ErrMsg = '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:')'
@ -2103,7 +2097,7 @@ Service ConvertMVScanToJSON(ScanID, mvScan, itemURL)
SRP_JSON(objRDS, 'SetValue', 'waferCountInst' , WaferCountInst , 'String') SRP_JSON(objRDS, 'SetValue', 'waferCountInst' , WaferCountInst , 'String')
SRP_JSON(objRDS, 'SetValue', 'rdsLayerInstAckReq' , RDSLayerInstAckReq , 'Boolean') SRP_JSON(objRDS, 'SetValue', 'rdsLayerInstAckReq' , RDSLayerInstAckReq , 'Boolean')
SRP_JSON(objRDS, 'SetValue', 'rdsLayerInstAck' , RDSRec<RDS_RDS_LAYER_ACK$> , 'Boolean') SRP_JSON(objRDS, 'SetValue', 'rdsLayerInstAck' , RDSRec<RDS_RDS_LAYER_ACK$> , 'Boolean')
OverrideRequired = @Record<SCANS.OVERRIDE_REQD$> OverrideRequired = @Record<SCANS.OVERRIDE_REQD$>
OverrideType = @Record<SCANS.OVERRIDE_TYPE$> OverrideType = @Record<SCANS.OVERRIDE_TYPE$>
OverrideReason = @Record<SCANS.OVERRIDE_REASON$> OverrideReason = @Record<SCANS.OVERRIDE_REASON$>
@ -2425,3 +2419,7 @@ ClearCursors:
return return

View File

@ -1287,8 +1287,10 @@ Service AdjustScheduleEvents(ReactNo)
EventRec<SCHED_DET_NG.EVENT_TOTAL_WFRS$> = EventWfrs EventRec<SCHED_DET_NG.EVENT_TOTAL_WFRS$> = EventWfrs
Database_Services('WriteDataRow', 'SCHED_DET_NG', EventKey, EventRec, True$, False$, True$) 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) // Check each unprocessed cassette to ensure it does not need to be moved to the processed column
Schedule_Services('UpdateEventCassLists', EventKey) For each CassNo in UnprocessedCass using @VM
Schedule_Services('MarkCassProcessed', WONo, CassNo, Datetime())
Next CassNo
EventRec = Schedule_Services('GetScheduleDetail', EventKey) EventRec = Schedule_Services('GetScheduleDetail', EventKey)
UnprocessedCass = EventRec<SCHED_DET_NG.UNPROCESSED_CASS$> UnprocessedCass = EventRec<SCHED_DET_NG.UNPROCESSED_CASS$>
@ -2547,7 +2549,7 @@ end service
// Modifies an event's details. // Modifies an event's details.
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
Service ModifySchedEvent(SchedDetNGKey, ReactorNo, WorkOrderNo, StartDTM, StopDTM, Description, WaferQty, AdjustNextEvent=BOOLEAN) Service ModifySchedEvent(SchedDetNGKey, ReactorNo, WorkOrderNo, StartDTM, StopDTM, Description, WaferQty, AdjustNextEvent=BOOLEAN)
Response = False$ Response = False$
If SchedDetNGKey NE '' then If SchedDetNGKey NE '' then
EventRec = Database_Services('ReadDataRow', 'SCHED_DET_NG', SchedDetNGKey) EventRec = Database_Services('ReadDataRow', 'SCHED_DET_NG', SchedDetNGKey)
@ -3259,155 +3261,87 @@ Service GetAvailableWorkOrders(ReactorType, SusceptorSize, ReactorNo)
end service end service
Service UpdateCassProcStatus(WONo, CassNo, ProcessedDTM) Service MarkCassProcessed(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:' OR WITH PROCESSED_CASS EQ ':CassNo:' BY START_DTM' Query := 'AND WITH UNPROCESSED_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 Until EOF = True$
Schedule_Services('UpdateEventCassProcStatus', WONo, CassNo, SchedDetNGKey) SchedDetNGRec = Database_Services('ReadDataRow', 'SCHED_DET_NG', SchedDetNGKey)
If Error_Services('HasError') then ErrorMsg = Error_Services('GetMessage') CassComp = False$
Done = True$ ReactType = Xlate('WO_LOG', WONo, 'REACT_TYPE', 'X')
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
If RowExists('WM_IN', WMIKey) then WMIRdsList = Xlate('WM_IN', WMIKey, 'RDS_NO', 'X')
// Since EpiPro splits WM_IN cassettes out into RDS runs, we need to determine if the UnloadDtms = Xlate('RDS', WMIRdsList, 'DATETIME_OUT', 'X')
// cassette has been emptied out or if enough wafers have been consumed such that NumUnloadedWfrs = 0
// the wafer count equals the split work order event quantity. If UnloadDtms NE '' then
StopDtm = SchedDetNGRec<SCHED_DET_NG.STOP_DTM$> For each UnloadDtm in UnloadDtms using @VM
SchedWfrQty = Schedule_Services('GetScheduledWfrQty', WONo, StopDtm) NumUnloadedWfrs += (UnloadDtm NE '')
// Determine the cassette and slot this event should end on. This will be used to identify Next UnloadDtm
// cassettes that should be marked as complete when the event ends in the middle of the cassette. end
// That is, the EpiPro work order events should end on an RDS when they are split around block CassRemWfrs = Xlate('WM_IN', WMIKey, 'REM_WFRS', 'X')
// out events. If ( (NumUnloadedWfrs EQ 25) or ( (CassNo EQ EndCassNo) and (NumUnloadedWfrs GE EndSlotNo) ) or (CassRemWfrs EQ 0) ) then
NumSchedCass = DCount(AllSchedCass, @VM) CassComp = True$
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
WOMatKey = WoNo:'*':CassNo WOMatKey = WoNo:'*':CassNo
If RowExists('WO_MAT', WOMatKey) then CurrWaferCount = obj_WO_Mat('CurrWaferCnt', WOMatKey)
CurrWaferCount = obj_WO_Mat('CurrWaferCnt', WOMatKey) RDSNo = Xlate('WO_MAT', WOMatKey, 'RDS_NO', 'X')
RDSNo = Xlate('WO_MAT', WOMatKey, 'RDS_NO', 'X') DateOut = Xlate('RDS', RDSNo, 'DATE_OUT', 'X')
DateOut = Xlate('RDS', RDSNo, 'DATE_OUT', 'X') CassComp = ( (CurrWaferCount EQ 0) or (DateOut NE '') )
CassComp = ( (CurrWaferCount EQ 0) or (DateOut NE '') )
end
end end
If CassComp then If CassComp then
Locate CassNo in UnprocCassList using @VM setting vPos then RecChanged = False$
UnprocCassList = Delete(UnprocCassList, 0, vPos, 0) UnprocessedCassettes = SchedDetNGRec<SCHED_DET_NG.UNPROCESSED_CASS$>
RecChanged = True$ Locate CassNo in UnprocessedCassettes using @VM setting vPos then
UnprocessedCassettes = Delete(UnprocessedCassettes, 0, vPos, 0)
RecChanged = True$
end end
Locate CassNo in ProcCassList using @VM setting vPos else ProcessedCassettes = SchedDetNGRec<SCHED_DET_NG.PROCESSED_CASS$>
ProcCassList<0, -1> = CassNo Locate CassNo in ProcessedCassettes using @VM setting vPos else
ProcCassList = SRP_Array('Clean', ProcCassList, 'TrimAndMakeUnique', @VM) ProcessedCassettes<0, -1> = CassNo
ProcCassList = SRP_Array('SortSimpleList', ProcCassList, 'AscendingNumbers', @VM) ProcessedCassettes = SRP_Array('Clean', ProcessedCassettes, 'TrimAndMakeUnique', @VM)
RecChanged = True$ ProcessedCassettes = SRP_Array('SortSimpleList', ProcessedCassettes, 'AscendingNumbers', @VM)
RecChanged = True$
end end
end else If RecChanged then
Locate CassNo in ProcCassList using @VM setting vPos then SchedDetNGRec<SCHED_DET_NG.UNPROCESSED_CASS$> = UnprocessedCassettes
ProcCassList = Delete(ProcCassList, 0, vPos, 0) SchedDetNGRec<SCHED_DET_NG.PROCESSED_CASS$> = ProcessedCassettes
RecChanged = True$ Database_Services('WriteDataRow', 'SCHED_DET_NG', SchedDetNGKey, SchedDetNGRec, True$, False$, 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
Done = True$
end end
end else Until Done EQ True$
ErrorMsg = 'Error in ':Service:' service. Error message: ':Error_Services('GetMessage') Repeat
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
@ -3719,226 +3653,6 @@ 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,27 +179,3 @@ 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,23 +155,17 @@ WRITE_RECORD_PRE:
return return
WRITE_RECORD: WRITE_RECORD:
OrigQty = OrigRecord<TW_USE_TW_QTY$> OrigQty = OrigRecord<TW_USE_TW_QTY$>
NewQty = Record<TW_USE_TW_QTY$> NewQty = Record<TW_USE_TW_QTY$>
OrigSig = OrigRecord<TW_USE_SIGNATURE$> OrigSig = OrigRecord<TW_USE_SIGNATURE$>
NewSig = OrigRecord<TW_USE_SIGNATURE$> NewSig = OrigRecord<TW_USE_SIGNATURE$>
If ( (OrigRecord EQ '') or (OrigQty NE NewQty) or (OrigSig NE NewSig) ) then If OrigRecord EQ '' or OrigQty NE NewQty or OrigSig NE NewSig then
MetrologyID = Field(Name, '*', 1) 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:
@ -186,11 +180,6 @@ 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
@ -239,4 +228,3 @@ Restore_System_Variables:
@FILE.ERROR = OrigFileError @FILE.ERROR = OrigFileError
return return

View File

@ -1,70 +0,0 @@
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

@ -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', 'UpdateCassProcStatus':SD$:WONo:SD$:CassNo:SD$:ProcessedDtm) Service_Services('PostProcedure', 'SCHEDULE_SERVICES', 'MarkCassProcessed':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,8 +60,6 @@ $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
@ -79,7 +77,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, Update_Index, Delay Declare subroutine SRP_Json
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.')
@ -220,27 +218,19 @@ 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
Done = False$ Lock BangTable, 0 then
For AttemptNo = 1 to NUM_ATTEMPTS$ Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM
If AttemptNo GT 1 then Delay(1) PendingTrans := IndexTransactionRow
Lock BangTable, 0 then Write PendingTrans on BangTable, 0 then
Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM LogData<4> = 'Index transaction successfully added.'
PendingTrans := IndexTransactionRow Logging_Services('AppendLog', objVerifyWMIKeyLog, LogData, @RM, @FM)
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
If AttemptNo GE NUM_ATTEMPTS$ then ErrorMsg = 'Unable to write index transaction to !WM_IN. ':WMIKey
ErrorMsg = 'Unable to Lock !WM_IN to add index transaction. ':WMIKey
end
end end
Until Done or ErrorMsg Unlock BangTable, 0 else ErrorMsg = 'Unable to Open !WM_IN to add index transaction. ':WMIKey
Next AttemptNo end else
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
@ -273,9 +263,10 @@ 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> = OConv(Datetime(), 'DT/^S') LogData<1> = LoggingDtm
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)
@ -287,44 +278,32 @@ 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
Done = False$ Lock BangTable, 0 then
For AttemptNo = 1 to NUM_ATTEMPTS$ Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM
If AttemptNo GT 1 then Delay(1) PendingTrans := IndexTransactionRow
Lock BangTable, 0 then Write PendingTrans on BangTable, 0 then
Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM LogData<4> = 'Index transaction successfully added.'
PendingTrans := IndexTransactionRow Logging_Services('AppendLog', objVerifyWMIWoIndexLog, LogData, @RM, @FM)
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
If AttemptNo GE NUM_ATTEMPTS$ then ErrorMsg = 'Error in ':Service:' service. Unable to write index transaction to !WM_IN. ':WMIKey
ErrorMsg = 'Error in ':Service:' service. Unable to Lock !WM_IN to add index transaction. ':WMIKey
end
end end
Until Done or ErrorMsg Unlock BangTable, 0 else ErrorMsg = 'Error in ':Service:' service. Unable to Open !WM_IN to add index transaction. ':WMIKey
Next AttemptNo end else
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
@ -334,12 +313,10 @@ 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)
@ -356,9 +333,10 @@ 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> = OConv(Datetime(), 'DT/^S') LogData<1> = LoggingDtm
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)
@ -369,44 +347,32 @@ 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
Done = False$ Lock BangTable, 0 then
For AttemptNo = 1 to NUM_ATTEMPTS$ Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM
If AttemptNo GT 1 then Delay(1) PendingTrans := IndexTransactionRow
Lock BangTable, 0 then Write PendingTrans on BangTable, 0 then
Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM LogData<4> = 'Index transaction successfully added.'
PendingTrans := IndexTransactionRow Logging_Services('AppendLog', objVerifyWoMatWmiKeyLog, LogData, @RM, @FM)
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
If AttemptNo GE NUM_ATTEMPTS$ then ErrorMsg = 'Unable to write index transaction to !WM_IN. ':WMIKey
ErrorMsg = 'Unable to Lock !WM_IN to add index transaction. ':WMIKey
end
end end
Until Done or ErrorMsg Unlock BangTable, 0 else ErrorMsg = 'Unable to Open !WM_IN to add index transaction. ':WMIKey
Next AttemptNo end else
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
@ -414,12 +380,10 @@ 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,23 +57,21 @@ $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, Update_Index, Delay Declare subroutine Logging_Services, Btree.Extract
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 ''
@ -95,15 +93,15 @@ 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$>
CommentList = CommentDates :@FM: CommentUsers :@FM: Comments CommentList = CommentDates :@FM: CommentUsers :@FM: Comments
CommentArray = SRP_Rotate_Array(CommentList) CommentArray = SRP_Rotate_Array(CommentList)
Response = CommentArray Response = CommentArray
End Service End Service
@ -121,35 +119,35 @@ 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
Service ConvertRecordToJSON(KeyID, Record, ItemURL) Service ConvertRecordToJSON(KeyID, Record, ItemURL)
jsonRecord = '' jsonRecord = ''
If KeyID NE '' then If KeyID NE '' then
If Record EQ '' then Record = Database_Services('ReadDataRow', 'WM_OUT', KeyID) If Record EQ '' then Record = Database_Services('ReadDataRow', 'WM_OUT', KeyID)
If Error_Services('NoError') then If Error_Services('NoError') then
@DICT = Database_Services('GetTableHandle', 'DICT.WM_OUT') @DICT = Database_Services('GetTableHandle', 'DICT.WM_OUT')
@ -169,9 +167,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)
@ -231,16 +229,16 @@ 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
SRP_JSON(objWMOut, 'Set', 'ReturnToFabRecords', objRTFRecords) SRP_JSON(objWMOut, 'Set', 'ReturnToFabRecords', objRTFRecords)
SRP_JSON(objRTFRecords, 'Release') SRP_JSON(objRTFRecords, 'Release')
end end
@ -279,7 +277,7 @@ Service ConvertRecordToJSON(KeyID, Record, ItemURL)
end else end else
Error_Services('Add', 'KeyID argument was missing in the ' : Service : ' service.') Error_Services('Add', 'KeyID argument was missing in the ' : Service : ' service.')
end end
Response = jsonRecord Response = jsonRecord
End Service End Service
@ -295,9 +293,9 @@ End Service
// Rows are @FM delimted while columns are @VM delimited. // Rows are @FM delimted while columns are @VM delimited.
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
Service GetWMOData(WorkOrderNo, Columns, ShowGasGauge, WMOOverrideList) Service GetWMOData(WorkOrderNo, Columns, ShowGasGauge, WMOOverrideList)
WMOList = '' WMOList = ''
If ( (WorkOrderNo NE '') or (WMOOverrideList NE '') ) then If ( (WorkOrderNo NE '') or (WMOOverrideList NE '') ) then
If ShowGasGauge NE True$ then ShowGasGauge = False$ If ShowGasGauge NE True$ then ShowGasGauge = False$
rv = Set_Status(0) rv = Set_Status(0)
@ -333,28 +331,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.')
@ -365,7 +363,7 @@ Service GetWMOData(WorkOrderNo, Columns, ShowGasGauge, WMOOverrideList)
end end
If ShowGasGauge then Msg(@Window, MsgUp) ;* take down the gauge If ShowGasGauge then Msg(@Window, MsgUp) ;* take down the gauge
Response = WMOList Response = WMOList
end service end service
@ -410,129 +408,50 @@ 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')
@ -549,61 +468,39 @@ Service VerifyRelationalIndexes(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
If RowExists('WM_OUT', WMOKey) then Open "!WM_OUT" to BangTable then
IndexTransactionRow = 'WO_STEP*WM_OUT_KEYS*AR':@FM:WMOKey:@FM:"":@FM:WOStepKey:@FM Lock BangTable, 0 then
end else Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM
IndexTransactionRow = 'WO_STEP*WM_OUT_KEYS*AR':@FM:WMOKey:@FM:WOStepKey:@FM:"":@FM PendingTrans := IndexTransactionRow
end Write PendingTrans on BangTable, 0 then
Done = False$ LogData<4> = 'Index transaction successfully added.'
For AttemptNo = 1 to NUM_ATTEMPTS$ Logging_Services('AppendLog', objVerifyWMOKeyLog, LogData, @RM, @FM)
If AttemptNo GT 1 then Delay(1) end else
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
end Unlock BangTable, 0 else ErrorMsg = 'Unable to Open !WM_OUT to add index transaction. ':WMOKey
Unlock BangTable, 0 else ErrorMsg = 'Unable to Open !WM_OUT to add index transaction. ':WMOKey end else
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 end else
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
Until Done or ErrorMsg end else
Next AttemptNo LogData<4> = 'WO_STEP key for WM_OUT ':WMOKey:' is null. Nothing to update.'
If Done then Logging_Services('AppendLog', objVerifyWMOKeyLog, LogData, @RM, @FM)
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
@ -628,9 +525,10 @@ 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> = OConv(Datetime(), 'DT/^S') LogData<1> = LoggingDtm
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)
@ -642,7 +540,6 @@ 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
@ -651,34 +548,24 @@ 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
Done = False$ Lock BangTable, 0 then
For AttemptNo = 1 to NUM_ATTEMPTS$ Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM
If AttemptNo GT 1 then Delay(1) PendingTrans := IndexTransactionRow
Lock BangTable, 0 then Write PendingTrans on BangTable, 0 then
Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM LogData<4> = 'Index transaction successfully added.'
PendingTrans := IndexTransactionRow Logging_Services('AppendLog', objVerifyWMOWoIndexLog, LogData, @RM, @FM)
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
If AttemptNo GE NUM_ATTEMPTS$ then ErrorMsg = 'Error in ':Service:' service. Unable to write index transaction to !WM_OUT. ':WMOKey
ErrorMsg = 'Error in ':Service:' service. Unable to Lock !WM_OUT to add index transaction. ':WMOKey
end
end end
Until Done or ErrorMsg Unlock BangTable, 0 else ErrorMsg = 'Error in ':Service:' service. Unable to Open !WM_OUT to add index transaction. ':WMOKey
Next AttemptNo end else
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
@ -688,12 +575,10 @@ 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)
@ -710,9 +595,10 @@ 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> = OConv(Datetime(), 'DT/^S') LogData<1> = LoggingDtm
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)
@ -723,44 +609,32 @@ 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<1> = OConv(Datetime(), 'DT/^S') LogData<3> = WOMatKey
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
Done = False$ Lock BangTable, 0 then
For AttemptNo = 1 to NUM_ATTEMPTS$ Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM
If AttemptNo GT 1 then Delay(1) PendingTrans := IndexTransactionRow
Lock BangTable, 0 then Write PendingTrans on BangTable, 0 then
Read PendingTrans from BangTable, 0 else PendingTrans = '0':@FM LogData<4> = 'Index transaction successfully added.'
PendingTrans := IndexTransactionRow Logging_Services('AppendLog', objVerifyWOMatWmoKeyLog, LogData, @RM, @FM)
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
If AttemptNo GE NUM_ATTEMPTS$ then ErrorMsg = 'Unable to write index transaction to !WM_OUT. ':WMOKey
ErrorMsg = 'Unable to Lock !WM_OUT to add index transaction. ':WMOKey
end
end end
Until Done or ErrorMsg Unlock BangTable, 0 else ErrorMsg = 'Unable to Open !WM_OUT to add index transaction. ':WMOKey
Next AttemptNo end else
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
@ -768,12 +642,10 @@ 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)
@ -781,7 +653,6 @@ Service VerifyWOMatWMOKeyIndex(WMOKey)
end service end service
Service GetWMOutKeys(WOLogId) Service GetWMOutKeys(WOLogId)
ErrorMsg = '' ErrorMsg = ''
@ -832,7 +703,7 @@ Service GetWmOutZpl(WmOutKey)
PONo = WORec<WO_LOG_CUST_PO_NO$> PONo = WORec<WO_LOG_CUST_PO_NO$>
PSNo = XLATE('WO_STEP',WONo:'*':WOStep,WO_STEP_PROD_SPEC_ID$,'X') PSNo = XLATE('WO_STEP',WONo:'*':WOStep,WO_STEP_PROD_SPEC_ID$,'X')
PSRec = XLATE('PROD_SPEC',PSNo,'','X') PSRec = XLATE('PROD_SPEC',PSNo,'','X')
CustSpecNo = '' CustSpecNo = ''
IF Captive THEN IF Captive THEN
CustSpecNos = PSRec<PROD_SPEC_SPEC_NUM$> CustSpecNos = PSRec<PROD_SPEC_SPEC_NUM$>
@ -850,7 +721,7 @@ Service GetWmOutZpl(WmOutKey)
UNTIL CustSpecNo NE '' UNTIL CustSpecNo NE ''
NEXT I NEXT I
END END
EpiPartNo = WORec<WO_LOG_EPI_PART_NO$> EpiPartNo = WORec<WO_LOG_EPI_PART_NO$>
CustEpiPartRec = XLATE('CUST_EPI_PART',CustNo:'*':EpiPartNo,'','X') CustEpiPartRec = XLATE('CUST_EPI_PART',CustNo:'*':EpiPartNo,'','X')
ShipBagReq = CustEpiPartRec<CUST_EPI_PART_SHIP_BAG_REQ$> ShipBagReq = CustEpiPartRec<CUST_EPI_PART_SHIP_BAG_REQ$>
@ -881,13 +752,13 @@ Service GetWmOutZpl(WmOutKey)
RecipeNo = XLATE( 'PROD_SPEC', PSNo, 'RECIPE_NO', 'X' ) RecipeNo = XLATE( 'PROD_SPEC', PSNo, 'RECIPE_NO', 'X' )
RecipeInfo = XLATE( 'RECIPE', RecipeNo, 'RECIPE_NAME_NO', 'X' ) RecipeInfo = XLATE( 'RECIPE', RecipeNo, 'RECIPE_NAME_NO', 'X' )
CleaningReqs = '' CleaningReqs = ''
ThickCnt = FIELDCOUNT( ThickTarget<1>, @VM ) ThickCnt = FIELDCOUNT( ThickTarget<1>, @VM )
PrintThickTargets = '' PrintThickTargets = ''
FOR J = 1 TO ThickCnt FOR J = 1 TO ThickCnt
PrintThickTargets<1,J> = ThickTarget<1,J>:ThickUnit<1,J> PrintThickTargets<1,J> = ThickTarget<1,J>:ThickUnit<1,J>
NEXT J NEXT J
ResCnt = FIELDCOUNT( ResTarget<1>, @VM ) ResCnt = FIELDCOUNT( ResTarget<1>, @VM )
PrintResTargets = '' PrintResTargets = ''
FOR J = 1 TO ResCnt FOR J = 1 TO ResCnt
@ -898,30 +769,30 @@ Service GetWmOutZpl(WmOutKey)
END END
PrintResTargets<1,J> = TargetVal:ResUnit<1,J> PrintResTargets<1,J> = TargetVal:ResUnit<1,J>
NEXT J NEXT J
APreRec = '' APreRec = ''
APostRec = '' APostRec = ''
IF ( PreAkrionRecipe<1> <> '' ) THEN IF ( PreAkrionRecipe<1> <> '' ) THEN
APreRec = ' ':PreAkrionRecipe:' ' APreRec = ' ':PreAkrionRecipe:' '
SubOxide = 'No' ;* If Akrion then no oxide strip SubOxide = 'No' ;* If Akrion then no oxide strip
END END
IF ( PostAkrionRecipe<1> <> '' ) THEN IF ( PostAkrionRecipe<1> <> '' ) THEN
APostRec = ' ':PostAkrionRecipe APostRec = ' ':PostAkrionRecipe
END END
PrintCleaningReqs = TRIM( 'Strip:':SubOxide:' Pre:':SubPreClean:APreRec:' Post:':SubPostClean:APostRec ) PrintCleaningReqs = TRIM( 'Strip:':SubOxide:' Pre:':SubPreClean:APreRec:' Post:':SubPostClean:APostRec )
swap UNIT_MICROMETER$ with 'um' in PrintThickTargets swap UNIT_MICROMETER$ with 'um' in PrintThickTargets
swap UNIT_OHM_CM$ with 'ohm.cm' in PrintThickTargets swap UNIT_OHM_CM$ with 'ohm.cm' in PrintThickTargets
swap UNIT_OHM_PER_SQ$ with 'ohm/sq' in PrintThickTargets swap UNIT_OHM_PER_SQ$ with 'ohm/sq' in PrintThickTargets
swap UNIT_A$ with 'A' in PrintThickTargets swap UNIT_A$ with 'A' in PrintThickTargets
swap UNIT_MICROMETER$ with 'um' in PrintResTargets swap UNIT_MICROMETER$ with 'um' in PrintResTargets
swap UNIT_OHM_CM$ with 'ohm.cm' in PrintResTargets swap UNIT_OHM_CM$ with 'ohm.cm' in PrintResTargets
swap UNIT_OHM_PER_SQ$ with 'ohm/sq' in PrintResTargets swap UNIT_OHM_PER_SQ$ with 'ohm/sq' in PrintResTargets
swap UNIT_A$ with 'A' in PrintResTargets swap UNIT_A$ with 'A' in PrintResTargets
MakeupBox = XLATE('WM_OUT',WMOutKey,WM_OUT_MAKEUP_BOX$ ,'X') MakeupBox = XLATE('WM_OUT',WMOutKey,WM_OUT_MAKEUP_BOX$ ,'X')
PrintWMOutKey = WMOutKey PrintWMOutKey = WMOutKey
@ -1078,5 +949,3 @@ Service GetWmOutZpl(WmOutKey)
end service end service

File diff suppressed because it is too large Load Diff

View File

@ -215,20 +215,15 @@ 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')
Begin Case Size = Field(Size, ' ' , 3, 2)
Case Index(Size, '6', 1)
Size = '6in' CONVERT ' ' TO '' IN Size
Case Index(Size, '8', 1)
Size = '8in'
Case Otherwise$
Size = ''
End Case
WONo = WO[1,'.'] WONo = WO[1,'.']
@ -330,3 +325,4 @@ REACT_DETAIL:
return return
*===============================================================================================* *===============================================================================================*

View File

@ -42,15 +42,14 @@ 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 ','
@ -58,7 +57,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, Service_Services Declare subroutine Schedule_Services
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WO_LOG' LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WO_LOG'
LogDate = Oconv(Date(), 'D4/') LogDate = Oconv(Date(), 'D4/')
@ -206,12 +205,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 unreleased, open (i.e., not received) quantities // Update released, unreleased, and received quantities
RelQty = OrigRecord<WO_LOG_REL_QTY_STATIC$> RelQty = obj_WO_Log('RelQty', Name:@RM:Record)
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
@ -219,14 +218,9 @@ WRITE_RECORD_PRE:
end end
Record<WO_LOG_UNREL_QTY_STATIC$> = UnRelQty Record<WO_LOG_UNREL_QTY_STATIC$> = UnRelQty
RxQty = OrigRecord<WO_LOG_RX_QTY_STATIC$> RXQty = obj_WO_Log('RxQty', Name:@RM:Record)
If RxQty GT NewQty then Record<WO_LOG_RX_QTY_STATIC$> = RXQty
OpenQty = 0 SaveRecord = Record
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
@ -284,7 +278,202 @@ WRITE_RECORD:
NewQty = Record<WO_LOG_QTY$> NewQty = Record<WO_LOG_QTY$>
ModifyQty = NewQty - OrigQty ModifyQty = NewQty - OrigQty
WONo = Name WONo = Name
If ModifyQty NE 0 then Service_Services('PostProcedure', 'SCHEDULE_SERVICES', 'AdjustWorkOrderScheduleQty':SD$:WONo:SD$: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
return return

View File

@ -44,17 +44,16 @@ 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 WM_OUT_EQUATES $insert RLIST_EQUATES
$Insert RLIST_EQUATES $insert IFX_EQUATES
$Insert IFX_EQUATES
Equ Comma$ to ',' Equ Comma$ to ','
@ -270,45 +269,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_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_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_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_CASS_SHIP_QTY$:@VM:WO_MAT_SHIP_SHORT$:@VM:WO_MAT_MU_WAFER_FLAG$
For each CriticalField in CriticalFields using @VM setting vPos
For each CriticalField in CriticalFields using @VM setting vPos
If ( (OrigRecord<CriticalField> NE '') and (Record<CriticalField> EQ '') ) then
If ( (OrigRecord<CriticalField> NE '') and (Record<CriticalField> EQ '') ) then WOMatFieldNos = Xlate('DICT.WO_MAT', '%FIELDS%', DICT_PART$, 'X')
WOMatFieldNos = Xlate('DICT.WO_MAT', '%FIELDS%', DICT_PART$, 'X') WOMatFieldNames = Xlate('DICT.WO_MAT', '%FIELDS%', DICT_DISPLAY$, 'X')
WOMatFieldNames = Xlate('DICT.WO_MAT', '%FIELDS%', DICT_DISPLAY$, 'X') Locate CriticalField in WOMatFieldNos using @VM setting FieldNo then
Locate CriticalField in WOMatFieldNos using @VM setting FieldNo then CriticalFieldName = WOMatFieldNames<0, FieldNo>
CriticalFieldName = WOMatFieldNames<0, FieldNo> end else
end else CriticalFieldName = 'Error determining field name'
CriticalFieldName = 'Error determining field name' end
end
Recipients = ''
Recipients = '' SentFrom = 'SYSTEM'
SentFrom = 'SYSTEM' Subject = 'WO_MAT_ACTIONS - Critical Field Erased'
Subject = 'WO_MAT_ACTIONS - Critical Field Erased' Message = OConv(Datetime(), 'DT2/^H')
Message = OConv(Datetime(), 'DT2/^H') Message<2> = 'Computer: ':@Station
Message<2> = 'Computer: ':@Station Message<3> = 'User: ':@User4
Message<3> = 'User: ':@User4 Message<4> = 'WO_MAT key: ':Name
Message<4> = 'WO_MAT key: ':Name NoteMessage = 'Readonly field ':CriticalField:' (':CriticalFieldName:') erased. Value erased ':Quote(OrigRecord<CriticalField>)
NoteMessage = 'Readonly field ':CriticalField:' (':CriticalFieldName:') erased. Value erased ':Quote(OrigRecord<CriticalField>) Message<5> = NoteMessage
Message<5> = NoteMessage Message<6> = 'Call Stack:':CRLF$:RetStack()
Message<6> = 'Call Stack:':CRLF$:RetStack() Swap @FM with \0D0A\ in Message
Swap @FM with \0D0A\ in Message Swap @VM with ',' in Message
Swap @VM with ',' in Message AttachWindow = 'WO_MAT'
AttachWindow = 'WO_MAT' AttachKey = Name
AttachKey = Name SendToGroup = 'OI_SYSADMIN'
SendToGroup = 'OI_SYSADMIN' Parms = Recipients:@RM:SentFrom:@RM:Subject:@RM:Message:@RM:AttachWindow:@RM:AttachKey:@RM:SendToGroup
Parms = Recipients:@RM:SentFrom:@RM:Subject:@RM:Message:@RM:AttachWindow:@RM:AttachKey:@RM:SendToGroup obj_Notes('Create',Parms)
obj_Notes('Create',Parms) end
end
Next CriticalField Next CriticalField
end
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
@ -611,17 +610,13 @@ 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$>
OrigVoidFlag = OrigRecord<WO_MAT_VOID$> AdjustQty = NewWfrQty - OrigWfrQty
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.
@ -629,7 +624,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.
If NewWfrQty NE 0 then Work_Order_Services('AdjustReceivedQty', WONo, NewWfrQty) 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
@ -638,47 +633,7 @@ 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.
If NewWfrQty NE 0 then Work_Order_Services('AdjustReleasedQty', WONo, NewWfrQty) 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
@ -923,7 +878,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', 'UpdateCassProcStatus':SD$:WONo:SD$:CassNo:SD$:Datetime()) Service_Services('PostProcedure', 'SCHEDULE_SERVICES', 'MarkCassProcessed':SD$:WONo:SD$:CassNo:SD$:Datetime())
end end
return return
@ -934,35 +889,6 @@ 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

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

@ -1,13 +0,0 @@
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

@ -1,13 +0,0 @@
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

@ -1,13 +0,0 @@
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

@ -1,13 +0,0 @@
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 ; // No longer used equ MATERIAL_REPORT.CASS_DELTA$ to 12
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 ; // Populated by users via the front end web app equ MATERIAL_REPORT.COMMENTS$ to 17
equ MATERIAL_REPORT.START_DTM$ to 18 equ MATERIAL_REPORT.START_DTM$ to 18
#endif #endif

View File

@ -25,4 +25,3 @@ 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,7 +154,3 @@ 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

@ -1,17 +0,0 @@
Compile Insert TIME_INSERTS
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
#IFNDEF _TIME_INSERTS_
#DEFINE _TIME_INSERTS_
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
Equ SECONDS_IN_DAY$ to 86400
Equ HOUR_IN_SECONDS$ to 3600
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
#ENDIF
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////