Merged PR 31131: Rename PM/PM_SPEC tables

This commit is contained in:
Mitchem Dakota (CSC FI SSM MAI MESLEO External)
2025-11-18 17:27:55 +00:00
parent 9749af69cf
commit 2ab25e05a3
35 changed files with 26064 additions and 1563 deletions

View File

@ -10209,7 +10209,7 @@
"<2,2,94>": { "<2,2,94>": {
"<2,2,94,1>": "R", "<2,2,94,1>": "R",
"<2,2,94,2>": "EXECUTE", "<2,2,94,2>": "EXECUTE",
"<2,2,94,3>": "LSL2*OIWINEXE**PM_SPEC", "<2,2,94,3>": "LSL2*OIWINEXE**RECURRING_TASK_SPEC",
"<2,2,94,4>": { "<2,2,94,4>": {
"<2,2,94,4,1>": "CreateParam", "<2,2,94,4,1>": "CreateParam",
"<2,2,94,4,2>": "@WINDOW" "<2,2,94,4,2>": "@WINDOW"

File diff suppressed because it is too large Load Diff

View File

@ -153,7 +153,7 @@
"<1,20>": "", "<1,20>": "",
"<1,21>": "", "<1,21>": "",
"<1,22>": "", "<1,22>": "",
"<1,23>": "PM_SPEC", "<1,23>": "RECURRING_TASK_SPEC",
"<1,24>": { "<1,24>": {
"<1,24,1>": "", "<1,24,1>": "",
"<1,24,2>": "0", "<1,24,2>": "0",
@ -470,7 +470,7 @@
"<2,20>": "", "<2,20>": "",
"<2,21>": "", "<2,21>": "",
"<2,22>": "", "<2,22>": "",
"<2,23>": "PM_SPEC", "<2,23>": "RECURRING_TASK_SPEC",
"<2,24>": "AREA", "<2,24>": "AREA",
"<2,25>": "", "<2,25>": "",
"<2,26>": "", "<2,26>": "",
@ -1496,7 +1496,7 @@
"<7,20>": "", "<7,20>": "",
"<7,21>": "", "<7,21>": "",
"<7,22>": "", "<7,22>": "",
"<7,23>": "PM_SPEC", "<7,23>": "RECURRING_TASK_SPEC",
"<7,24>": "PMS_ID", "<7,24>": "PMS_ID",
"<7,25>": "", "<7,25>": "",
"<7,26>": "", "<7,26>": "",
@ -2139,7 +2139,7 @@
"<11,20>": "", "<11,20>": "",
"<11,21>": "", "<11,21>": "",
"<11,22>": "", "<11,22>": "",
"<11,23>": "PM_SPEC", "<11,23>": "RECURRING_TASK_SPEC",
"<11,24>": "DESC", "<11,24>": "DESC",
"<11,25>": "", "<11,25>": "",
"<11,26>": "", "<11,26>": "",
@ -2429,7 +2429,7 @@
"<13,20>": "", "<13,20>": "",
"<13,21>": "", "<13,21>": "",
"<13,22>": "", "<13,22>": "",
"<13,23>": "PM_SPEC", "<13,23>": "RECURRING_TASK_SPEC",
"<13,24>": "TOOL_ID", "<13,24>": "TOOL_ID",
"<13,25>": "", "<13,25>": "",
"<13,26>": "", "<13,26>": "",
@ -2901,7 +2901,7 @@
"<16,20>": "", "<16,20>": "",
"<16,21>": "", "<16,21>": "",
"<16,22>": "", "<16,22>": "",
"<16,23>": "PM_SPEC", "<16,23>": "RECURRING_TASK_SPEC",
"<16,24>": "TOOL_ID", "<16,24>": "TOOL_ID",
"<16,25>": "", "<16,25>": "",
"<16,26>": "", "<16,26>": "",
@ -3191,7 +3191,7 @@
"<18,20>": "", "<18,20>": "",
"<18,21>": "", "<18,21>": "",
"<18,22>": "", "<18,22>": "",
"<18,23>": "PM_SPEC", "<18,23>": "RECURRING_TASK_SPEC",
"<18,24>": "TOOL_TYPE", "<18,24>": "TOOL_TYPE",
"<18,25>": "", "<18,25>": "",
"<18,26>": "", "<18,26>": "",
@ -3481,7 +3481,7 @@
"<20,20>": "", "<20,20>": "",
"<20,21>": "", "<20,21>": "",
"<20,22>": "", "<20,22>": "",
"<20,23>": "PM_SPEC", "<20,23>": "RECURRING_TASK_SPEC",
"<20,24>": "TOOL_LOCATION", "<20,24>": "TOOL_LOCATION",
"<20,25>": "", "<20,25>": "",
"<20,26>": "", "<20,26>": "",
@ -3771,7 +3771,7 @@
"<22,20>": "", "<22,20>": "",
"<22,21>": "", "<22,21>": "",
"<22,22>": "", "<22,22>": "",
"<22,23>": "PM_SPEC", "<22,23>": "RECURRING_TASK_SPEC",
"<22,24>": "TOOL_CYCLE_CNT", "<22,24>": "TOOL_CYCLE_CNT",
"<22,25>": "", "<22,25>": "",
"<22,26>": "", "<22,26>": "",
@ -3911,7 +3911,7 @@
"<23,20>": "", "<23,20>": "",
"<23,21>": "", "<23,21>": "",
"<23,22>": "", "<23,22>": "",
"<23,23>": "PM_SPEC", "<23,23>": "RECURRING_TASK_SPEC",
"<23,24>": "UNITS", "<23,24>": "UNITS",
"<23,25>": "", "<23,25>": "",
"<23,26>": "", "<23,26>": "",
@ -4212,7 +4212,7 @@
"<25,20>": "", "<25,20>": "",
"<25,21>": "", "<25,21>": "",
"<25,22>": "", "<25,22>": "",
"<25,23>": "PM_SPEC", "<25,23>": "RECURRING_TASK_SPEC",
"<25,24>": "INT_TIME_CD", "<25,24>": "INT_TIME_CD",
"<25,25>": "", "<25,25>": "",
"<25,26>": "", "<25,26>": "",
@ -4684,7 +4684,7 @@
"<28,20>": "", "<28,20>": "",
"<28,21>": "", "<28,21>": "",
"<28,22>": "", "<28,22>": "",
"<28,23>": "PM_SPEC", "<28,23>": "RECURRING_TASK_SPEC",
"<28,24>": "INTERVAL", "<28,24>": "INTERVAL",
"<28,25>": "", "<28,25>": "",
"<28,26>": "", "<28,26>": "",
@ -4974,7 +4974,7 @@
"<30,20>": "", "<30,20>": "",
"<30,21>": "", "<30,21>": "",
"<30,22>": "", "<30,22>": "",
"<30,23>": "PM_SPEC", "<30,23>": "RECURRING_TASK_SPEC",
"<30,24>": "PM_START_TIME", "<30,24>": "PM_START_TIME",
"<30,25>": "", "<30,25>": "",
"<30,26>": "", "<30,26>": "",
@ -5264,7 +5264,7 @@
"<32,20>": "", "<32,20>": "",
"<32,21>": "", "<32,21>": "",
"<32,22>": "", "<32,22>": "",
"<32,23>": "PM_SPEC", "<32,23>": "RECURRING_TASK_SPEC",
"<32,24>": "EARLY_START_DELTA", "<32,24>": "EARLY_START_DELTA",
"<32,25>": "", "<32,25>": "",
"<32,26>": "", "<32,26>": "",
@ -5554,7 +5554,7 @@
"<34,20>": "", "<34,20>": "",
"<34,21>": "", "<34,21>": "",
"<34,22>": "", "<34,22>": "",
"<34,23>": "PM_SPEC", "<34,23>": "RECURRING_TASK_SPEC",
"<34,24>": "LATE_START_DELTA", "<34,24>": "LATE_START_DELTA",
"<34,25>": "", "<34,25>": "",
"<34,26>": "", "<34,26>": "",
@ -5722,10 +5722,10 @@
"<35,21>": "", "<35,21>": "",
"<35,22>": "", "<35,22>": "",
"<35,23>": { "<35,23>": {
"<35,23,1>": "PM_SPEC", "<35,23,1>": "RECURRING_TASK_SPEC",
"<35,23,2>": "PM_SPEC", "<35,23,2>": "RECURRING_TASK_SPEC",
"<35,23,3>": "PM_SPEC", "<35,23,3>": "RECURRING_TASK_SPEC",
"<35,23,4>": "PM_SPEC" "<35,23,4>": "RECURRING_TASK_SPEC"
}, },
"<35,24>": { "<35,24>": {
"<35,24,1>": "PM_KEYS", "<35,24,1>": "PM_KEYS",
@ -6494,7 +6494,7 @@
"<38,20>": "", "<38,20>": "",
"<38,21>": "", "<38,21>": "",
"<38,22>": "", "<38,22>": "",
"<38,23>": "PM_SPEC", "<38,23>": "RECURRING_TASK_SPEC",
"<38,24>": "NOTES", "<38,24>": "NOTES",
"<38,25>": "", "<38,25>": "",
"<38,26>": "", "<38,26>": "",
@ -8651,7 +8651,7 @@
"<51,20>": "", "<51,20>": "",
"<51,21>": "", "<51,21>": "",
"<51,22>": "", "<51,22>": "",
"<51,23>": "PM_SPEC", "<51,23>": "RECURRING_TASK_SPEC",
"<51,24>": "ARCHIVED", "<51,24>": "ARCHIVED",
"<51,25>": "", "<51,25>": "",
"<51,26>": "", "<51,26>": "",
@ -8801,7 +8801,7 @@
"<52,20>": "", "<52,20>": "",
"<52,21>": "", "<52,21>": "",
"<52,22>": "", "<52,22>": "",
"<52,23>": "PM_SPEC", "<52,23>": "RECURRING_TASK_SPEC",
"<52,24>": "FIVE_S_FLAG", "<52,24>": "FIVE_S_FLAG",
"<52,25>": "", "<52,25>": "",
"<52,26>": "", "<52,26>": "",
@ -8951,7 +8951,7 @@
"<53,20>": "", "<53,20>": "",
"<53,21>": "", "<53,21>": "",
"<53,22>": "", "<53,22>": "",
"<53,23>": "PM_SPEC", "<53,23>": "RECURRING_TASK_SPEC",
"<53,24>": "SEND_DUE_NOTIFICATION", "<53,24>": "SEND_DUE_NOTIFICATION",
"<53,25>": "", "<53,25>": "",
"<53,26>": "", "<53,26>": "",
@ -9101,7 +9101,7 @@
"<54,20>": "", "<54,20>": "",
"<54,21>": "", "<54,21>": "",
"<54,22>": "", "<54,22>": "",
"<54,23>": "PM_SPEC", "<54,23>": "RECURRING_TASK_SPEC",
"<54,24>": "SEND_EARLY_NOTIFICATION", "<54,24>": "SEND_EARLY_NOTIFICATION",
"<54,25>": "", "<54,25>": "",
"<54,26>": "", "<54,26>": "",
@ -9251,7 +9251,7 @@
"<55,20>": "", "<55,20>": "",
"<55,21>": "", "<55,21>": "",
"<55,22>": "", "<55,22>": "",
"<55,23>": "PM_SPEC", "<55,23>": "RECURRING_TASK_SPEC",
"<55,24>": "SEND_LATE_NOTIFICATION", "<55,24>": "SEND_LATE_NOTIFICATION",
"<55,25>": "", "<55,25>": "",
"<55,26>": "", "<55,26>": "",
@ -9401,7 +9401,7 @@
"<56,20>": "", "<56,20>": "",
"<56,21>": "", "<56,21>": "",
"<56,22>": "", "<56,22>": "",
"<56,23>": "PM_SPEC", "<56,23>": "RECURRING_TASK_SPEC",
"<56,24>": "PM_CLASS", "<56,24>": "PM_CLASS",
"<56,25>": "", "<56,25>": "",
"<56,26>": "", "<56,26>": "",

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -21,7 +21,7 @@ typically this is the first load of a Work Order.
*/ */
#pragma precomp SRP_PreCompiler #pragma precomp SRP_PreCompiler
Declare function Gan_Services, Obj_Notes_Sent, msg, Check_Notes, Jonathan_Services, Database_Services, SRP_Datetime Declare function Gan_Services, Obj_Notes_Sent, msg, Check_Notes, Jonathan_Services, Database_Services, SRP_Datetime
Declare function Lsl_Users_Services, SRP_Time, RList, Error_Services, Obj_Wo_Mat, Pm_Services, Date_Services, Test_Run_Services Declare function Lsl_Users_Services, SRP_Time, RList, Error_Services, Obj_Wo_Mat, Recurring_Task_Services, Date_Services, Test_Run_Services
Declare function Reactor_Services, Reactor_Log_Services, obj_react_item, Utility, Environment_Services, obj_wo_log, Qa_Services Declare function Reactor_Services, Reactor_Log_Services, obj_react_item, Utility, Environment_Services, obj_wo_log, Qa_Services
Declare subroutine Start_Window, RList, Set_Status, Database_Services, Obj_Sap, Sap_Services, Btree.Extract, Qa_Services Declare subroutine Start_Window, RList, Set_Status, Database_Services, Obj_Sap, Sap_Services, Btree.Extract, Qa_Services
Declare subroutine Reactor_Services, Obj_Wo_Log, obj_wo_mat, Work_Order_Services, Material_Movement_Services, Automated_Workflow_Services Declare subroutine Reactor_Services, Obj_Wo_Log, obj_wo_mat, Work_Order_Services, Material_Movement_Services, Automated_Workflow_Services
@ -39,8 +39,8 @@ $Insert WO_MAT_QA_EQUATES
$Insert REACT_RUN_EQUATES $Insert REACT_RUN_EQUATES
$Insert RDS_LAYER_EQUATES $Insert RDS_LAYER_EQUATES
$Insert RDS_TEST_EQUATES $Insert RDS_TEST_EQUATES
$Insert PM_EQUATES $Insert RECURRING_TASK_EQUATES
$Insert PM_SPEC_EQUATES $Insert RECURRING_TASK_SPEC_EQUATES
$Insert WO_MAT_EQUATES $Insert WO_MAT_EQUATES
$Insert WM_OUT_EQUATES $Insert WM_OUT_EQUATES
$Insert TEST_RUN_EQUATES $Insert TEST_RUN_EQUATES
@ -73,7 +73,7 @@ Service CreatAWO()
VendCd = FileIn<1,8> VendCd = FileIn<1,8>
*/ */
debug debug
WOLogFileIn = 'M999930.1':@VM:'NA':@VM:'02/29/2024':@VM:'U053':@VM:'931968':@VM:'1.0':@VM:'2400':@VM:'NA' WOLogFileIn = 'M999930.1':@VM:'NA':@VM:'02/29/2024':@VM:'729622':@VM:'729628':@VM:'1.0':@VM:'2400':@VM:'NA'
RetVal = obj_WO_LOG('SAPCreate',WOLogFileIn) RetVal = obj_WO_LOG('SAPCreate',WOLogFileIn)
Response = RetVal Response = RetVal
end service end service
@ -418,3 +418,4 @@ end service

View File

@ -28,7 +28,7 @@ Tables = ""
// Big // Big
* Tables := "REACTOR_PM,REACT_ITEMS,QUARTZ_TC_LOG,WM_IN,WM_OUT,REACT_READS,WO_STEP,WO_LOG,NCR,COC," * Tables := "REACTOR_PM,REACT_ITEMS,QUARTZ_TC_LOG,WM_IN,WM_OUT,REACT_READS,WO_STEP,WO_LOG,NCR,COC,"
Tables = "PM_SPEC" Tables = "RECURRING_TASK_SPEC"
// Really big // Really big
//Tables := "TW_USE,REACTOR_LOG,REACT_RUN,REACT_UTIL,WO_MAT,RDS_LAYER,RDS_TEST,REACT_EVENT,CLEAN_INSP" //Tables := "TW_USE,REACTOR_LOG,REACT_RUN,REACT_UTIL,WO_MAT,RDS_LAYER,RDS_TEST,REACT_EVENT,CLEAN_INSP"
@ -69,3 +69,4 @@ For iTable = 1 to NumTables
Next iTable Next iTable
Return Return

View File

@ -1,53 +0,0 @@
Compile function Copy_PM_Record_To_SQL(Connection, Key, Record)
/*****************************************************************************\
Copies the given PM record to the MSSQL database.
History
-------
11/30/2016 KRF Original Programmer
\*****************************************************************************/
Declare function SQL_Write, SQL_Write_MV, SQL_Format
Ans = ""
$insert PM_EQUATES
// Parse record into a dimensioned array for speed
Dim Rec(14)
MatParse Record into Rec
// List of key names and their values
Keys = "PM_NO":@VM:SQL_Format(Key, "INT")
// List of data fields and their values
DataFields = "PMS_ID" :@VM:SQL_Format(Rec(PM_PMS_ID$), "INT"):@FM
DataFields := "ENTER_BY" :@VM:SQL_Format(Rec(PM_ENTER_BY$), "STR"):@FM
DataFields := "ENTER_DTM" :@VM:SQL_Format(Rec(PM_ENTER_DTM$), "DATETIME"):@FM
DataFields := "SCHED_DT" :@VM:SQL_Format(Rec(PM_SCHED_DT$), "DATE"):@FM
DataFields := "SCHED_TM" :@VM:SQL_Format(Rec(PM_SCHED_TM$), "TIME"):@FM
DataFields := "SCHED_QTY" :@VM:SQL_Format(Rec(PM_SCHED_QTY$), "INT"):@FM
DataFields := "NOTES" :@VM:SQL_Format(Rec(PM_NOTES$), "STR"):@FM
DataFields := "COMP_BY" :@VM:SQL_Format(Rec(PM_COMP_BY$), "STR"):@FM
DataFields := "COMP_DTM" :@VM:SQL_Format(Rec(PM_COMP_DTM$), "DATETIME"):@FM
DataFields := "START_BY" :@VM:SQL_Format(Rec(PM_START_BY$), "STR"):@FM
DataFields := "START_DTM" :@VM:SQL_Format(Rec(PM_START_DTM$), "DATETIME"):@FM
DataFields := "COMP_QTY" :@VM:SQL_Format(Rec(PM_COMP_QTY$), "INT"):@FM
// Symbolics
DataFields := "ACT_PMS_ID" :@VM:SQL_Format({ACT_PMS_ID}, "INT"):@FM
DataFields := "COMP_DT" :@VM:SQL_Format({COMP_DT}, "DATE"):@FM
DataFields := "COMP_PMS_ID" :@VM:SQL_Format({COMP_PMS_ID}, "INT"):@FM
DataFields := "STATUS" :@VM:SQL_Format({STATUS}, "STR"):@FM
DataFields := "TOOL_CYCLE_CNT" :@VM:SQL_Format({TOOL_CYCLE_CNT}, "INT"):@FM
DataFields := "TOOL_DESC" :@VM:SQL_Format({TOOL_DESC}, "STR"):@FM
DataFields := "TOOL_ID" :@VM:SQL_Format({TOOL_ID}, "STR"):@FM
DataFields := "UNITS" :@VM:SQL_Format({UNITS}, "STR")
// Write the data to the SQL database
Ans = SQL_Write(Connection, "PM", Keys, DataFields)
//-------------------------------------------------------------------------------------------------
// Multi-valued Fields
Return Ans

View File

@ -0,0 +1,54 @@
Compile function Copy_RECURRING_TASK_Record_To_SQL(Connection, Key, Record)
/*****************************************************************************\
Copies the given RECURRING_TASK record to the MSSQL database.
History
-------
11/30/2016 KRF Original Programmer
\*****************************************************************************/
Declare function SQL_Write, SQL_Write_MV, SQL_Format
Ans = ""
$insert RECURRING_TASK_EQUATES
// Parse record into a dimensioned array for speed
Dim Rec(14)
MatParse Record into Rec
// List of key names and their values
Keys = "PM_NO":@VM:SQL_Format(Key, "INT")
// List of data fields and their values
DataFields = "PMS_ID" :@VM:SQL_Format(Rec(RECURRING_TASK_PMS_ID$), "INT"):@FM
DataFields := "ENTER_BY" :@VM:SQL_Format(Rec(RECURRING_TASK_ENTER_BY$), "STR"):@FM
DataFields := "ENTER_DTM" :@VM:SQL_Format(Rec(RECURRING_TASK_ENTER_DTM$), "DATETIME"):@FM
DataFields := "SCHED_DT" :@VM:SQL_Format(Rec(RECURRING_TASK_SCHED_DT$), "DATE"):@FM
DataFields := "SCHED_TM" :@VM:SQL_Format(Rec(RECURRING_TASK_SCHED_TM$), "TIME"):@FM
DataFields := "SCHED_QTY" :@VM:SQL_Format(Rec(RECURRING_TASK_SCHED_QTY$), "INT"):@FM
DataFields := "NOTES" :@VM:SQL_Format(Rec(RECURRING_TASK_NOTES$), "STR"):@FM
DataFields := "COMP_BY" :@VM:SQL_Format(Rec(RECURRING_TASK_COMP_BY$), "STR"):@FM
DataFields := "COMP_DTM" :@VM:SQL_Format(Rec(RECURRING_TASK_COMP_DTM$), "DATETIME"):@FM
DataFields := "START_BY" :@VM:SQL_Format(Rec(RECURRING_TASK_START_BY$), "STR"):@FM
DataFields := "START_DTM" :@VM:SQL_Format(Rec(RECURRING_TASK_START_DTM$), "DATETIME"):@FM
DataFields := "COMP_QTY" :@VM:SQL_Format(Rec(RECURRING_TASK_COMP_QTY$), "INT"):@FM
// Symbolics
DataFields := "ACT_PMS_ID" :@VM:SQL_Format({ACT_PMS_ID}, "INT"):@FM
DataFields := "COMP_DT" :@VM:SQL_Format({COMP_DT}, "DATE"):@FM
DataFields := "COMP_PMS_ID" :@VM:SQL_Format({COMP_PMS_ID}, "INT"):@FM
DataFields := "STATUS" :@VM:SQL_Format({STATUS}, "STR"):@FM
DataFields := "TOOL_CYCLE_CNT" :@VM:SQL_Format({TOOL_CYCLE_CNT}, "INT"):@FM
DataFields := "TOOL_DESC" :@VM:SQL_Format({TOOL_DESC}, "STR"):@FM
DataFields := "TOOL_ID" :@VM:SQL_Format({TOOL_ID}, "STR"):@FM
DataFields := "UNITS" :@VM:SQL_Format({UNITS}, "STR")
// Write the data to the SQL database
Ans = SQL_Write(Connection, "RECURRING_TASK", Keys, DataFields)
//-------------------------------------------------------------------------------------------------
// Multi-valued Fields
Return Ans

View File

@ -1,7 +1,7 @@
Compile function Copy_PM_SPEC_Record_To_SQL(Connection, Key, Record) Compile function Copy_RECURRING_TASK_SPEC_Record_To_SQL(Connection, Key, Record)
/*****************************************************************************\ /*****************************************************************************\
Copies the given PM_SPEC record to the MSSQL database. Copies the given RECURRING_TASK_SPEC record to the MSSQL database.
History History
------- -------
@ -11,7 +11,7 @@ Compile function Copy_PM_SPEC_Record_To_SQL(Connection, Key, Record)
Declare function SQL_Write, SQL_Write_MV, SQL_Format Declare function SQL_Write, SQL_Write_MV, SQL_Format
Ans = "" Ans = ""
$insert PM_SPEC_EQUATES $insert RECURRING_TASK_SPEC_EQUATES
// Parse record into a dimensioned array for speed // Parse record into a dimensioned array for speed
Dim Rec(19) Dim Rec(19)
@ -23,10 +23,10 @@ Keys := "CASS_NO":@VM:SQL_Format(Field(Key, "*", 2), "INT"):@FM
Keys := "SLOT" :@VM:SQL_Format(Field(Key, "*", 3), "INT") Keys := "SLOT" :@VM:SQL_Format(Field(Key, "*", 3), "INT")
// List of data fields and their values // List of data fields and their values
DataFields = "SHIP_FLAG" :@VM:SQL_Format(Rec(PM_SPEC_SHIP_FLAG$), "BIT"):@FM DataFields = "SHIP_FLAG" :@VM:SQL_Format(Rec(RECURRING_TASK_SPEC_SHIP_FLAG$), "BIT"):@FM
DataFields := "GRADE" :@VM:SQL_Format(Rec(PM_SPEC_GRADE$), "STR"):@FM DataFields := "GRADE" :@VM:SQL_Format(Rec(RECURRING_TASK_SPEC_GRADE$), "STR"):@FM
DataFields := "SCRIBE" :@VM:SQL_Format(Rec(PM_SPEC_SCRIBE$), "STR"):@FM DataFields := "SCRIBE" :@VM:SQL_Format(Rec(RECURRING_TASK_SPEC_SCRIBE$), "STR"):@FM
DataFields := "GAN_RUN_ID" :@VM:SQL_Format(Rec(PM_SPEC_GAN_RUN_ID$), "STR"):@FM DataFields := "GAN_RUN_ID" :@VM:SQL_Format(Rec(RECURRING_TASK_SPEC_GAN_RUN_ID$), "STR"):@FM
// Symbolics // Symbolics
DataFields := "CARR_SLOT_ID" :@VM:SQL_Format({CARR_SLOT_ID}, "STR"):@FM DataFields := "CARR_SLOT_ID" :@VM:SQL_Format({CARR_SLOT_ID}, "STR"):@FM
@ -46,27 +46,28 @@ DataFields := "RDS_NO" :@VM:SQL_Format({RDS_NO}, "STR"):@
DataFields := "REACT_TYPE" :@VM:SQL_Format({REACT_TYPE}, "STR") DataFields := "REACT_TYPE" :@VM:SQL_Format({REACT_TYPE}, "STR")
// Write the data to the SQL database // Write the data to the SQL database
Ans = SQL_Write(Connection, "PM_SPEC", Keys, DataFields) Ans = SQL_Write(Connection, "RECURRING_TASK_SPEC", Keys, DataFields)
//------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------
// Multi-valued Fields // Multi-valued Fields
// PM_SPEC_LOGS // RECURRING_TASK_SPEC_LOGS
If Ans EQ "" AND Rec(PM_SPEC_LOC_DTM$) NE "" then If Ans EQ "" AND Rec(RECURRING_TASK_SPEC_LOC_DTM$) NE "" then
// List of data fields and their values // List of data fields and their values
MvFields = "LOC_DTM" :@FM:SQL_Format(Rec(PM_SPEC_LOC_DTM$), "DATETIME"):@RM MvFields = "LOC_DTM" :@FM:SQL_Format(Rec(RECURRING_TASK_SPEC_LOC_DTM$), "DATETIME"):@RM
MvFields := "LOC_BY" :@FM:SQL_Format(Rec(PM_SPEC_LOC_BY$), "STR"):@RM MvFields := "LOC_BY" :@FM:SQL_Format(Rec(RECURRING_TASK_SPEC_LOC_BY$), "STR"):@RM
MvFields := "LOC_EVENT":@FM:SQL_Format(Rec(PM_SPEC_LOC_EVENT$), "STR"):@RM MvFields := "LOC_EVENT":@FM:SQL_Format(Rec(RECURRING_TASK_SPEC_LOC_EVENT$), "STR"):@RM
MvFields := "SLOT_ID" :@FM:SQL_Format(Rec(PM_SPEC_SLOT_ID$), "STR"):@RM MvFields := "SLOT_ID" :@FM:SQL_Format(Rec(RECURRING_TASK_SPEC_SLOT_ID$), "STR"):@RM
MvFields := "RUN_LOC" :@FM:SQL_Format(Rec(PM_SPEC_RUN_LOC$), "STR"):@RM MvFields := "RUN_LOC" :@FM:SQL_Format(Rec(RECURRING_TASK_SPEC_RUN_LOC$), "STR"):@RM
MvFields := "NCR_NO" :@FM:SQL_Format(Rec(PM_SPEC_NCR_NO$), "STR"):@RM MvFields := "NCR_NO" :@FM:SQL_Format(Rec(RECURRING_TASK_SPEC_NCR_NO$), "STR"):@RM
MvFields := "TW_USE" :@FM:SQL_Format(Rec(PM_SPEC_TW_USE$), "STR"):@RM MvFields := "TW_USE" :@FM:SQL_Format(Rec(RECURRING_TASK_SPEC_TW_USE$), "STR"):@RM
MvFields := "DISP" :@FM:SQL_Format({DISP}, "STR") MvFields := "DISP" :@FM:SQL_Format({DISP}, "STR")
// Write the data to the SQL database // Write the data to the SQL database
Ans = SQL_Write_MV(Connection, "PM_SPEC_LOGS", Keys, MvFields) Ans = SQL_Write_MV(Connection, "RECURRING_TASK_SPEC_LOGS", Keys, MvFields)
end end
Return Ans Return Ans

View File

@ -50,7 +50,7 @@ $Insert NCR_EQUATES
$Insert REACT_RUN_EQUATES $Insert REACT_RUN_EQUATES
$Insert TOOL_EQUATES $Insert TOOL_EQUATES
$Insert TOOL_LOG_EQUATES $Insert TOOL_LOG_EQUATES
$Insert PM_EQUATES $Insert RECURRING_TASK_EQUATES
$Insert WO_WFR_EQUATES $Insert WO_WFR_EQUATES
// Reduce modes (for Select statement) // Reduce modes (for Select statement)
@ -222,3 +222,4 @@ Main:
return return

View File

@ -50,7 +50,7 @@ $Insert NCR_EQUATES
$Insert REACT_RUN_EQUATES $Insert REACT_RUN_EQUATES
$Insert TOOL_EQUATES $Insert TOOL_EQUATES
$Insert TOOL_LOG_EQUATES $Insert TOOL_LOG_EQUATES
$Insert PM_EQUATES $Insert RECURRING_TASK_EQUATES
$Insert WO_WFR_EQUATES $Insert WO_WFR_EQUATES
// Reduce modes (for Select statement) // Reduce modes (for Select statement)
@ -120,3 +120,4 @@ Main:
return return

View File

@ -50,7 +50,7 @@ $Insert NCR_EQUATES
$Insert REACT_RUN_EQUATES $Insert REACT_RUN_EQUATES
$Insert TOOL_EQUATES $Insert TOOL_EQUATES
$Insert TOOL_LOG_EQUATES $Insert TOOL_LOG_EQUATES
$Insert PM_EQUATES $Insert RECURRING_TASK_EQUATES
$Insert WO_WFR_EQUATES $Insert WO_WFR_EQUATES
$Insert RETAINED_WAFERS_EQUATES $Insert RETAINED_WAFERS_EQUATES
@ -225,3 +225,4 @@ Main:
return return

View File

@ -50,7 +50,7 @@ $Insert NCR_EQUATES
$Insert REACT_RUN_EQUATES $Insert REACT_RUN_EQUATES
$Insert TOOL_EQUATES $Insert TOOL_EQUATES
$Insert TOOL_LOG_EQUATES $Insert TOOL_LOG_EQUATES
$Insert PM_EQUATES $Insert RECURRING_TASK_EQUATES
$Insert WO_WFR_EQUATES $Insert WO_WFR_EQUATES
// Reduce modes (for Select statement) // Reduce modes (for Select statement)
@ -120,3 +120,4 @@ Main:
return return

View File

@ -13,13 +13,13 @@ DECLARE SUBROUTINE obj_Notes, Security_Err_Msg, End_Window, Forward_Event, Start
DECLARE FUNCTION Get_Property, Get_Status, Dialog_Box, Utility, Popup, Collect.Ixvals, Admin_User, Printer_Select DECLARE FUNCTION Get_Property, Get_Status, Dialog_Box, Utility, Popup, Collect.Ixvals, Admin_User, Printer_Select
DECLARE FUNCTION Send_Message, Msg, Security_Check, obj_React_Run_CI, MemberOf, Get_Printer, obj_Install,Set_Printer DECLARE FUNCTION Send_Message, Msg, Security_Check, obj_React_Run_CI, MemberOf, Get_Printer, obj_Install,Set_Printer
DECLARE FUNCTION obj_PM_Spec, NextKey, Popup, GaN_Services, Set_Property DECLARE FUNCTION obj_RECURRING_TASK_SPEC, NextKey, Popup, GaN_Services, Set_Property
$INSERT MSG_EQUATES $INSERT MSG_EQUATES
$INSERT APPCOLORS $INSERT APPCOLORS
$INSERT LSL_USERS_EQU $INSERT LSL_USERS_EQU
$INSERT SECURITY_RIGHTS_EQU $INSERT SECURITY_RIGHTS_EQU
$INSERT PM_SPEC_EQUATES $INSERT RECURRING_TASK_SPEC_EQUATES
$INSERT POPUP_EQUATES $INSERT POPUP_EQUATES
$INSERT TOOL_EQUATES $INSERT TOOL_EQUATES
$INSERT RTI_STYLE_EQUATES $INSERT RTI_STYLE_EQUATES
@ -133,8 +133,8 @@ Refresh:
GaNToolList = Get_Property(@WINDOW, 'GANTOOLLIST@') GaNToolList = Get_Property(@WINDOW, 'GANTOOLLIST@')
ToolFilter = Get_Property(@WINDOW :'.COMBO_FILTER', 'TEXT') ToolFilter = Get_Property(@WINDOW :'.COMBO_FILTER', 'TEXT')
OPEN 'PM_SPEC' TO TableIn ELSE OPEN 'RECURRING_TASK_SPEC' TO TableIn ELSE
ErrorMsg = 'Unable to open "PM_SPEC" table.' ErrorMsg = 'Unable to open "RECURRING_TASK_SPEC" table.'
PrevCursor = Set_Property("SYSTEM", "CURSOR", "A") PrevCursor = Set_Property("SYSTEM", "CURSOR", "A")
Yield() Yield()
RETURN RETURN
@ -159,9 +159,9 @@ Refresh:
UNTIL Done UNTIL Done
READ PMSpecRec FROM TableIn,PMSId THEN READ PMSpecRec FROM TableIn,PMSId THEN
ActPMKeys = PMSpecRec<PM_SPEC_PM_KEYS$> ActPMKeys = PMSpecRec<RECURRING_TASK_SPEC_PM_KEYS$>
Units = PMSpecRec<PM_SPEC_UNITS$> Units = PMSpecRec<RECURRING_TASK_SPEC_UNITS$>
ToolID = PMSpecRec<PM_SPEC_TOOL_ID$> ToolID = PMSpecRec<RECURRING_TASK_SPEC_TOOL_ID$>
ToolStatus = XLATE('TOOL',ToolID,'CURR_MODE_DESC','X') ToolStatus = XLATE('TOOL',ToolID,'CURR_MODE_DESC','X')
If ( ( (ToolID _EQC ToolFilter) or (ToolFilter EQ '') ) and (ToolStatus NE 'Out of Service') ) then If ( ( (ToolID _EQC ToolFilter) or (ToolFilter EQ '') ) and (ToolStatus NE 'Out of Service') ) then
@ -182,9 +182,9 @@ Refresh:
IF pmCnt = 0 THEN pmCnt = 1 IF pmCnt = 0 THEN pmCnt = 1
SchedStarts = obj_PM_Spec('SchedStart',PMSId:@RM:PMSpecRec) SchedStarts = obj_RECURRING_TASK_SPEC('SchedStart',PMSId:@RM:PMSpecRec)
EarlyStarts = obj_PM_Spec('EarlyStart',PMSId:@RM:PMSpecRec) EarlyStarts = obj_RECURRING_TASK_SPEC('EarlyStart',PMSId:@RM:PMSpecRec)
LateStarts = obj_PM_Spec('LateStart',PMSId:@RM:PMSpecRec) LateStarts = obj_RECURRING_TASK_SPEC('LateStart',PMSId:@RM:PMSpecRec)
FOR I = 1 TO pmCnt FOR I = 1 TO pmCnt
SchedStart = SchedStarts<1,I> SchedStart = SchedStarts<1,I>
@ -214,10 +214,10 @@ Refresh:
END CASE END CASE
LastPM = OCONV(obj_PM_Spec('LastPMCompDTM',PMSId),'DT4/^H') LastPM = OCONV(obj_RECURRING_TASK_SPEC('LastPMCompDTM',PMSId),'DT4/^H')
PMDesc = PMSpecRec<PM_SPEC_DESC$> PMDesc = PMSpecRec<RECURRING_TASK_SPEC_DESC$>
ToolID = PMSpecRec<PM_SPEC_TOOL_ID$> ToolID = PMSpecRec<RECURRING_TASK_SPEC_TOOL_ID$>
ToolDesc = XLATE('TOOL',ToolID,TOOL_TOOL_DESC$,'X') ToolDesc = XLATE('TOOL',ToolID,TOOL_TOOL_DESC$,'X')
ToolLocation = XLATE('TOOL',ToolID,'LOCATION','X') ToolLocation = XLATE('TOOL',ToolID,'LOCATION','X')
@ -245,7 +245,7 @@ Refresh:
SchedLine<1,COL$EARLY_START> = EarlyStart SchedLine<1,COL$EARLY_START> = EarlyStart
SchedLine<1,COL$SCHED_START> = SchedStart SchedLine<1,COL$SCHED_START> = SchedStart
SchedLine<1,COL$LATE_START> = LateStart SchedLine<1,COL$LATE_START> = LateStart
SchedLine<1,COL$PM_STATUS> = XLATE('PM',ActPMKeys<1,I>,'STATUS','X') ;*PMStatus SchedLine<1,COL$PM_STATUS> = XLATE('RECURRING_TASK',ActPMKeys<1,I>,'STATUS','X') ;*PMStatus
SchedList = INSERT(SchedList,Pos,0,0,SchedLine) SchedList = INSERT(SchedList,Pos,0,0,SchedLine)
SchedColors = INSERT(SchedColors,Pos,0,0,LineColor) SchedColors = INSERT(SchedColors,Pos,0,0,LineColor)
@ -279,7 +279,7 @@ SchedDC:
PMSId = RowData<COL$PMS_ID> PMSId = RowData<COL$PMS_ID>
obj_AppWindow('ViewRelated','PM_SPEC':@RM:PMSId) obj_AppWindow('ViewRelated','RECURRING_TASK_SPEC':@RM:PMSId)
GOSUB Refresh GOSUB Refresh
@ -305,7 +305,7 @@ SchedOptions:
IF PMKeys = '' OR PMKeys = CHAR(27) THEN RETURN IF PMKeys = '' OR PMKeys = CHAR(27) THEN RETURN
obj_Appwindow('ViewRelated','PM':@RM:PMKeys:@RM:@RM) obj_Appwindow('ViewRelated','RECURRING_TASK':@RM:PMKeys:@RM:@RM)
RETURN RETURN
@ -486,3 +486,5 @@ ClearFilter:
return return

View File

@ -108,12 +108,12 @@ Equ Comma$ to ','
Declare subroutine SRP_Stopwatch, Error_Services, obj_Tables, Metrology_Services, obj_RDS_Test, SRP_JSON Declare subroutine SRP_Stopwatch, Error_Services, obj_Tables, Metrology_Services, obj_RDS_Test, SRP_JSON
Declare subroutine RTI_Set_Debugger, Database_Services, Btree.Extract, Set_Status, QA_Services, obj_Notes Declare subroutine RTI_Set_Debugger, Database_Services, Btree.Extract, Set_Status, QA_Services, obj_Notes
Declare subroutine Logging_Services, SRP_Send_Mail, SRP_Run_Command, PM_Services, Httpclient_Services Declare subroutine Logging_Services, SRP_Send_Mail, SRP_Run_Command, RECURRING_TASK_Services, Httpclient_Services
Declare subroutine Tool_Services, Mona_Services, Reactor_Services, Met_Test_Services, Met_Test_Services Declare subroutine Tool_Services, Mona_Services, Reactor_Services, Met_Test_Services, Met_Test_Services
Declare function SRP_Sort_Array, Metrology_Services, obj_RDS_Test, obj_Test_Point_Map, Database_Services, UCase Declare function SRP_Sort_Array, Metrology_Services, obj_RDS_Test, obj_Test_Point_Map, Database_Services, UCase
Declare function Work_Order_Services, SRP_JSON, Logging_Services, Environment_Services, SRP_Trim, Min, Max Declare function Work_Order_Services, SRP_JSON, Logging_Services, Environment_Services, SRP_Trim, Min, Max
Declare function QA_Services, SRP_Join_Arrays, Get_Status, Obj_Clean_Insp, Datetime, SRP_Datetime Declare function QA_Services, SRP_Join_Arrays, Get_Status, Obj_Clean_Insp, Datetime, SRP_Datetime
Declare function Httpclient_Services, PM_Services, Signature_Services, SRP_Array, Math_Services Declare function Httpclient_Services, RECURRING_TASK_Services, Signature_Services, SRP_Array, Math_Services
Declare function Tool_Class_Services, obj_Wo_Mat, Met_Test_Services, Lot_Services Declare function Tool_Class_Services, obj_Wo_Mat, Met_Test_Services, Lot_Services
Declare function SRP_String Declare function SRP_String
@ -752,7 +752,7 @@ Service ImportStratusQualData(RunData, ResourceID, PSN)
Swap 'T_MID' with 'T-Mid' in PSN Swap 'T_MID' with 'T-Mid' in PSN
Swap 'T_HIGH' with 'T-High' in PSN Swap 'T_HIGH' with 'T-High' in PSN
Pass = (SumOOS EQ 0) Pass = (SumOOS EQ 0)
QualResponse = PM_Services('ProcessQual', PSN, ToolID, TimeStamp, Pass) QualResponse = RECURRING_TASK_Services('ProcessQual', PSN, ToolID, TimeStamp, Pass)
StatusCode = QualResponse<1> StatusCode = QualResponse<1>
Message = QualResponse<2> Message = QualResponse<2>
Metrology_Services('LogResults', PSN, Machine, StatusCode, Service : ' : ' : Message) Metrology_Services('LogResults', PSN, Machine, StatusCode, Service : ' : ' : Message)
@ -1014,7 +1014,7 @@ Service ImportBioRadQualData(RunData, ResourceID, PSN)
Swap 'T_MID' with 'T-Mid' in PSN Swap 'T_MID' with 'T-Mid' in PSN
Swap 'T_HIGH' with 'T-High' in PSN Swap 'T_HIGH' with 'T-High' in PSN
Pass = (SumOOS EQ 0) Pass = (SumOOS EQ 0)
QualResponse = PM_Services('ProcessQual', PSN, ToolID, TimeStamp, Pass) QualResponse = RECURRING_TASK_Services('ProcessQual', PSN, ToolID, TimeStamp, Pass)
StatusCode = QualResponse<1> StatusCode = QualResponse<1>
Message = QualResponse<2> Message = QualResponse<2>
Metrology_Services('LogResults', PSN, Machine, StatusCode, Service : ' : ' : Message) Metrology_Services('LogResults', PSN, Machine, StatusCode, Service : ' : ' : Message)
@ -1419,7 +1419,7 @@ Service ImportCDEQualData(RunData, ResourceID, PSN)
TimeStamp = RunData<3> TimeStamp = RunData<3>
If SumOOS NE '' then If SumOOS NE '' then
Pass = (SumOOS EQ 0) Pass = (SumOOS EQ 0)
QualResponse = PM_Services('ProcessQual', PSN, ToolID, TimeStamp, Pass) QualResponse = RECURRING_TASK_Services('ProcessQual', PSN, ToolID, TimeStamp, Pass)
StatusCode = QualResponse<1> StatusCode = QualResponse<1>
Message = QualResponse<2> Message = QualResponse<2>
Metrology_Services('LogResults', PSN, Machine, StatusCode, Service : ' : ' : Message) Metrology_Services('LogResults', PSN, Machine, StatusCode, Service : ' : ' : Message)
@ -1710,7 +1710,7 @@ Service ImportHgCVQualData(RunData, ResourceID, PSN)
TimeStamp = RunData<11> TimeStamp = RunData<11>
If SumOOS NE '' then If SumOOS NE '' then
Pass = (SumOOS EQ 0) Pass = (SumOOS EQ 0)
QualResponse = PM_Services('ProcessQual', PSN, ToolID, TimeStamp, Pass) QualResponse = RECURRING_TASK_Services('ProcessQual', PSN, ToolID, TimeStamp, Pass)
StatusCode = QualResponse<1> StatusCode = QualResponse<1>
Message = QualResponse<2> Message = QualResponse<2>
Metrology_Services('LogResults', PSN, Machine, StatusCode, Service : ' : ' : Message) Metrology_Services('LogResults', PSN, Machine, StatusCode, Service : ' : ' : Message)
@ -3734,3 +3734,4 @@ LoadRunDataToDatabase:
return return

View File

@ -34,13 +34,13 @@ Compile function NDW_5S_EVENTS(CtrlEntId, Event, @PARAMS)
$Insert EVENT_SETUP $Insert EVENT_SETUP
$Insert APP_INSERTS $Insert APP_INSERTS
$Insert PM_SPEC_EQUATES $Insert RECURRING_TASK_SPEC_EQUATES
$Insert PM_EQUATES $Insert RECURRING_TASK_EQUATES
$Insert MSG_EQUATES $Insert MSG_EQUATES
Declare function Get_Property, Pm_Services, obj_PM_Spec, Database_Services, SRP_Array, SRP_Datetime, Msg, Datetime Declare function Get_Property, RECURRING_TASK_Services, obj_RECURRING_TASK_SPEC, Database_Services, SRP_Array, SRP_Datetime, Msg, Datetime
Declare function Memberof Declare function Memberof
Declare subroutine Set_Property, Pm_Services, Start_Window, Obj_Appwindow, PlaceDialog Declare subroutine Set_Property, RECURRING_TASK_Services, Start_Window, Obj_Appwindow, PlaceDialog
// Columns in OLE Edit Table // Columns in OLE Edit Table
EQU COL$PM_ID TO 1 EQU COL$PM_ID TO 1
@ -146,9 +146,9 @@ Event EDT_5S_TABLE.OnButtonClick(Cell, Point, Button, Shift, Ctrl)
Verify = Msg(@Window, MsgInfo) Verify = Msg(@Window, MsgInfo)
If Verify EQ True$ then If Verify EQ True$ then
PMSID = RowData<1,COL$PM_ID> PMSID = RowData<1,COL$PM_ID>
PMSRec = Database_Services('ReadDataRow', 'PM_SPEC', PMSID) PMSRec = Database_Services('ReadDataRow', 'RECURRING_TASK_SPEC', PMSID)
CurrPMId = PMSRec<PM_SPEC_PM_KEYS$, 1> CurrPMId = PMSRec<RECURRING_TASK_SPEC_PM_KEYS$, 1>
Pm_Services('CompleteNonToolPM', CurrPMId , @User4, Datetime()) RECURRING_TASK_Services('CompleteNonToolPM', CurrPMId , @User4, Datetime())
If Error_Services('NoError') then If Error_Services('NoError') then
MsgInfo = '' MsgInfo = ''
MsgInfo<mcol$> = -2 MsgInfo<mcol$> = -2
@ -196,8 +196,8 @@ Event EDT_5S_TABLE.OnDblClick(Cell, Point, Button, Shift, Ctrl)
RowNoClicked = Field(Cell, ';' , 2) RowNoClicked = Field(Cell, ';' , 2)
RowData = TableData<RowNoClicked> RowData = TableData<RowNoClicked>
PMSID = RowData<1,COL$PM_ID> PMSID = RowData<1,COL$PM_ID>
PMSRec = Database_Services('ReadDataRow', 'PM_SPEC', PMSID) PMSRec = Database_Services('ReadDataRow', 'RECURRING_TASK_SPEC', PMSID)
CurrPMId = PMSRec<PM_SPEC_PM_KEYS$, 1> CurrPMId = PMSRec<RECURRING_TASK_SPEC_PM_KEYS$, 1>
Start_Window('NDW_PM_HISTORY', @Window, PMSID) Start_Window('NDW_PM_HISTORY', @Window, PMSID)
Case Otherwise$ Case Otherwise$
@ -207,9 +207,9 @@ Event EDT_5S_TABLE.OnDblClick(Cell, Point, Button, Shift, Ctrl)
end event end event
Event PUB_ADD_NEW_PM_SPEC.CLICK() Event PUB_ADD_NEW_RECURRING_TASK_SPEC.CLICK()
Start_Window('PM_SPEC', @Window, '') Start_Window('RECURRING_TASK_SPEC', @Window, '')
end event end event
@ -224,7 +224,7 @@ Event PUB_VIEW_SELECTED.CLICK()
Set_Property(@Window : '.EDT_SEL_ROW', 'TEXT', ''); *Clear out selected row. Set_Property(@Window : '.EDT_SEL_ROW', 'TEXT', ''); *Clear out selected row.
Set_Property(@Window : '.PUB_VIEW_SELECTED', 'ENABLED', 0) Set_Property(@Window : '.PUB_VIEW_SELECTED', 'ENABLED', 0)
if SelectedPmsKey NE '' then if SelectedPmsKey NE '' then
obj_AppWindow('ViewRelated','PM_SPEC':@RM:SelectedPmsKey) obj_AppWindow('ViewRelated','RECURRING_TASK_SPEC':@RM:SelectedPmsKey)
end end
end event end event
@ -244,7 +244,7 @@ GetKeys:
ShowArchived = Get_Property(@Window : '.CHK_ARCHIVED', 'CHECK') ShowArchived = Get_Property(@Window : '.CHK_ARCHIVED', 'CHECK')
SelectedArea = Get_Property(@Window : '.CMB_AREA', 'TEXT') SelectedArea = Get_Property(@Window : '.CMB_AREA', 'TEXT')
FiveSPMKeys = Pm_Services('Get5SPMs', ShowArchived, SelectedArea) FiveSPMKeys = RECURRING_TASK_Services('Get5SPMs', ShowArchived, SelectedArea)
FormatData: FormatData:
@ -253,19 +253,19 @@ FormatData:
For each PMKey in FiveSPMKeys using @VM setting tPos For each PMKey in FiveSPMKeys using @VM setting tPos
//Record for the PM Specification //Record for the PM Specification
PMSpecRecord = Database_Services('ReadDataRow', 'PM_SPEC', PMKey) PMSpecRecord = Database_Services('ReadDataRow', 'RECURRING_TASK_SPEC', PMKey)
//Record for the currently scheduled PM for the specificed PM Spec. //Record for the currently scheduled PM for the specificed PM Spec.
CurrPMKey = PMSpecRecord<PM_SPEC_PM_KEYS$> CurrPMKey = PMSpecRecord<RECURRING_TASK_SPEC_PM_KEYS$>
CurrPMRecord = Database_Services('ReadDataRow', 'PM', CurrPMKey) CurrPMRecord = Database_Services('ReadDataRow', 'RECURRING_TASK', CurrPMKey)
CurrPMDesc = PMSpecRecord<PM_SPEC_DESC$> CurrPMDesc = PMSpecRecord<RECURRING_TASK_SPEC_DESC$>
CurrPMLastPM = OConv(PMSpecRecord<PM_SPEC_LAST_PM_COMP_DTM$>, 'DT') CurrPMLastPM = OConv(PMSpecRecord<RECURRING_TASK_SPEC_LAST_PM_COMP_DTM$>, 'DT')
//Sched Calculation //Sched Calculation
CurrPMSchedDT = CurrPMRecord<PM_SCHED_DT$> CurrPMSchedDT = CurrPMRecord<RECURRING_TASK_SCHED_DT$>
CurrPMSchedTM = CurrPMRecord<PM_SCHED_TM$> CurrPMSchedTM = CurrPMRecord<RECURRING_TASK_SCHED_TM$>
SchedStarts = obj_PM_Spec('SchedStart',PMKey:@RM:PMSpecRecord) SchedStarts = obj_RECURRING_TASK_SPEC('SchedStart',PMKey:@RM:PMSpecRecord)
EarlyStarts = obj_PM_Spec('EarlyStart',PMKey:@RM:PMSpecRecord) EarlyStarts = obj_RECURRING_TASK_SPEC('EarlyStart',PMKey:@RM:PMSpecRecord)
LateStarts = obj_PM_Spec('LateStart',PMKey:@RM:PMSpecRecord) LateStarts = obj_RECURRING_TASK_SPEC('LateStart',PMKey:@RM:PMSpecRecord)
TableData<tPos, COL$PM_ID> = PMKey TableData<tPos, COL$PM_ID> = PMKey
TableData<tPos, COL$DESC> = CurrPMDesc TableData<tPos, COL$DESC> = CurrPMDesc
@ -302,7 +302,7 @@ ColorCodeRows:
SchedStart = '' SchedStart = ''
LateStart = '' LateStart = ''
PMSpecID = DataRow<1,COL$PM_ID> PMSpecID = DataRow<1,COL$PM_ID>
Units = XLATE('PM_SPEC', PMSpecID, PM_SPEC_UNITS$, 'X') Units = XLATE('RECURRING_TASK_SPEC', PMSpecID, RECURRING_TASK_SPEC_UNITS$, 'X')
Begin Case Begin Case
Case Units EQ 'D' Case Units EQ 'D'
EarlyStart = ICONV(DataRow<1, COL$EARLY_START>, 'D') EarlyStart = ICONV(DataRow<1, COL$EARLY_START>, 'D')
@ -405,3 +405,4 @@ Setup_OLE_Controls:
return return

View File

@ -32,12 +32,12 @@ Compile function NDW_PM_HISTORY_EVENTS(CtrlEntId, Event, @PARAMS)
#pragma precomp SRP_PreCompiler #pragma precomp SRP_PreCompiler
#window NDW_PM_HISTORY #window NDW_PM_HISTORY
Declare function Get_Property, Obj_Pm_Spec, Database_Services, SRP_Array, SRP_Datetime, Utility, OConv, Datetime Declare function Get_Property, Obj_RECURRING_TASK_SPEC, Database_Services, SRP_Array, SRP_Datetime, Utility, OConv, Datetime
Declare subroutine Set_Property, Send_Message, Msg, PlaceDialog Declare subroutine Set_Property, Send_Message, Msg, PlaceDialog
$Insert EVENT_SETUP $Insert EVENT_SETUP
$Insert PM_EQUATES $Insert RECURRING_TASK_EQUATES
$Insert PM_SPEC_EQUATES $Insert RECURRING_TASK_SPEC_EQUATES
$Insert APP_INSERTS $Insert APP_INSERTS
$Insert MSG_EQUATES $Insert MSG_EQUATES
@ -138,9 +138,9 @@ end event
RunReport: RunReport:
PMSpecId = Get_Property(@Window : '.EDL_PM_SPEC', 'TEXT') PMSpecId = Get_Property(@Window : '.EDL_PM_SPEC', 'TEXT')
PMSpecRecord = Database_Services('ReadDataRow', 'PM_SPEC', PMSpecId) PMSpecRecord = Database_Services('ReadDataRow', 'RECURRING_TASK_SPEC', PMSpecId)
PMDescription = XLATE('PM_SPEC', PMSpecId, PM_SPEC_DESC$, 'X') PMDescription = XLATE('RECURRING_TASK_SPEC', PMSpecId, RECURRING_TASK_SPEC_DESC$, 'X')
PMHistory = obj_pm_spec('GetHistory', PMSpecId);*Returns list of PM Keys delimited by @VM PMHistory = obj_RECURRING_TASK_SPEC('GetHistory', PMSpecId);*Returns list of PM Keys delimited by @VM
PMHistoryArray = '' PMHistoryArray = ''
Def = "" Def = ""
Def<MCAPTION$> = "Loading PM History..." Def<MCAPTION$> = "Loading PM History..."
@ -148,14 +148,14 @@ RunReport:
Def<MEXTENT$ > = DCount(PMHistory, @VM) Def<MEXTENT$ > = DCount(PMHistory, @VM)
MsgUp = Msg(@window, Def) MsgUp = Msg(@window, Def)
For each PMId in PMHistory using @VM setting pPos For each PMId in PMHistory using @VM setting pPos
PMRec = Database_Services('ReadDataRow', 'PM', PMId) PMRec = Database_Services('ReadDataRow', 'RECURRING_TASK', PMId)
SchedDtm = SRP_Datetime('Combine', PMRec<PM_SCHED_DT$>, PMRec<PM_SCHED_TM$>) SchedDtm = SRP_Datetime('Combine', PMRec<RECURRING_TASK_SCHED_DT$>, PMRec<RECURRING_TASK_SCHED_TM$>)
DueByDTM = obj_PM_Spec('LateStart',PMId:@RM:PMSpecRecord) DueByDTM = obj_RECURRING_TASK_SPEC('LateStart',PMId:@RM:PMSpecRecord)
PMHistoryArray<pPos, COL$PMID> = PMId PMHistoryArray<pPos, COL$PMID> = PMId
PMHistoryArray<pPos, COL$DESC> = PMDescription PMHistoryArray<pPos, COL$DESC> = PMDescription
PMHistoryArray<pPos, COL$DATECOMP> = OCONV(PMRec<PM_COMP_DTM$>, 'DT') PMHistoryArray<pPos, COL$DATECOMP> = OCONV(PMRec<RECURRING_TASK_COMP_DTM$>, 'DT')
PMHistoryArray<pPos, COL$DATEDUE> = OCONV(SchedDtm, 'DT') PMHistoryArray<pPos, COL$DATEDUE> = OCONV(SchedDtm, 'DT')
PMHistoryArray<pPos, COL$USER> = OConv(PMRec<PM_COMP_BY$>, '[XLATE_CONV,LSL_USERS*FIRST_LAST]') PMHistoryArray<pPos, COL$USER> = OConv(PMRec<RECURRING_TASK_COMP_BY$>, '[XLATE_CONV,LSL_USERS*FIRST_LAST]')
While Msg(@window, MsgUp, pPos, MSGINSTUPDATE$) ; * update the gauge and check if cancel was pressed While Msg(@window, MsgUp, pPos, MSGINSTUPDATE$) ; * update the gauge and check if cancel was pressed
Next PMId Next PMId
Msg(@window, MsgUp) ;* take down the gauge Msg(@window, MsgUp) ;* take down the gauge
@ -228,3 +228,4 @@ Setup_OLE_Controls:
return return

View File

@ -38,7 +38,7 @@ $Insert MSG_EQUATES
$Insert APPCOLORS $Insert APPCOLORS
$Insert LSL_USERS_EQU $Insert LSL_USERS_EQU
$Insert SECURITY_RIGHTS_EQU $Insert SECURITY_RIGHTS_EQU
$Insert PM_SPEC_EQUATES $Insert RECURRING_TASK_SPEC_EQUATES
$Insert POPUP_EQUATES $Insert POPUP_EQUATES
$INSERT LOGICAL $INSERT LOGICAL
$Insert TOOL_EQUATES $Insert TOOL_EQUATES
@ -60,7 +60,7 @@ EQU COL$PM_STATUS TO 11
Declare subroutine obj_Appwindow, Set_Property, Yield, Send_Message, End_Dialog, Send_Event, ErrMsg, Set_Status Declare subroutine obj_Appwindow, Set_Property, Yield, Send_Message, End_Dialog, Send_Event, ErrMsg, Set_Status
Declare subroutine Start_Window Declare subroutine Start_Window
Declare function MemberOf, Tool_Services, Send_Message, obj_PM_Spec, SRP_Array Declare function MemberOf, Tool_Services, Send_Message, obj_RECURRING_TASK_SPEC, SRP_Array
// Update the arguments so that the OpenInsight OLE event will treate the ActiveX event as a native event handler. // Update the arguments so that the OpenInsight OLE event will treate the ActiveX event as a native event handler.
If Event EQ 'OLE' then If Event EQ 'OLE' then
@ -141,7 +141,7 @@ Event SCHED.DBLCLK(CtrlKey, ShiftKey, MouseButton)
PMSId = RowData<COL$PMS_ID> PMSId = RowData<COL$PMS_ID>
obj_AppWindow('ViewRelated','PM_SPEC':@RM:PMSId) obj_AppWindow('ViewRelated','RECURRING_TASK_SPEC':@RM:PMSId)
end event end event
@ -162,7 +162,7 @@ Event SCHED.OPTIONS()
IF PMKeys = '' OR PMKeys = CHAR(27) THEN RETURN IF PMKeys = '' OR PMKeys = CHAR(27) THEN RETURN
obj_Appwindow('ViewRelated','PM':@RM:PMKeys:@RM:@RM) obj_Appwindow('ViewRelated','RECURRING_TASK':@RM:PMKeys:@RM:@RM)
end event end event
@ -184,7 +184,7 @@ end event
Event PUB_NEW_PM_SPEC.CLICK() Event PUB_NEW_PM_SPEC.CLICK()
Start_Window('PM_SPEC', @Window, '') Start_Window('RECURRING_TASK_SPEC', @Window, '')
end event end event
@ -209,14 +209,14 @@ Refresh:
ShowOOS = Get_Property(@Window:'.CHK_SHOW_OOS', 'CHECK') ShowOOS = Get_Property(@Window:'.CHK_SHOW_OOS', 'CHECK')
ShowScrubbers = Get_Property(@Window:'.CHK_SHOW_SCRUBBERS', 'CHECK') ShowScrubbers = Get_Property(@Window:'.CHK_SHOW_SCRUBBERS', 'CHECK')
Query = 'SELECT PM_SPEC WITH FIVE_S_FLAG NE 1 ' Query = 'SELECT RECURRING_TASK_SPEC WITH FIVE_S_FLAG NE 1 '
If Not(ShowArchived) then Query := 'AND WITH ARCHIVED NE 1 ' If Not(ShowArchived) then Query := 'AND WITH ARCHIVED NE 1 '
If Not(ShowScrubbers) then Query := 'AND WITH PM_CLASS NE ' : Quote('SCRUBBER') If Not(ShowScrubbers) then Query := 'AND WITH PM_CLASS NE ' : Quote('SCRUBBER')
ErrCode = '' ErrCode = ''
Set_Status(0) Set_Status(0)
RList(Query, TARGET_ACTIVELIST$, '', '', '') RList(Query, TARGET_ACTIVELIST$, '', '', '')
If Not(Get_Status(ErrCode)) then If Not(Get_Status(ErrCode)) then
Open 'PM_SPEC' to TableIn then Open 'RECURRING_TASK_SPEC' to TableIn then
Done = False$ Done = False$
SchedList = '' SchedList = ''
SchedColors = '' SchedColors = ''
@ -228,9 +228,9 @@ Refresh:
Until Done Until Done
READ PMSpecRec FROM TableIn,PMSId THEN READ PMSpecRec FROM TableIn,PMSId THEN
ActPMKeys = PMSpecRec<PM_SPEC_PM_KEYS$> ActPMKeys = PMSpecRec<RECURRING_TASK_SPEC_PM_KEYS$>
Units = PMSpecRec<PM_SPEC_UNITS$> Units = PMSpecRec<RECURRING_TASK_SPEC_UNITS$>
ToolID = PMSpecRec<PM_SPEC_TOOL_ID$> ToolID = PMSpecRec<RECURRING_TASK_SPEC_TOOL_ID$>
ToolStatus = XLATE('TOOL',ToolID,'CURR_MODE_DESC','X') ToolStatus = XLATE('TOOL',ToolID,'CURR_MODE_DESC','X')
If ( ( (ToolID _EQC ToolFilter) or (ToolFilter EQ '') ) and ( (ToolStatus NE 'Out of Service') or ShowOOS ) ) then If ( ( (ToolID _EQC ToolFilter) or (ToolFilter EQ '') ) and ( (ToolStatus NE 'Out of Service') or ShowOOS ) ) then
@ -252,9 +252,9 @@ Refresh:
IF pmCnt = 0 THEN pmCnt = 1 IF pmCnt = 0 THEN pmCnt = 1
SchedStarts = obj_PM_Spec('SchedStart',PMSId:@RM:PMSpecRec) SchedStarts = obj_RECURRING_TASK_SPEC('SchedStart',PMSId:@RM:PMSpecRec)
EarlyStarts = obj_PM_Spec('EarlyStart',PMSId:@RM:PMSpecRec) EarlyStarts = obj_RECURRING_TASK_SPEC('EarlyStart',PMSId:@RM:PMSpecRec)
LateStarts = obj_PM_Spec('LateStart',PMSId:@RM:PMSpecRec) LateStarts = obj_RECURRING_TASK_SPEC('LateStart',PMSId:@RM:PMSpecRec)
FOR I = 1 TO pmCnt FOR I = 1 TO pmCnt
SchedStart = SchedStarts<1,I> SchedStart = SchedStarts<1,I>
@ -284,10 +284,10 @@ Refresh:
END CASE END CASE
LastPM = OConv(Xlate('PM_SPEC', PMSId, 'LAST_PM_COMP_DTM', 'X'), 'DT4/^H') LastPM = OConv(Xlate('RECURRING_TASK_SPEC', PMSId, 'LAST_PM_COMP_DTM', 'X'), 'DT4/^H')
PMDesc = PMSpecRec<PM_SPEC_DESC$> PMDesc = PMSpecRec<RECURRING_TASK_SPEC_DESC$>
ToolID = PMSpecRec<PM_SPEC_TOOL_ID$> ToolID = PMSpecRec<RECURRING_TASK_SPEC_TOOL_ID$>
ToolDesc = XLATE('TOOL',ToolID,TOOL_TOOL_DESC$,'X') ToolDesc = XLATE('TOOL',ToolID,TOOL_TOOL_DESC$,'X')
ToolLocation = XLATE('TOOL',ToolID,'LOCATION','X') ToolLocation = XLATE('TOOL',ToolID,'LOCATION','X')
@ -315,7 +315,7 @@ Refresh:
SchedLine<1,COL$EARLY_START> = EarlyStart SchedLine<1,COL$EARLY_START> = EarlyStart
SchedLine<1,COL$SCHED_START> = SchedStart SchedLine<1,COL$SCHED_START> = SchedStart
SchedLine<1,COL$LATE_START> = LateStart SchedLine<1,COL$LATE_START> = LateStart
SchedLine<1,COL$PM_STATUS> = XLATE('PM',ActPMKeys<1,I>,'STATUS','X') ;*PMStatus SchedLine<1,COL$PM_STATUS> = XLATE('RECURRING_TASK',ActPMKeys<1,I>,'STATUS','X') ;*PMStatus
SchedList = INSERT(SchedList,Pos,0,0,SchedLine) SchedList = INSERT(SchedList,Pos,0,0,SchedLine)
SchedColors = INSERT(SchedColors,Pos,0,0,LineColor) SchedColors = INSERT(SchedColors,Pos,0,0,LineColor)
@ -332,7 +332,7 @@ Refresh:
stat = Send_Message(@WINDOW:'.SCHED','COLOR_BY_POS',0,I,SchedColors<I>) stat = Send_Message(@WINDOW:'.SCHED','COLOR_BY_POS',0,I,SchedColors<I>)
NEXT I NEXT I
end else end else
ErrorMsg = 'Unable to open "PM_SPEC" table.' ErrorMsg = 'Unable to open "RECURRING_TASK_SPEC" table.'
ErrMsg(ErrorMsg) ErrMsg(ErrorMsg)
end end
end else end else
@ -347,3 +347,5 @@ return

View File

@ -1,7 +1,7 @@
COMPILE FUNCTION obj_PM(Method,Parms) COMPILE FUNCTION obj_RECURRING_TASK(Method,Parms)
/* /*
Methods for PM table Methods for RECURRING_TASK table
09/29/2016 JCH - Initial Coding 09/29/2016 JCH - Initial Coding
@ -20,12 +20,12 @@ DECLARE FUNCTION Get_Status, Msg, Utility, obj_Tables, Send_Dyn, obj_Popup
DECLARE SUBROUTINE Set_Status, Msg, obj_Tables, Send_Dyn DECLARE SUBROUTINE Set_Status, Msg, obj_Tables, Send_Dyn
DECLARE SUBROUTINE ErrMsg, Btree.Extract DECLARE SUBROUTINE ErrMsg, Btree.Extract
$INSERT PM_EQUATES $INSERT RECURRING_TASK_EQUATES
EQU CRLF$ TO \0D0A\ EQU CRLF$ TO \0D0A\
EQU TAB$ TO CHAR(9) EQU TAB$ TO CHAR(9)
ErrTitle = 'Error in Stored Procedure "obj_PM"' ErrTitle = 'Error in Stored Procedure "obj_RECURRING_TASK"'
ErrorMsg = '' ErrorMsg = ''
IF NOT(ASSIGNED(Method)) THEN ErrorMsg = 'Unassigned parameter "Method" passed to subroutine' IF NOT(ASSIGNED(Method)) THEN ErrorMsg = 'Unassigned parameter "Method" passed to subroutine'
@ -60,14 +60,14 @@ RETURN Result
GetHistory: GetHistory:
* * * * * * * * * * * * * *
* This has been moved to obj_PM_Spec -> use that one and not this one. JCH * This has been moved to obj_RECURRING_TASK_Spec -> use that one and not this one. JCH
PMSId = Parms[1,@RM] PMSId = Parms[1,@RM]
IF PMSId = '' THEN RETURN IF PMSId = '' THEN RETURN
OPEN 'DICT.PM' TO DictVar ELSE OPEN 'DICT.RECURRING_TASK' TO DictVar ELSE
ErrorMsg = 'Unable to open DICT.PM for index lookup' ErrorMsg = 'Unable to open DICT.RECURRING_TASK for index lookup'
RETURN RETURN
END END
@ -79,7 +79,7 @@ Option = ''
Flag = '' Flag = ''
PMKeys = '' PMKeys = ''
Btree.Extract(Search, 'PM', DictVar, PMKeys, Option, Flag) ;* Get unsorted keys based on Search parameters Btree.Extract(Search, 'RECURRING_TASK', DictVar, PMKeys, Option, Flag) ;* Get unsorted keys based on Search parameters
* Put sort data in first column (Install DTM) * Put sort data in first column (Install DTM)
@ -87,7 +87,7 @@ WorkList = ''
pmCnt = COUNT(PMKeys,@VM) + (PMKeys NE '') pmCnt = COUNT(PMKeys,@VM) + (PMKeys NE '')
FOR I = 1 TO pmCnt FOR I = 1 TO pmCnt
PMKey = PMKeys<1,I> PMKey = PMKeys<1,I>
WorkList<I> = XLATE('PM',PMKey,PM_COMP_DTM$,'X'):@VM:pmKey WorkList<I> = XLATE('RECURRING_TASK',PMKey,RECURRING_TASK_COMP_DTM$,'X'):@VM:pmKey
NEXT I NEXT I
WorkList := @RM WorkList := @RM
@ -105,3 +105,4 @@ FOR I = 1 TO pmCnt
NEXT I NEXT I
RETURN RETURN

View File

@ -1,6 +1,6 @@
COMPILE FUNCTION obj_PM_Spec(Method,Parms) COMPILE FUNCTION obj_RECURRING_TASK_SPEC(Method,Parms)
/* /*
Methods for PM_SPEC table Methods for RECURRING_TASK_SPEC table
8/29/2016 JCH - Initial Coding 8/29/2016 JCH - Initial Coding
@ -17,8 +17,8 @@ DECLARE SUBROUTINE Set_Status, Msg, obj_Tables, RList, obj_Notes, ErrMsg, Btree
$INSERT LOGICAL $INSERT LOGICAL
$INSERT MSG_EQUATES $INSERT MSG_EQUATES
$INSERT PM_SPEC_EQUATES $INSERT RECURRING_TASK_SPEC_EQUATES
$INSERT PM_EQUATES $INSERT RECURRING_TASK_EQUATES
$INSERT RLIST_EQUATES $INSERT RLIST_EQUATES
$INSERT NOTIFICATION_EQU $INSERT NOTIFICATION_EQU
$INSERT CALIB_LIST_EQUATES $INSERT CALIB_LIST_EQUATES
@ -30,7 +30,7 @@ EQU CRLF$ TO \0D0A\
ErrCode = '' ErrCode = ''
ErrorMsg = '' ErrorMsg = ''
ErrTitle = 'Error in Stored Procedure "obj_PM_Spec"' ErrTitle = 'Error in Stored Procedure "obj_RECURRING_TASK_SPEC"'
IF NOT(ASSIGNED(Method)) THEN ErrorMsg = 'Unassigned parameter "Method" passed to subroutine' IF NOT(ASSIGNED(Method)) THEN ErrorMsg = 'Unassigned parameter "Method" passed to subroutine'
@ -73,33 +73,33 @@ SchedStart:
IF PMSpecKey = '' THEN RETURN IF PMSpecKey = '' THEN RETURN
IF PMSpecRec = '' THEN IF PMSpecRec = '' THEN
PMSpecRec = XLATE('PM_SPEC',PMSpecKey,'','X') PMSpecRec = XLATE('RECURRING_TASK_SPEC',PMSpecKey,'','X')
IF PMSpecRec = '' THEN IF PMSpecRec = '' THEN
RETURN RETURN
END END
END END
SchedUnits = PMSpecRec<PM_SPEC_UNITS$> SchedUnits = PMSpecRec<RECURRING_TASK_SPEC_UNITS$>
PMKeys = PMSpecRec<PM_SPEC_PM_KEYS$> PMKeys = PMSpecRec<RECURRING_TASK_SPEC_PM_KEYS$>
pmCnt = COUNT(PMKeys,@VM) + (PMKeys NE '') pmCnt = COUNT(PMKeys,@VM) + (PMKeys NE '')
FOR I = 1 TO pmCnt FOR I = 1 TO pmCnt
PMKey = PMKeys<1,I> PMKey = PMKeys<1,I>
PMRec = XLATE('PM',PMKey,'','X') PMRec = XLATE('RECURRING_TASK',PMKey,'','X')
SchedStart = '' SchedStart = ''
IF SchedUnits = 'D' OR SchedUnits = 'M' THEN IF SchedUnits = 'D' OR SchedUnits = 'M' THEN
SchedStart = OCONV(PMRec<PM_SCHED_DT$>,'D') SchedStart = OCONV(PMRec<RECURRING_TASK_SCHED_DT$>,'D')
END END
IF SchedUnits = 'T' THEN IF SchedUnits = 'T' THEN
ThisSchedTime = OCONV(PMRec<PM_SCHED_TM$>,'MT') ThisSchedTime = OCONV(PMRec<RECURRING_TASK_SCHED_TM$>,'MT')
if ThisSchedTime = '' then ThisSchedTime = '00:00' if ThisSchedTime = '' then ThisSchedTime = '00:00'
SchedStart = OCONV(PMRec<PM_SCHED_DT$>,'D4'):' ':ThisSchedTime SchedStart = OCONV(PMRec<RECURRING_TASK_SCHED_DT$>,'D4'):' ':ThisSchedTime
END END
IF SchedUnits = 'Q' THEN IF SchedUnits = 'Q' THEN
SchedStart = PMRec<PM_SCHED_QTY$> SchedStart = PMRec<RECURRING_TASK_SCHED_QTY$>
END END
Result<1,I> = SchedStart Result<1,I> = SchedStart
@ -118,38 +118,38 @@ EarlyStart:
IF PMSpecKey = '' THEN RETURN IF PMSpecKey = '' THEN RETURN
IF PMSpecRec = '' THEN IF PMSpecRec = '' THEN
PMSpecRec = XLATE('PM_SPEC',PMSpecKey,'','X') PMSpecRec = XLATE('RECURRING_TASK_SPEC',PMSpecKey,'','X')
IF PMSpecRec = '' THEN IF PMSpecRec = '' THEN
RETURN RETURN
END END
END END
SchedUnits = PMSpecRec<PM_SPEC_UNITS$> SchedUnits = PMSpecRec<RECURRING_TASK_SPEC_UNITS$>
PMKeys = PMSpecRec<PM_SPEC_PM_KEYS$> PMKeys = PMSpecRec<RECURRING_TASK_SPEC_PM_KEYS$>
pmCnt = COUNT(PMKeys,@VM) + (PMKeys NE '') pmCnt = COUNT(PMKeys,@VM) + (PMKeys NE '')
Delta = PMSpecRec<PM_SPEC_EARLY_START_DELTA$> ;* Delta = PMSpecRec<RECURRING_TASK_SPEC_EARLY_START_DELTA$> ;*
FOR I = 1 TO pmCnt FOR I = 1 TO pmCnt
PMKey = PMKeys<1,I> PMKey = PMKeys<1,I>
PMRec = XLATE('PM',PMKey,'','X') PMRec = XLATE('RECURRING_TASK',PMKey,'','X')
EarlyStart = '' EarlyStart = ''
IF SchedUnits = 'D' THEN IF SchedUnits = 'D' THEN
EarlyStart = OCONV(PMRec<PM_SCHED_DT$> - Delta ,'D') EarlyStart = OCONV(PMRec<RECURRING_TASK_SCHED_DT$> - Delta ,'D')
END END
If SchedUnits = 'M' then If SchedUnits = 'M' then
EarlyStart = OConv(SRP_Datetime('AddMonths', PMRec<PM_SCHED_DT$>, (-Delta)), 'D') EarlyStart = OConv(SRP_Datetime('AddMonths', PMRec<RECURRING_TASK_SCHED_DT$>, (-Delta)), 'D')
end end
IF SchedUnits = 'T' THEN IF SchedUnits = 'T' THEN
Delta = ( Delta/24 ) ;* Convert hours to decimal part of day Delta = ( Delta/24 ) ;* Convert hours to decimal part of day
SchedTM = ( PMRec<PM_SCHED_TM$> / 86400 ) ;* Sec (since midnight ) * Sec/Day => decimal part of day SchedTM = ( PMRec<RECURRING_TASK_SCHED_TM$> / 86400 ) ;* Sec (since midnight ) * Sec/Day => decimal part of day
EarlyStart = OCONV( PMRec<PM_SCHED_DT$> + ( SchedTm - Delta ) , 'DT' ) EarlyStart = OCONV( PMRec<RECURRING_TASK_SCHED_DT$> + ( SchedTm - Delta ) , 'DT' )
END END
IF SchedUnits = 'Q' THEN IF SchedUnits = 'Q' THEN
EarlyStart = PMRec<PM_SCHED_QTY$> - Delta EarlyStart = PMRec<RECURRING_TASK_SCHED_QTY$> - Delta
END END
Result<1,I> = EarlyStart Result<1,I> = EarlyStart
@ -167,38 +167,38 @@ LateStart:
IF PMSpecKey = '' THEN RETURN IF PMSpecKey = '' THEN RETURN
IF PMSpecRec = '' THEN IF PMSpecRec = '' THEN
PMSpecRec = XLATE('PM_SPEC',PMSpecKey,'','X') PMSpecRec = XLATE('RECURRING_TASK_SPEC',PMSpecKey,'','X')
IF PMSpecRec = '' THEN IF PMSpecRec = '' THEN
RETURN RETURN
END END
END END
SchedUnits = PMSpecRec<PM_SPEC_UNITS$> SchedUnits = PMSpecRec<RECURRING_TASK_SPEC_UNITS$>
PMKeys = PMSpecRec<PM_SPEC_PM_KEYS$> PMKeys = PMSpecRec<RECURRING_TASK_SPEC_PM_KEYS$>
pmCnt = COUNT(PMKeys,@VM) + (PMKeys NE '') pmCnt = COUNT(PMKeys,@VM) + (PMKeys NE '')
Delta = PMSpecRec<PM_SPEC_LATE_START_DELTA$> ;* Delta = PMSpecRec<RECURRING_TASK_SPEC_LATE_START_DELTA$> ;*
FOR I = 1 TO pmCnt FOR I = 1 TO pmCnt
PMKey = PMKeys<1,I> PMKey = PMKeys<1,I>
PMRec = XLATE('PM',PMKey,'','X') PMRec = XLATE('RECURRING_TASK',PMKey,'','X')
Start = '' Start = ''
IF SchedUnits = 'D' THEN IF SchedUnits = 'D' THEN
Start = OCONV(PMRec<PM_SCHED_DT$> + Delta ,'D') Start = OCONV(PMRec<RECURRING_TASK_SCHED_DT$> + Delta ,'D')
END END
If SchedUnits = 'M' then If SchedUnits = 'M' then
Start = OConv(SRP_Datetime('AddMonths', PMRec<PM_SCHED_DT$>, (Delta)), 'D') Start = OConv(SRP_Datetime('AddMonths', PMRec<RECURRING_TASK_SCHED_DT$>, (Delta)), 'D')
end end
IF SchedUnits = 'T' THEN IF SchedUnits = 'T' THEN
Delta = ( Delta/24 ) ;* Convert hours to decimal part of day Delta = ( Delta/24 ) ;* Convert hours to decimal part of day
SchedTM = ( PMRec<PM_SCHED_TM$> / 86400 ) ;* Sec (since midnight ) * Sec/Day => decimal part of day SchedTM = ( PMRec<RECURRING_TASK_SCHED_TM$> / 86400 ) ;* Sec (since midnight ) * Sec/Day => decimal part of day
Start = OCONV( PMRec<PM_SCHED_DT$> + ( SchedTm + Delta ) , 'DT' ) Start = OCONV( PMRec<RECURRING_TASK_SCHED_DT$> + ( SchedTm + Delta ) , 'DT' )
END END
IF SchedUnits = 'Q' THEN IF SchedUnits = 'Q' THEN
Start = PMRec<PM_SCHED_QTY$> + Delta Start = PMRec<RECURRING_TASK_SCHED_QTY$> + Delta
END END
Result<1,I> = Start Result<1,I> = Start
@ -221,9 +221,9 @@ SchedNewPM:
Swap ',' with '' in PMSID Swap ',' with '' in PMSID
Swap ',' with '' in PMNo Swap ',' with '' in PMNo
PMSpecRec = Database_Services('ReadDataRow', 'PM_SPEC', PMSID) PMSpecRec = Database_Services('ReadDataRow', 'RECURRING_TASK_SPEC', PMSID)
ToolID = Xlate('PM_SPEC', PMSID, 'TOOL_ID', 'X') ToolID = Xlate('RECURRING_TASK_SPEC', PMSID, 'TOOL_ID', 'X')
ToolMode = Xlate('TOOL', ToolID, 'CURR_MODE', 'X') ToolMode = Xlate('TOOL', ToolID, 'CURR_MODE', 'X')
If ToolMode NE 'OUT' then If ToolMode NE 'OUT' then
@ -248,7 +248,7 @@ SchedNewPM:
END END
Units = PMSpecRec<PM_SPEC_UNITS$> Units = PMSpecRec<RECURRING_TASK_SPEC_UNITS$>
IF Units = 'T' THEN IF Units = 'T' THEN
@ -269,21 +269,21 @@ SchedNewPM:
SchedTm = '' SchedTm = ''
SchedQty = '' SchedQty = ''
Interval = PMSpecRec<PM_SPEC_INTERVAL$> Interval = PMSpecRec<RECURRING_TASK_SPEC_INTERVAL$>
BEGIN CASE BEGIN CASE
CASE Units = 'D' CASE Units = 'D'
SchedDt = thisStartDt + PMSpecRec<PM_SPEC_INTERVAL$> ;* Interval is in days SchedDt = thisStartDt + PMSpecRec<RECURRING_TASK_SPEC_INTERVAL$> ;* Interval is in days
Case Units = 'M' Case Units = 'M'
SchedDt = SRP_Datetime('AddMonths', thisStartDt, PMSpecRec<PM_SPEC_INTERVAL$>) SchedDt = SRP_Datetime('AddMonths', thisStartDt, PMSpecRec<RECURRING_TASK_SPEC_INTERVAL$>)
CASE Units = 'T' CASE Units = 'T'
Interval = PMSpecRec<PM_SPEC_INTERVAL$> ;* Interval is in hours Interval = PMSpecRec<RECURRING_TASK_SPEC_INTERVAL$> ;* Interval is in hours
Interval = ( Interval/24 ) ;* Convert hours to decimal part of day Interval = ( Interval/24 ) ;* Convert hours to decimal part of day
EarlyStartDelta = (PMSpecRec<PM_SPEC_EARLY_START_DELTA$> / 24) ;* Convert hours to decimal part of day EarlyStartDelta = (PMSpecRec<RECURRING_TASK_SPEC_EARLY_START_DELTA$> / 24) ;* Convert hours to decimal part of day
PrevSchedDt = Xlate('PM', PMNo, 'SCHED_DT', 'X') PrevSchedDt = Xlate('RECURRING_TASK', PMNo, 'SCHED_DT', 'X')
PrevSchedTm = Xlate('PM', PMNo, 'SCHED_TM', 'X') PrevSchedTm = Xlate('RECURRING_TASK', PMNo, 'SCHED_TM', 'X')
PrevSchedTm = ( PrevSchedTM / 86400 ) ;* Sec (since midnight ) * Sec/Day => decimal part of day PrevSchedTm = ( PrevSchedTM / 86400 ) ;* Sec (since midnight ) * Sec/Day => decimal part of day
PrevSchedDTM = PrevSchedDt + PrevSchedTm PrevSchedDTM = PrevSchedDt + PrevSchedTm
IF PrevSchedTm EQ 0 then IF PrevSchedTm EQ 0 then
@ -325,46 +325,46 @@ SchedNewPM:
CurrDTM = ICONV(CurrDTM,'DT') CurrDTM = ICONV(CurrDTM,'DT')
If ( (PMSId EQ 653) or (PMSId EQ 654) ) then If ( (PMSId EQ 653) or (PMSId EQ 654) ) then
PMResult = Xlate('PM', PMNo, 'PASS_FAIL', 'X') PMResult = Xlate('RECURRING_TASK', PMNo, 'PASS_FAIL', 'X')
If PMResult EQ 'Pass' then If PMResult EQ 'Pass' then
// Schedule time-based PM four days from now. // Schedule time-based PM four days from now.
PMSId = 654 ;* Key to time-based PM_SPEC template PMSId = 654 ;* Key to time-based RECURRING_TASK_SPEC template
PMNo = NextKey('PM') ;* Next PMKey PMNo = NextKey('PM') ;* Next PMKey
PMRec = '' PMRec = ''
PMRec<PM_PMS_ID$> = PMSId ;* New PMRec PMRec<RECURRING_TASK_PMS_ID$> = PMSId ;* New PMRec
PMrec<PM_ENTER_BY$> = 'AUTO' ;* Automated process user PMrec<RECURRING_TASK_ENTER_BY$> = 'AUTO' ;* Automated process user
PMRec<PM_ENTER_DTM$> = CurrDTM PMRec<RECURRING_TASK_ENTER_DTM$> = CurrDTM
PMRec<PM_SCHED_DT$> = Date() + 4 PMRec<RECURRING_TASK_SCHED_DT$> = Date() + 4
PMRec<PM_SCHED_TM$> = Time() PMRec<RECURRING_TASK_SCHED_TM$> = Time()
PMRec<PM_SCHED_QTY$> = '' PMRec<RECURRING_TASK_SCHED_QTY$> = ''
end else end else
// Reset cycle counter and schedule another PM with the same interval. // Reset cycle counter and schedule another PM with the same interval.
ToolRec = Database_Services('ReadDataRow', 'TOOL', ToolID) ToolRec = Database_Services('ReadDataRow', 'TOOL', ToolID)
ToolRec<TOOL_CYCLE_CNT$> = 0 ToolRec<TOOL_CYCLE_CNT$> = 0
Database_Services('WriteDataRow', 'TOOL', ToolID, ToolRec, True$, False$, True$) Database_Services('WriteDataRow', 'TOOL', ToolID, ToolRec, True$, False$, True$)
PMSId = 653 ;* Key to run-based PM_SPEC template PMSId = 653 ;* Key to run-based RECURRING_TASK_SPEC template
PMSInterval = Xlate('PM_SPEC', PMSId, 'INTERVAL', 'X') PMSInterval = Xlate('RECURRING_TASK_SPEC', PMSId, 'INTERVAL', 'X')
PMNo = NextKey('PM') ;* Next PMKey PMNo = NextKey('RECURRING_TASK') ;* Next PMKey
PMRec = '' PMRec = ''
PMRec<PM_PMS_ID$> = PMSId ;* New PMRec PMRec<RECURRING_TASK_PMS_ID$> = PMSId ;* New PMRec
PMrec<PM_ENTER_BY$> = 'AUTO' ;* Automated process user PMrec<RECURRING_TASK_ENTER_BY$> = 'AUTO' ;* Automated process user
PMRec<PM_ENTER_DTM$> = CurrDTM PMRec<RECURRING_TASK_ENTER_DTM$> = CurrDTM
PMRec<PM_SCHED_DT$> = PMSInterval PMRec<RECURRING_TASK_SCHED_DT$> = PMSInterval
PMRec<PM_SCHED_TM$> = PMSInterval PMRec<RECURRING_TASK_SCHED_TM$> = PMSInterval
PMRec<PM_SCHED_QTY$> = PMSInterval PMRec<RECURRING_TASK_SCHED_QTY$> = PMSInterval
end end
end else end else
PMNo = NextKey('PM') ;* Next PMKey PMNo = NextKey('RECURRING_TASK') ;* Next PMKey
PMRec = '' PMRec = ''
PMRec<PM_PMS_ID$> = PMSId ;* New PMRec PMRec<RECURRING_TASK_PMS_ID$> = PMSId ;* New PMRec
PMrec<PM_ENTER_BY$> = 'AUTO' ;* Automated process user PMrec<RECURRING_TASK_ENTER_BY$> = 'AUTO' ;* Automated process user
PMRec<PM_ENTER_DTM$> = CurrDTM PMRec<RECURRING_TASK_ENTER_DTM$> = CurrDTM
PMRec<PM_SCHED_DT$> = SchedDt PMRec<RECURRING_TASK_SCHED_DT$> = SchedDt
PMRec<PM_SCHED_TM$> = SchedTm PMRec<RECURRING_TASK_SCHED_TM$> = SchedTm
PMRec<PM_SCHED_QTY$> = OCONV(SchedQty,'MD0') PMRec<RECURRING_TASK_SCHED_QTY$> = OCONV(SchedQty,'MD0')
end end
otParms = 'PM':@RM:PMNo:@RM:@RM:PMRec otParms = 'RECURRING_TASK':@RM:PMNo:@RM:@RM:PMRec
obj_Tables('WriteRec',otParms) ;* Write new PM record obj_Tables('WriteRec',otParms) ;* Write new PM record
IF Get_Status(errCode) THEN IF Get_Status(errCode) THEN
@ -384,8 +384,8 @@ GetHistory:
IF PMSId = '' THEN RETURN IF PMSId = '' THEN RETURN
OPEN 'DICT.PM' TO DictVar ELSE OPEN 'DICT.RECURRING_TASK' TO DictVar ELSE
ErrorMsg = 'Unable to open DICT.PM for index lookup' ErrorMsg = 'Unable to open DICT.RECURRING_TASK for index lookup'
RETURN RETURN
END END
@ -397,7 +397,7 @@ GetHistory:
Flag = '' Flag = ''
PMKeys = '' PMKeys = ''
Btree.Extract(Search, 'PM', DictVar, PMKeys, Option, Flag) ;* Get unsorted keys based on Search parameters Btree.Extract(Search, 'RECURRING_TASK', DictVar, PMKeys, Option, Flag) ;* Get unsorted keys based on Search parameters
* Put sort data in first column (Install DTM) * Put sort data in first column (Install DTM)
@ -433,7 +433,7 @@ LastPMCompDTM:
LOOP LOOP
PMNo = HistKeys[1,@VM] PMNo = HistKeys[1,@VM]
HistKeys[1,COL2()] = '' HistKeys[1,COL2()] = ''
CompDTM = XLATE('PM',PMNo,PM_COMP_DTM$,'X') CompDTM = XLATE('RECURRING_TASK',PMNo,PM_COMP_DTM$,'X')
UNTIL CompDTM NE '' OR HistKeys = '' UNTIL CompDTM NE '' OR HistKeys = ''
REPEAT REPEAT
@ -447,10 +447,10 @@ RETURN
SendReminders: SendReminders:
* * * * * * * * * * * * * *
RETURN ;* Update for PM_SPEC table JCH RETURN ;* Update for RECURRING_TASK_SPEC table JCH
OPEN 'PM_SPEC' TO FileIn ELSE OPEN 'RECURRING_TASK_SPEC' TO FileIn ELSE
ErrorMsg = 'Unable to open "PM_SPEC" table. (':Method:')' ErrorMsg = 'Unable to open "RECURRING_TASK_SPEC" table. (':Method:')'
RETURN RETURN
END END
@ -550,3 +550,4 @@ RETURN

View File

@ -22,7 +22,7 @@ $INSERT RLIST_EQUATES
$INSERT TOOL_LOG_EQUATES $INSERT TOOL_LOG_EQUATES
$INSERT TOOL_EQUATES $INSERT TOOL_EQUATES
$INSERT MSG_EQUATES $INSERT MSG_EQUATES
$INSERT PM_EQUATES $INSERT RECURRING_TASK_EQUATES
ErrTitle = 'Error in Stored Procedure "obj_Tool_Log"' ErrTitle = 'Error in Stored Procedure "obj_Tool_Log"'
ErrorMsg = '' ErrorMsg = ''
@ -146,12 +146,12 @@ SetMode:
obj_Tables('WriteRec', ctParms) ;* Write and unlock the record obj_Tables('WriteRec', ctParms) ;* Write and unlock the record
If NewMode EQ 'OUT' then If NewMode EQ 'OUT' then
Open 'PM' to PMHandle then Open 'RECURRING_TASK' to PMHandle then
// Remove any scheduled PM records for this TOOL ID // Remove any scheduled PM records for this TOOL ID
NewModeDt = NewModeDTM[1, 'F.'] NewModeDt = NewModeDTM[1, 'F.']
NewModeTm = (NewModeDTM[COL2()+1, 999] * 86400) NewModeTm = (NewModeDTM[COL2()+1, 999] * 86400)
NewModeTm = NewModeTm[1, 'F.'] NewModeTm = NewModeTm[1, 'F.']
Query = 'SELECT PM WITH TOOL_ID EQ "':ToolID:'" AND WITH STATUS EQ "SCHED" AND WITH SCHED_DT GE ':NewModeDt Query = 'SELECT RECURRING_TASK WITH TOOL_ID EQ "':ToolID:'" AND WITH STATUS EQ "SCHED" AND WITH SCHED_DT GE ':NewModeDt
RList(Query, TARGET_ACTIVELIST$, '', '', '' ) RList(Query, TARGET_ACTIVELIST$, '', '', '' )
@ -160,10 +160,10 @@ SetMode:
READNEXT PmID ELSE Done = 1 READNEXT PmID ELSE Done = 1
UNTIL Done UNTIL Done
READ PmRec FROM PMHandle,PmID THEN READ PmRec FROM PMHandle,PmID THEN
SchedTm = PmRec<PM_SCHED_TM$> SchedTm = PmRec<RECURRING_TASK_SCHED_TM$>
If ( ( (SchedTm NE '') and (SchedTm GE NewModeTm) ) or (SchedTm EQ '') ) then If ( ( (SchedTm NE '') and (SchedTm GE NewModeTm) ) or (SchedTm EQ '') ) then
// Remove it // Remove it
Database_Services('DeleteDataRow', 'PM', PmID, True$, False$) Database_Services('DeleteDataRow', 'RECURRING_TASK', PmID, True$, False$)
end end
END ;* End of PmRec read END ;* End of PmRec read
@ -175,3 +175,4 @@ RETURN

View File

@ -23,7 +23,7 @@ DECLARE FUNCTION Send_Message, Msg, NextKey
$INSERT MSG_EQUATES $INSERT MSG_EQUATES
$INSERT APPCOLORS $INSERT APPCOLORS
$INSERT PM_EQUATES $INSERT RECURRING_TASK_EQUATES
EQU CRLF$ TO \0D0A\ EQU CRLF$ TO \0D0A\
@ -170,7 +170,7 @@ Read:
PMId = Get_Property(@WINDOW:'.PM_ID','DEFPROP') PMId = Get_Property(@WINDOW:'.PM_ID','DEFPROP')
IF RowExists('PM',PMId) ELSE IF RowExists('RECURRING_TASK',PMId) ELSE
IF Get_Property(@WINDOW:'.ENTER_DTM','DEFPROP') = '' THEN IF Get_Property(@WINDOW:'.ENTER_DTM','DEFPROP') = '' THEN
CurrDTM = OCONV(Date(),'D4/'):' ':OCONV(Time(),'MTH') CurrDTM = OCONV(Date(),'D4/'):' ':OCONV(Time(),'MTH')
Set_Property(@WINDOW:'.ENTER_DTM','DEFPROP',CurrDTM) Set_Property(@WINDOW:'.ENTER_DTM','DEFPROP',CurrDTM)
@ -249,17 +249,16 @@ NewPM:
PMSId = Get_Property(@WINDOW:'.PMS_ID','DEFPROP') PMSId = Get_Property(@WINDOW:'.PMS_ID','DEFPROP')
IF @USER4 = '' THEN @USER4 = 'BRYCE_BARB'
Send_Event(@WINDOW,'WRITE') ;* Write current PM_SCHED record Send_Event(@WINDOW,'WRITE') ;* Write current PM_SCHED record
PMNo = NextKey('PM_SCHED') ;* Next PMKey PMNo = NextKey('PM_SCHED') ;* Next PMKey
PMRec = '' PMRec = ''
PMRec<PM_PMS_ID$> = PMSId ;* New PMRec PMRec<RECURRING_TASK_PMS_ID$> = PMSId ;* New PMRec
otParms = 'PM':@RM:PMNo:@RM:@RM:PMRec otParms = 'RECURRING_TASK':@RM:PMNo:@RM:@RM:PMRec
obj_Tables('WriteRec',otParms) ;* Write new PM record obj_Tables('WriteRec',otParms) ;* Write new PM record
IF Get_Status(errCode) THEN IF Get_Status(errCode) THEN
@ -267,9 +266,9 @@ IF Get_Status(errCode) THEN
RETURN RETURN
END END
obj_Appwindow('ViewRelated','PM':@RM:PMNo:@RM:@RM) ;* View new related PM record obj_Appwindow('ViewRelated','RECURRING_TASK':@RM:PMNo:@RM:@RM) ;* View new related PM record
Set_Property('PM','@RETURN_KEY',PMSId) Set_Property('RECURRING_TASK','@RETURN_KEY',PMSId)
@ -291,7 +290,7 @@ PMKeyList = Get_Property(CtrlEntID,'LIST')
IF PMKeyList<CurrRow,COL$PM_KEY> NE '' THEN IF PMKeyList<CurrRow,COL$PM_KEY> NE '' THEN
PMKey = PMKeyList<CurrRow,COL$PM_KEY> PMKey = PMKeyList<CurrRow,COL$PM_KEY>
obj_Appwindow('ViewRelated','PM':@RM:PMKey:@RM:@RM) obj_Appwindow('ViewRelated','RECURRING_TASK':@RM:PMKey:@RM:@RM)
END END
@ -304,3 +303,5 @@ RETURN

View File

@ -1,4 +1,4 @@
COMPILE FUNCTION PM(EntID,Event,Parm1,Parm2,Parm3,Parm4,Parm5) COMPILE FUNCTION Recurring_Task(EntID,Event,Parm1,Parm2,Parm3,Parm4,Parm5)
/* /*
Commuter module for PM (Preventive Maintenance) window Commuter module for PM (Preventive Maintenance) window
@ -6,7 +6,7 @@ COMPILE FUNCTION PM(EntID,Event,Parm1,Parm2,Parm3,Parm4,Parm5)
4/4/2016 - John C. Henry, J.C. Henry & Co., Inc. 4/4/2016 - John C. Henry, J.C. Henry & Co., Inc.
*/ */
DECLARE SUBROUTINE Set_Property, End_Dialog, Send_Event, Set_Status, obj_Tool_Log, obj_PM_Spec, PM_Services DECLARE SUBROUTINE Set_Property, End_Dialog, Send_Event, Set_Status, obj_Tool_Log, obj_RECURRING_TASK_SPEC, RECURRING_TASK_Services
DECLARE SUBROUTINE ErrMsg, Send_Message, Set_Property, Send_Event, Btree.Extract, obj_AppWindow, Error_Services DECLARE SUBROUTINE ErrMsg, Send_Message, Set_Property, Send_Event, Btree.Extract, obj_AppWindow, Error_Services
DECLARE SUBROUTINE obj_Notes, Security_Err_Msg, End_Window, Forward_Event, Start_Window, Create_Note, Post_Event DECLARE SUBROUTINE obj_Notes, Security_Err_Msg, End_Window, Forward_Event, Start_Window, Create_Note, Post_Event
@ -18,7 +18,7 @@ $INSERT MSG_EQUATES
$INSERT APPCOLORS $INSERT APPCOLORS
$INSERT LSL_USERS_EQUATES $INSERT LSL_USERS_EQUATES
$INSERT TOOL_EQUATES $INSERT TOOL_EQUATES
$INSERT PM_SPEC_EQUATES $INSERT RECURRING_TASK_SPEC_EQUATES
EQU CRLF$ TO \0D0A\ EQU CRLF$ TO \0D0A\
EQU TAB$ TO \09\ EQU TAB$ TO \09\
@ -83,7 +83,7 @@ RETURN
New: New:
* * * * * * * * * * * * * *
NextPMKey = NextKey('PM') NextPMKey = NextKey('RECURRING_TASK')
obj_AppWindow('LoadFormKeys',@WINDOW:@RM:NextPMKey) obj_AppWindow('LoadFormKeys',@WINDOW:@RM:NextPMKey)
@ -250,7 +250,7 @@ Read:
PMId = Get_Property(@WINDOW:'.PM_ID','DEFPROP') PMId = Get_Property(@WINDOW:'.PM_ID','DEFPROP')
IF RowExists('PM',PMId) ELSE IF RowExists('RECURRING_TASK',PMId) ELSE
IF Get_Property(@WINDOW:'.ENTER_DTM','DEFPROP') = '' THEN IF Get_Property(@WINDOW:'.ENTER_DTM','DEFPROP') = '' THEN
CurrDTM = OCONV(Date(),'D4/'):' ':OCONV(Time(),'MTH') CurrDTM = OCONV(Date(),'D4/'):' ':OCONV(Time(),'MTH')
Set_Property(@WINDOW:'.ENTER_DTM','DEFPROP',CurrDTM) Set_Property(@WINDOW:'.ENTER_DTM','DEFPROP',CurrDTM)
@ -274,7 +274,7 @@ StartPM:
PMNo = Get_Property(@WINDOW:'.PM_NO','DEFPROP') PMNo = Get_Property(@WINDOW:'.PM_NO','DEFPROP')
PMSId = Get_Property(@WINDOW:'.PMS_ID','DEFPROP') PMSId = Get_Property(@WINDOW:'.PMS_ID','DEFPROP')
ToolID = XLATE('PM_SPEC',PMSId,PM_SPEC_TOOL_ID$,'X') ToolID = XLATE('RECURRING_TASK_SPEC',PMSId,RECURRING_TASK_SPEC_TOOL_ID$,'X')
IF PMNo = '' OR PMSId = '' OR ToolID = '' THEN IF PMNo = '' OR PMSId = '' OR ToolID = '' THEN
ErrMsg('Incomplete record in the window') ErrMsg('Incomplete record in the window')
@ -283,7 +283,7 @@ StartPM:
SigDTM = OCONV( Date(), 'D4/' ):' ':OCONV( Time(), 'MTS' ) SigDTM = OCONV( Date(), 'D4/' ):' ':OCONV( Time(), 'MTS' )
PM_Services('StartPM', PMNo, @User4, IConv(SigDTM, 'DT')) RECURRING_TASK_Services('StartPM', PMNo, @User4, IConv(SigDTM, 'DT'))
If Error_Services('HasError') then If Error_Services('HasError') then
Error_Services('DisplayError') Error_Services('DisplayError')
@ -304,7 +304,7 @@ PMComp:
IF ToolCycleCnt = '' THEN ToolCycleCnt = '0' IF ToolCycleCnt = '' THEN ToolCycleCnt = '0'
ToolID = XLATE('PM_SPEC',PMSId,PM_SPEC_TOOL_ID$,'X') ToolID = XLATE('RECURRING_TASK_SPEC',PMSId,RECURRING_TASK_SPEC_TOOL_ID$,'X')
IF PMNo = '' OR PMSId = '' OR ToolID = '' THEN IF PMNo = '' OR PMSId = '' OR ToolID = '' THEN
ErrMsg('Incomplete record in the window') ErrMsg('Incomplete record in the window')
@ -320,7 +320,7 @@ PMComp:
SigDTM = OCONV( Date(), 'D4/' ):' ':OCONV( Time(), 'MTS' ) SigDTM = OCONV( Date(), 'D4/' ):' ':OCONV( Time(), 'MTS' )
PM_Services('CompletePM', PMNo, @User4, IConv(SigDTM, 'DT')) RECURRING_TASK_Services('CompletePM', PMNo, @User4, IConv(SigDTM, 'DT'))
If Error_Services('HasError') then If Error_Services('HasError') then
Error_Services('DisplayError') Error_Services('DisplayError')
end end
@ -329,3 +329,4 @@ PMComp:
RETURN RETURN

View File

@ -1,4 +1,4 @@
Function PM_Actions(Action, CalcColName, FSList, Handle, Name, FMC, Record, Status, OrigRecord, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10) Function RECURRING_TASK_Actions(Action, CalcColName, FSList, Handle, Name, FMC, Record, Status, OrigRecord, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10)
#pragma precomp SRP_PreCompiler #pragma precomp SRP_PreCompiler
/*********************************************************************************************************************** /***********************************************************************************************************************
@ -6,7 +6,7 @@ Function PM_Actions(Action, CalcColName, FSList, Handle, Name, FMC, Record, Stat
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written 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. permission from Infineon.
Name : PM_Actions Name : RECURRING_TASK_Actions
Description : Handles calculated columns and MFS calls for the current table. Description : Handles calculated columns and MFS calls for the current table.
@ -45,13 +45,14 @@ Function PM_Actions(Action, CalcColName, FSList, Handle, Name, FMC, Record, Stat
$insert APP_INSERTS $insert APP_INSERTS
$insert FILE.SYSTEM.EQUATES $insert FILE.SYSTEM.EQUATES
$insert ACTION_SETUP $insert ACTION_SETUP
$insert PM_EQUATES $insert RECURRING_TASK_EQUATES
$insert PM_SPEC_EQUATES $insert RECURRING_TASK_SPEC_EQUATES
$insert RLIST_EQUATES $insert RLIST_EQUATES
$insert TOOL_EQUATES
Equ Comma$ to ',' Equ Comma$ to ','
Declare function Error_Services, Database_Services, Environment_Services, Obj_Pm_Spec Declare function Error_Services, Database_Services, Environment_Services, Obj_RECURRING_TASK_SPEC
Declare function SRP_Array, SRP_Datetime Declare function SRP_Array, SRP_Datetime
Declare subroutine Error_Services, Database_Services, Environment_Services, Logging_Services Declare subroutine Error_Services, Database_Services, Environment_Services, Logging_Services
Declare subroutine RList Declare subroutine RList
@ -98,18 +99,57 @@ CalculateColumn:
ActionFlow = '' ActionFlow = ''
Begin Case Begin Case
Case CalcColName EQ 'ACT_PMS_ID' ; GoSub ACT_PMS_ID
Case CalcColName EQ 'COMP_DT' ; GoSub COMP_DT
Case CalcColName EQ 'COMP_PMS_ID' ; GoSub COMP_PMS_ID
Case CalcColName EQ 'LATE' ; GoSub LATE Case CalcColName EQ 'LATE' ; GoSub LATE
Case CalcColName EQ 'PM_DESC' ; GoSub PM_DESC
Case CalcColName EQ 'STATUS' ; GoSub STATUS
Case CalcColName EQ 'TOOL_CYCLE_CNT' ; GoSub TOOL_CYCLE_CNT
Case CalcColName EQ 'TOOL_DESC' ; GoSub TOOL_DESC
Case CalcColName EQ 'TOOL_ID' ; GoSub TOOL_ID
Case CalcColName EQ 'UNITS' ; GoSub UNITS
End Case End Case
return return
ACT_PMS_ID:
Ans = ''
IF @RECORD<RECURRING_TASK_COMP_DTM$> = '' THEN
Ans = @RECORD<RECURRING_TASK_PMS_ID$>
END
ActionFlow = Ans
return
COMP_DT:
CompDTM = @RECORD<10>
ActionFlow = CompDTM[1, '.']
return
COMP_PMS_ID:
Ans = ''
IF @RECORD<RECURRING_TASK_COMP_DTM$> NE '' THEN
Ans = @RECORD<RECURRING_TASK_PMS_ID$>
END
ActionFlow = Ans
return
LATE: LATE:
Late = False$ Late = False$
PMSID = {PMS_ID} PMSID = {PMS_ID}
PMSpecRecord = Database_Services('ReadDataRow', 'PM_SPEC', PMSID) PMSpecRecord = Database_Services('ReadDataRow', 'RECURRING_TASK_SPEC', PMSID)
Units = {UNITS} Units = {UNITS}
SchedUnits = PMSpecRecord<PM_SPEC_UNITS$> SchedUnits = PMSpecRecord<RECURRING_TASK_SPEC_UNITS$>
Delta = PMSpecRecord<PM_SPEC_LATE_START_DELTA$> ;* Delta = PMSpecRecord<RECURRING_TASK_SPEC_LATE_START_DELTA$> ;*
PMKey = @ID PMKey = @ID
Start = '' Start = ''
@ -141,6 +181,51 @@ LATE:
ActionFlow = Late ActionFlow = Late
return return
PM_DESC:
ActionFlow = XLATE('RECURRING_TASK_SPEC',@RECORD<1>,'DESC','X')
return
STATUS:
StartBy = @RECORD<11>
CompBy = @RECORD<9>
BEGIN CASE
CASE StartBy = '' ; Ans = 'SCHED'
CASE CompBy = '' ; Ans = 'START'
CASE 1 ; Ans = 'COMP'
END CASE
ActionFlow = Ans
return
TOOL_CYCLE_CNT:
ActionFlow = XLATE( 'TOOL' , {TOOL_ID} , TOOL_CYCLE_CNT$ , 'X' )
return
TOOL_DESC:
ActionFlow = XLATE('TOOL' , {TOOL_ID} , TOOL_TOOL_DESC$,'X')
return
TOOL_ID:
ActionFlow = XLATE('RECURRING_TASK_SPEC',@RECORD<1>,'TOOL_ID','X')
return
UNITS:
ActionFlow = XLATE('RECURRING_TASK_SPEC', @RECORD<RECURRING_TASK_PMS_ID$> , RECURRING_TASK_SPEC_UNITS$ , 'X' )
return
// ----- MFS calls ----------------------------------------------------------------------------------------------------- // ----- MFS calls -----------------------------------------------------------------------------------------------------
READ_RECORD_PRE: READ_RECORD_PRE:
@ -246,3 +331,4 @@ Restore_System_Variables:
return return

View File

@ -1,10 +1,10 @@
Compile function PM_Services(@Service, @Params) Compile function RECURRING_TASK_Services(@Service, @Params)
#pragma precomp SRP_PreCompiler #pragma precomp SRP_PreCompiler
$Insert APP_INSERTS $Insert APP_INSERTS
$Insert SERVICE_SETUP $Insert SERVICE_SETUP
$Insert PM_EQUATES $Insert RECURRING_TASK_EQUATES
$Insert PM_SPEC_EQUATES $Insert RECURRING_TASK_SPEC_EQUATES
$Insert TOOL_EQUATES $Insert TOOL_EQUATES
EQU COL$PMSKEY TO 1 EQU COL$PMSKEY TO 1
@ -13,10 +13,10 @@ EQU COL$NOTIFICAITON TO 3
EQU COL$DUEBY To 4 EQU COL$DUEBY To 4
EQU COL$CURRPMKEY To 5 EQU COL$CURRPMKEY To 5
Declare subroutine Database_Services, Error_Services, Set_Status, obj_PM_Spec, Tool_Services, Btree.Extract Declare subroutine Database_Services, Error_Services, Set_Status, obj_RECURRING_TASK_SPEC, Tool_Services, Btree.Extract
Declare subroutine Logging_Services, Pm_Services, RList, Obj_Notes, PM_Spec_Services Declare subroutine Logging_Services, RECURRING_TASK_Services, RList, Obj_Notes, RECURRING_TASK_SPEC_Services
Declare function Datetime, Database_Services, Error_Services, obj_PM_Spec, obj_Tool, Environment_Services, LCASE Declare function Datetime, Database_Services, Error_Services, obj_RECURRING_TASK_SPEC, obj_Tool, Environment_Services, LCASE
Declare function Logging_Services, Pm_Services, NextKey, SRP_Datetime, Lsl_Users_Services, Active_Directory_Services Declare function Logging_Services, RECURRING_TASK_Services, NextKey, SRP_Datetime, Lsl_Users_Services, Active_Directory_Services
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\Tool' LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\Tool'
LogDate = Oconv(Date(), 'D4/') LogDate = Oconv(Date(), 'D4/')
@ -63,12 +63,12 @@ Service StartPM(PMNo, UserID, StartDTM)
If PMNo NE '' then If PMNo NE '' then
If UserID EQ '' then UserID = @User4 If UserID EQ '' then UserID = @User4
If StartDTM EQ '' then StartDTM = Datetime() If StartDTM EQ '' then StartDTM = Datetime()
PMRec = Database_Services('ReadDataRow', 'PM', PMNo) PMRec = Database_Services('ReadDataRow', 'RECURRING_TASK', PMNo)
If Error_Services('NoError') then If Error_Services('NoError') then
PMSNo = PMRec<PM_PMS_ID$> PMSNo = PMRec<RECURRING_TASK_PMS_ID$>
ToolID = Xlate('PM_SPEC', PMSNo, PM_SPEC_TOOL_ID$, 'X') ToolID = Xlate('RECURRING_TASK_SPEC', PMSNo, RECURRING_TASK_SPEC_TOOL_ID$, 'X')
If ( (PMSNo NE '') and (ToolID NE '') ) then If ( (PMSNo NE '') and (ToolID NE '') ) then
EarlyStartDTM = IConv(Xlate('PM_SPEC', PMSNo, 'EARLY_START', 'X'), 'DT') EarlyStartDTM = IConv(Xlate('RECURRING_TASK_SPEC', PMSNo, 'EARLY_START', 'X'), 'DT')
If StartDTM GE EarlyStartDTM then If StartDTM GE EarlyStartDTM then
// Only change the tool mode if the tool is in one of the modes listed in the APP_INFO*QUAL_CHANGE_MODES // Only change the tool mode if the tool is in one of the modes listed in the APP_INFO*QUAL_CHANGE_MODES
// record! This is to preserve other tool modes as the current mode such as SCHED_MTC. // record! This is to preserve other tool modes as the current mode such as SCHED_MTC.
@ -86,9 +86,9 @@ Service StartPM(PMNo, UserID, StartDTM)
Logging_Services('AppendLog', objLog, LogData, @RM, @FM) Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
end end
If Error_Services('NoError') then If Error_Services('NoError') then
PMRec<PM_START_BY$> = UserID PMRec<RECURRING_TASK_START_BY$> = UserID
PMRec<PM_START_DTM$> = StartDTM PMRec<RECURRING_TASK_START_DTM$> = StartDTM
Database_Services('WriteDataRow', 'PM', PMNo, PMRec, True$, False$, True$) Database_Services('WriteDataRow', 'RECURRING_TASK', PMNo, PMRec, True$, False$, True$)
end else end else
Error_Services('Add', 'Error in ':Service:' service. Error calling Tool_Services("ChangeToolMode") Error code: ':Error_Services('GetMessage')) Error_Services('Add', 'Error in ':Service:' service. Error calling Tool_Services("ChangeToolMode") Error code: ':Error_Services('GetMessage'))
end end
@ -98,7 +98,7 @@ Service StartPM(PMNo, UserID, StartDTM)
end end
end else end else
// Null PMSNo or ToolID error // Null PMSNo or ToolID error
Error_Services('Add', 'Error in ':Service:' service. Null PM_SPEC ID or ToolID for PMNo ':PMNo:'.') Error_Services('Add', 'Error in ':Service:' service. Null RECURRING_TASK_SPEC ID or ToolID for PMNo ':PMNo:'.')
end end
end end
end else end else
@ -112,24 +112,24 @@ End Service
Service CompletePM(PMNo, UserID, CompDTM) Service CompletePM(PMNo, UserID, CompDTM)
If PMNo NE '' then If PMNo NE '' then
PMRec = Database_Services('ReadDataRow', 'PM', PMNo) PMRec = Database_Services('ReadDataRow', 'RECURRING_TASK', PMNo)
If Error_Services('NoError') then If Error_Services('NoError') then
PMSNo = PMRec<PM_PMS_ID$> PMSNo = PMRec<RECURRING_TASK_PMS_ID$>
ToolID = Xlate('PM_SPEC', PMSNo, PM_SPEC_TOOL_ID$, 'X') ToolID = Xlate('RECURRING_TASK_SPEC', PMSNo, RECURRING_TASK_SPEC_TOOL_ID$, 'X')
If ( (PMSNo NE '') and (ToolID NE '') ) then If ( (PMSNo NE '') and (ToolID NE '') ) then
If UserID EQ '' then UserID = @User4 If UserID EQ '' then UserID = @User4
If CompDTM EQ '' then CompDTM = Datetime() If CompDTM EQ '' then CompDTM = Datetime()
ToolCycleCnt = Xlate('PM_SPEC', PMSNo, 'TOOL_CYCLE_CNT', 'X') ToolCycleCnt = Xlate('RECURRING_TASK_SPEC', PMSNo, 'TOOL_CYCLE_CNT', 'X')
If ToolCycleCnt EQ '' then ToolCycleCnt = '0' If ToolCycleCnt EQ '' then ToolCycleCnt = '0'
Overdue = False$ Overdue = False$
// Scan for other overdue quals. Only place tool into PROD if all quals are complete. // Scan for other overdue quals. Only place tool into PROD if all quals are complete.
Open 'DICT.PM_SPEC' to PMSDict then Open 'DICT.RECURRING_TASK_SPEC' to PMSDict then
ToolPMSpecKeys = '' ToolPMSpecKeys = ''
Option = '' Option = ''
Flag = '' Flag = ''
// Ignore archived PM_SPEC! // Ignore archived RECURRING_TASK_SPEC!
Query = 'TOOL_ID':@VM:ToolID:@FM:'ARCHIVED':@VM:'#1':@FM Query = 'TOOL_ID':@VM:ToolID:@FM:'ARCHIVED':@VM:'#1':@FM
Btree.Extract(Query, 'PM_SPEC', PMSDict, ToolPMSpecKeys, Option, Flag) Btree.Extract(Query, 'RECURRING_TASK_SPEC', PMSDict, ToolPMSpecKeys, Option, Flag)
If Flag EQ 0 then If Flag EQ 0 then
If ToolPMSpecKeys NE '' then If ToolPMSpecKeys NE '' then
Today = Date() Today = Date()
@ -137,10 +137,10 @@ Service CompletePM(PMNo, UserID, CompDTM)
CurrCnt = XLATE('TOOL', ToolID, TOOL_CYCLE_CNT$, 'X') CurrCnt = XLATE('TOOL', ToolID, TOOL_CYCLE_CNT$, 'X')
For each PMSpecKey in ToolPMSpecKeys using @VM For each PMSpecKey in ToolPMSpecKeys using @VM
If PMSpecKey NE PMSNo then If PMSpecKey NE PMSNo then
// Check for overdue qual PM for this PM_SPEC // Check for overdue qual PM for this RECURRING_TASK_SPEC
PMSpecRec = Database_Services('ReadDataRow', 'PM_SPEC', PMSpecKey) PMSpecRec = Database_Services('ReadDataRow', 'RECURRING_TASK_SPEC', PMSpecKey)
ActPMKeys = PMSpecRec<PM_SPEC_PM_KEYS$> ActPMKeys = PMSpecRec<RECURRING_TASK_SPEC_PM_KEYS$>
Units = PMSpecRec<PM_SPEC_UNITS$> Units = PMSpecRec<RECURRING_TASK_SPEC_UNITS$>
Conv = '' Conv = ''
If Units = 'D' then Conv = 'D' If Units = 'D' then Conv = 'D'
If Units = 'T' then Conv = 'DT' If Units = 'T' then Conv = 'DT'
@ -155,9 +155,9 @@ Service CompletePM(PMNo, UserID, CompDTM)
If pmCnt = 0 then pmCnt = 1 If pmCnt = 0 then pmCnt = 1
SchedStarts = obj_PM_Spec('SchedStart',PMSpecKey:@RM:PMSpecRec) SchedStarts = obj_RECURRING_TASK_SPEC('SchedStart',PMSpecKey:@RM:PMSpecRec)
EarlyStarts = obj_PM_Spec('EarlyStart',PMSpecKey:@RM:PMSpecRec) EarlyStarts = obj_RECURRING_TASK_SPEC('EarlyStart',PMSpecKey:@RM:PMSpecRec)
LateStarts = obj_PM_Spec('LateStart', PMSpecKey:@RM:PMSpecRec) LateStarts = obj_RECURRING_TASK_SPEC('LateStart', PMSpecKey:@RM:PMSpecRec)
For I = 1 to pmCnt For I = 1 to pmCnt
SchedStart = SchedStarts<1,I> SchedStart = SchedStarts<1,I>
@ -189,10 +189,10 @@ Service CompletePM(PMNo, UserID, CompDTM)
If Not(Overdue) then If Not(Overdue) then
NewMode = 'PROD' NewMode = 'PROD'
Reason = 'PM No. ':PMNo:' completed.' Reason = 'RECURRING_TASK No. ':PMNo:' completed.'
end else end else
NewMode = 'QUAL_OVERDUE' NewMode = 'QUAL_OVERDUE'
Reason = 'PM No. ':PMNo:' completed, but another qual is overdue.' Reason = 'RECURRING_TASK No. ':PMNo:' completed, but another qual is overdue.'
end end
// Only change the tool mode if the tool is in one of the modes listed in the APP_INFO*QUAL_CHANGE_MODES // Only change the tool mode if the tool is in one of the modes listed in the APP_INFO*QUAL_CHANGE_MODES
@ -210,31 +210,31 @@ Service CompletePM(PMNo, UserID, CompDTM)
end end
If Error_Services('NoError') then If Error_Services('NoError') then
PMRec<PM_COMP_BY$> = UserID PMRec<RECURRING_TASK_COMP_BY$> = UserID
PMRec<PM_COMP_DTM$> = CompDTM PMRec<RECURRING_TASK_COMP_DTM$> = CompDTM
PMRec<PM_COMP_QTY$> = ToolCycleCnt PMRec<RECURRING_TASK_COMP_QTY$> = ToolCycleCnt
Database_Services('WriteDataRow', 'PM', PMNo, PMRec, True$, False$, True$) Database_Services('WriteDataRow', 'RECURRING_TASK', PMNo, PMRec, True$, False$, True$)
If Error_Services('NoError') then If Error_Services('NoError') then
// Update Last PM Comp DTM in PM_SPEC record // Update Last PM Comp DTM in RECURRING_TASK_SPEC record
PM_Spec_Services('UpdatePMCompDtm', PMSNo) RECURRING_TASK_SPEC_Services('UpdatePMCompDtm', PMSNo)
If Error_Services('NoError') then If Error_Services('NoError') then
Set_Status(0) Set_Status(0)
ErrCode = '' ErrCode = ''
obj_PM_Spec('SchedNewPM',PMSNo:@RM:OCONV(Date(),'D4'):@RM:OCONV(Time(),'MTS'):@RM:ToolCycleCnt:@RM:PMNo) obj_RECURRING_TASK_SPEC('SchedNewPM',PMSNo:@RM:OCONV(Date(),'D4'):@RM:OCONV(Time(),'MTS'):@RM:ToolCycleCnt:@RM:PMNo)
If Get_Status(ErrCode) then If Get_Status(ErrCode) then
ErrorMsg = 'Error in ':Service:' service. Error calling obj_PM_Spec("SchedNewPM") for ' ErrorMsg = 'Error in ':Service:' service. Error calling obj_RECURRING_TASK_SPEC("SchedNewPM") for '
ErrorMsg := 'PM_SPEC ':PMSNo:' and PM ':PMNo:'. Error code: ':ErrCode ErrorMsg := 'RECURRING_TASK_SPEC ':PMSNo:' and RECURRING_TASK ':PMNo:'. Error code: ':ErrCode
Error_Services('Add', ErrorMsg) Error_Services('Add', ErrorMsg)
end end
end end
end end
end else end else
ErrorMsg = 'Error in ':Service:' service. Error calling Tool_Services("ChangeToolMode") ' ErrorMsg = 'Error in ':Service:' service. Error calling Tool_Services("ChangeToolMode") '
ErrorMsg := 'PM ':PMNo:' for PM_SPEC ':PMSNo:' not completed! Error code: ':Error_Services('GetMessage') ErrorMsg := 'RECURRING_TASK ':PMNo:' for RECURRING_TASK_SPEC ':PMSNo:' not completed! Error code: ':Error_Services('GetMessage')
Error_Services('Add', ErrorMsg) Error_Services('Add', ErrorMsg)
end end
end else end else
Error_Services('Add', 'Error in ':Service:' service. Null PM_SPEC ID or ToolID for PMNo ':PMNo:'.') Error_Services('Add', 'Error in ':Service:' service. Null RECURRING_TASK_SPEC ID or ToolID for PMNo ':PMNo:'.')
end end
end end
end else end else
@ -249,28 +249,28 @@ Service CompleteNonToolPM(PMNo, UserID, CurrDTM)
If PMNo NE '' then If PMNo NE '' then
If UserID EQ '' then UserID = @User4 If UserID EQ '' then UserID = @User4
If CurrDTM EQ '' then StartDTM = Datetime() If CurrDTM EQ '' then StartDTM = Datetime()
PMRec = Database_Services('ReadDataRow', 'PM', PMNo) PMRec = Database_Services('ReadDataRow', 'RECURRING_TASK', PMNo)
PMSNo = PMRec<PM_PMS_ID$> PMSNo = PMRec<RECURRING_TASK_PMS_ID$>
If Error_Services('NoError') then If Error_Services('NoError') then
EarlyStartDTM = IConv(Xlate('PM_SPEC', PMSNo, 'EARLY_START', 'X'), 'DT') EarlyStartDTM = IConv(Xlate('RECURRING_TASK_SPEC', PMSNo, 'EARLY_START', 'X'), 'DT')
If CurrDTM GE EarlyStartDTM then If CurrDTM GE EarlyStartDTM then
PMRec<PM_START_BY$> = UserID PMRec<RECURRING_TASK_START_BY$> = UserID
PMRec<PM_START_DTM$> = CurrDTM PMRec<RECURRING_TASK_START_DTM$> = CurrDTM
PMRec<PM_COMP_BY$> = UserID PMRec<RECURRING_TASK_COMP_BY$> = UserID
PMRec<PM_COMP_DTM$> = CurrDTM PMRec<RECURRING_TASK_COMP_DTM$> = CurrDTM
PMRec<PM_COMP_QTY$> = 0 PMRec<RECURRING_TASK_COMP_QTY$> = 0
Database_Services('WriteDataRow', 'PM', PMNo, PMRec, True$, False$, True$) Database_Services('WriteDataRow', 'RECURRING_TASK', PMNo, PMRec, True$, False$, True$)
If Error_Services('NoError') then If Error_Services('NoError') then
// Update Last PM Comp DTM in PM_SPEC record // Update Last PM Comp DTM in RECURRING_TASK_SPEC record
PM_Spec_Services('UpdatePMCompDtm', PMSNo) RECURRING_TASK_SPEC_Services('UpdatePMCompDtm', PMSNo)
If Error_Services('NoError') then If Error_Services('NoError') then
Set_Status(0) Set_Status(0)
ErrCode = '' ErrCode = ''
obj_PM_Spec('SchedNewPM',PMSNo:@RM:OCONV(Date(),'D4'):@RM:OCONV(Time(),'MTS'):@RM:0:@RM:PMNo) obj_RECURRING_TASK_SPEC('SchedNewPM',PMSNo:@RM:OCONV(Date(),'D4'):@RM:OCONV(Time(),'MTS'):@RM:0:@RM:PMNo)
//Pm_Services('ScheduleNextPM', PMSNo, PMNo) //Recurring_Task_Services('ScheduleNextPM', PMSNo, PMNo)
If Error_Services('HasError') then If Error_Services('HasError') then
ErrorMsg = 'Error in ':Service:' service. Error calling obj_PM_Spec("SchedNewPM") for ' ErrorMsg = 'Error in ':Service:' service. Error calling obj_RECURRING_TASK_SPEC("SchedNewPM") for '
ErrorMsg := 'PM_SPEC ':PMSNo:' and PM ':PMNo:'. Error code: ':ErrCode ErrorMsg := 'RECURRING_TASK_SPEC ':PMSNo:' and RECURRING_TASK ':PMNo:'. Error code: ':ErrCode
Error_Services('Add', ErrorMsg) Error_Services('Add', ErrorMsg)
end end
end end
@ -299,21 +299,21 @@ Service MonitorQuals()
NotScheduled = False$ NotScheduled = False$
ReadV OrigPMStatus from hTool, ToolID, TOOL_PM_STATUS$ then ReadV OrigPMStatus from hTool, ToolID, TOOL_PM_STATUS$ then
Open 'DICT.PM_SPEC' to PMSDict then Open 'DICT.RECURRING_TASK_SPEC' to PMSDict then
ToolPMSpecKeys = '' ToolPMSpecKeys = ''
Option = '' Option = ''
Flag = '' Flag = ''
Query = 'TOOL_ID':@VM:ToolID:@FM:'ARCHIVED':@VM:'#1':@FM Query = 'TOOL_ID':@VM:ToolID:@FM:'ARCHIVED':@VM:'#1':@FM
Btree.Extract(Query, 'PM_SPEC', PMSDict, ToolPMSpecKeys, Option, Flag) Btree.Extract(Query, 'RECURRING_TASK_SPEC', PMSDict, ToolPMSpecKeys, Option, Flag)
If Flag EQ 0 then If Flag EQ 0 then
If ToolPMSpecKeys NE '' then If ToolPMSpecKeys NE '' then
Today = Date() Today = Date()
CurrDtm = ICONV(OCONV(Date(),'D'):' ':OCONV(Time(),'MT'), 'DT' ) CurrDtm = ICONV(OCONV(Date(),'D'):' ':OCONV(Time(),'MT'), 'DT' )
CurrCnt = XLATE('TOOL', ToolID, TOOL_CYCLE_CNT$, 'X') CurrCnt = XLATE('TOOL', ToolID, TOOL_CYCLE_CNT$, 'X')
For each PMSpecKey in ToolPMSpecKeys using @VM For each PMSpecKey in ToolPMSpecKeys using @VM
PMSpecRec = Database_Services('ReadDataRow', 'PM_SPEC', PMSpecKey) PMSpecRec = Database_Services('ReadDataRow', 'RECURRING_TASK_SPEC', PMSpecKey)
ActPMKeys = PMSpecRec<PM_SPEC_PM_KEYS$> ActPMKeys = PMSpecRec<RECURRING_TASK_SPEC_PM_KEYS$>
Units = PMSpecRec<PM_SPEC_UNITS$> Units = PMSpecRec<RECURRING_TASK_SPEC_UNITS$>
Conv = '' Conv = ''
If Units = 'D' then Conv = 'D' If Units = 'D' then Conv = 'D'
If Units = 'T' then Conv = 'DT' If Units = 'T' then Conv = 'DT'
@ -328,9 +328,9 @@ Service MonitorQuals()
If pmCnt = 0 then pmCnt = 1 If pmCnt = 0 then pmCnt = 1
SchedStarts = obj_PM_Spec('SchedStart',PMSpecKey:@RM:PMSpecRec) SchedStarts = obj_RECURRING_TASK_SPEC('SchedStart',PMSpecKey:@RM:PMSpecRec)
EarlyStarts = obj_PM_Spec('EarlyStart',PMSpecKey:@RM:PMSpecRec) EarlyStarts = obj_RECURRING_TASK_SPEC('EarlyStart',PMSpecKey:@RM:PMSpecRec)
LateStarts = obj_PM_Spec('LateStart', PMSpecKey:@RM:PMSpecRec) LateStarts = obj_RECURRING_TASK_SPEC('LateStart', PMSpecKey:@RM:PMSpecRec)
For I = 1 to pmCnt For I = 1 to pmCnt
SchedStart = SchedStarts<1,I> SchedStart = SchedStarts<1,I>
@ -375,7 +375,7 @@ Service MonitorQuals()
CurrMode = Xlate('TOOL', ToolID, 'CURR_MODE', 'X')<1,1> CurrMode = Xlate('TOOL', ToolID, 'CURR_MODE', 'X')<1,1>
ServiceModes = 'PROD':@FM:'LIM':@FM:'VER' ServiceModes = 'PROD':@FM:'LIM':@FM:'VER'
Locate CurrMode in ServiceModes using @FM setting fPos then Locate CurrMode in ServiceModes using @FM setting fPos then
PMDesc = PMSpecRec<PM_SPEC_DESC$> PMDesc = PMSpecRec<RECURRING_TASK_SPEC_DESC$>
Reason = 'Verification not performed.' Reason = 'Verification not performed.'
Tool_Services('ChangeToolMode', ToolID, 'QUAL_OVERDUE', Reason, 'OI_ADMIN', True$) Tool_Services('ChangeToolMode', ToolID, 'QUAL_OVERDUE', Reason, 'OI_ADMIN', True$)
end end
@ -399,7 +399,7 @@ Service MonitorQuals()
end else end else
// No PM_SPEC records defined for this tool // No RECURRING_TASK_SPEC records defined for this tool
If OrigPMStatus _NEC 'NOT_SCHEDULED' then If OrigPMStatus _NEC 'NOT_SCHEDULED' then
// Only write the column if the PM status has changed. // Only write the column if the PM status has changed.
WriteV 'NOT_SCHEDULED' on hTool, ToolID, TOOL_PM_STATUS$ else null WriteV 'NOT_SCHEDULED' on hTool, ToolID, TOOL_PM_STATUS$ else null
@ -421,18 +421,18 @@ Service FailedPM(PMNo, UserID, StartDTM)
If UserID EQ '' then UserID = @User4 If UserID EQ '' then UserID = @User4
If StartDTM EQ '' then StartDTM = Datetime() If StartDTM EQ '' then StartDTM = Datetime()
PMRec = Database_Services('ReadDataRow', 'PM', PMNo) PMRec = Database_Services('ReadDataRow', 'RECURRING_TASK', PMNo)
If Error_Services('NoError') then If Error_Services('NoError') then
PMSNo = PMRec<PM_PMS_ID$> PMSNo = PMRec<RECURRING_TASK_PMS_ID$>
ToolID = Xlate('PM_SPEC', PMSNo, PM_SPEC_TOOL_ID$, 'X') ToolID = Xlate('RECURRING_TASK_SPEC', PMSNo, RECURRING_TASK_SPEC_TOOL_ID$, 'X')
If ( (PMSNo NE '') and (ToolID NE '') ) then If ( (PMSNo NE '') and (ToolID NE '') ) then
EarlyStartDTM = IConv(Xlate('PM_SPEC', PMSNo, 'EARLY_START', 'X'), 'DT') EarlyStartDTM = IConv(Xlate('RECURRING_TASK_SPEC', PMSNo, 'EARLY_START', 'X'), 'DT')
If StartDTM GE EarlyStartDTM then If StartDTM GE EarlyStartDTM then
// Only change the tool mode if the tool is in one of the modes listed in the APP_INFO*QUAL_CHANGE_MODES // Only change the tool mode if the tool is in one of the modes listed in the APP_INFO*QUAL_CHANGE_MODES
// record! This is to preserve other tool modes as the current mode such as SCHED_MTC. // record! This is to preserve other tool modes as the current mode such as SCHED_MTC.
CurrMode = Xlate('TOOL', ToolID, 'CURR_MODE', 'X')<1,1> CurrMode = Xlate('TOOL', ToolID, 'CURR_MODE', 'X')<1,1>
Locate CurrMode in ChangeModes using @FM setting fPos then Locate CurrMode in ChangeModes using @FM setting fPos then
Reason = 'PM No. ':PMNo:' Failed' Reason = 'RECURRING_TASK No. ':PMNo:' Failed'
NewMode = 'VER_FAILED' NewMode = 'VER_FAILED'
Tool_Services('ChangeToolMode', ToolID, NewMode, Reason, UserID, True$) Tool_Services('ChangeToolMode', ToolID, NewMode, Reason, UserID, True$)
end else end else
@ -458,17 +458,17 @@ Service ProcessQual(PSN, ToolID, CompDtm, Pass)
Message = '' Message = ''
If ( (PSN NE '') and (ToolID NE '') and (CompDtm NE '') and (Pass NE '') ) then If ( (PSN NE '') and (ToolID NE '') and (CompDtm NE '') and (Pass NE '') ) then
// Find scheduled PM for this qual check. // Find scheduled PM for this qual check.
// There should only be one PM_SPEC defined for this qual check at this time. // There should only be one RECURRING_TASK_SPEC defined for this qual check at this time.
Option = '' Option = ''
Flag = '' Flag = ''
PMSpecKeyID = '' PMSpecKeyID = ''
Open 'DICT.PM_SPEC' to PmsDict then Open 'DICT.RECURRING_TASK_SPEC' to PmsDict then
Query = 'TOOL_ID':@VM:ToolID:@FM:'DESC':@VM:'[':PSN:']':@FM:'ARCHIVED':@VM:'#1':@FM Query = 'TOOL_ID':@VM:ToolID:@FM:'DESC':@VM:'[':PSN:']':@FM:'ARCHIVED':@VM:'#1':@FM
Btree.Extract(Query, 'PM_SPEC', PmsDict, PMSpecKeyID, '', Flag) Btree.Extract(Query, 'RECURRING_TASK_SPEC', PmsDict, PMSpecKeyID, '', Flag)
CurrPMKey = '' CurrPMKey = ''
If Flag EQ 0 then If Flag EQ 0 then
If PMSpecKeyID NE '' then If PMSpecKeyID NE '' then
CurrPMKey = Xlate('PM_SPEC', PMSpecKeyID, 'PM_KEYS', 'X') CurrPMKey = Xlate('RECURRING_TASK_SPEC', PMSpecKeyID, 'PM_KEYS', 'X')
If CurrPMKey NE '' then If CurrPMKey NE '' then
CompDtm[-3, 1] = '' CompDtm[-3, 1] = ''
PMDtm = IConv(CompDtm, 'DT') PMDtm = IConv(CompDtm, 'DT')
@ -478,12 +478,12 @@ Service ProcessQual(PSN, ToolID, CompDtm, Pass)
If Pass then If Pass then
// The qual files do not contain which user performed the qual check, so just use OI_ADMIN for now. // The qual files do not contain which user performed the qual check, so just use OI_ADMIN for now.
// The qual files only contain the complete datetime. Use it for both the start and complete datetime. // The qual files only contain the complete datetime. Use it for both the start and complete datetime.
PM_Services('StartPM', CurrPMKey, 'OI_ADMIN', PMDtm) RECURRING_TASK_Services('StartPM', CurrPMKey, 'OI_ADMIN', PMDtm)
If Error_Services('NoError') then If Error_Services('NoError') then
PM_Services('CompletePM', CurrPMKey, 'OI_ADMIN', PMDtm) RECURRING_TASK_Services('CompletePM', CurrPMKey, 'OI_ADMIN', PMDtm)
If Error_Services('NoError') then If Error_Services('NoError') then
StatusCode = 'UID000' StatusCode = 'UID000'
Message = Service : ' : PM ':CurrPMKey:' for PM_SPEC ':PMSpecKeyID:' completed successfully.' Message = Service : ' : RECURRING_TASK ':CurrPMKey:' for RECURRING_TASK_SPEC ':PMSpecKeyID:' completed successfully.'
end else end else
StatusCode = 'UID002' StatusCode = 'UID002'
Message = Service : ' : ' : Error_Services('GetMessage') Message = Service : ' : ' : Error_Services('GetMessage')
@ -494,7 +494,7 @@ Service ProcessQual(PSN, ToolID, CompDtm, Pass)
end end
end else end else
// Failing Qual // Failing Qual
PM_Services('FailedPM', CurrPMKey, 'OI_ADMIN', PMDtm) RECURRING_TASK_Services('FailedPM', CurrPMKey, 'OI_ADMIN', PMDtm)
If Error_Services('NoError') then If Error_Services('NoError') then
StatusCode = 'UID001' StatusCode = 'UID001'
Message = 'Qual fail for ':ToolID:' ':PSN:'. Qual NOT marked complete.' Message = 'Qual fail for ':ToolID:' ':PSN:'. Qual NOT marked complete.'
@ -505,11 +505,11 @@ Service ProcessQual(PSN, ToolID, CompDtm, Pass)
end end
end else end else
StatusCode = 'UID001' StatusCode = 'UID001'
Message = 'No scheduled PM found for ':ToolID:' ':PSN:'.' Message = 'No scheduled RECURRING_TASK found for ':ToolID:' ':PSN:'.'
end end
end else end else
StatusCode = 'UID001' StatusCode = 'UID001'
Message = 'No PM_SPEC record found for ':ToolID:' ':PSN:'.' Message = 'No RECURRING_TASK_SPEC record found for ':ToolID:' ':PSN:'.'
end end
end else end else
StatusCode = 'UID002' StatusCode = 'UID002'
@ -517,7 +517,7 @@ Service ProcessQual(PSN, ToolID, CompDtm, Pass)
end end
end else end else
StatusCode = 'UID002' StatusCode = 'UID002'
Message = 'Error opening DICT.PM_SPEC.' Message = 'Error opening DICT.RECURRING_TASK_SPEC.'
end end
end else end else
@ -533,7 +533,7 @@ Service Get5SPMs(ShowArchived=BOOLEAN, Area=AREAS)
Flag = '' Flag = ''
keylist = '' keylist = ''
Query = '' Query = ''
Open 'DICT.PM_SPEC' to PmsDict then Open 'DICT.RECURRING_TASK_SPEC' to PmsDict then
if Not(ShowArchived) then if Not(ShowArchived) then
Query := 'ARCHIVED':@VM:'#1':@FM Query := 'ARCHIVED':@VM:'#1':@FM
end end
@ -542,7 +542,7 @@ Service Get5SPMs(ShowArchived=BOOLEAN, Area=AREAS)
end end
Query := 'FIVE_S_FLAG':@VM:True$:@FM Query := 'FIVE_S_FLAG':@VM:True$:@FM
Btree.Extract(Query, 'PM_SPEC', PmsDict, keylist, '', Flag) Btree.Extract(Query, 'RECURRING_TASK_SPEC', PmsDict, keylist, '', Flag)
end end
Response = keylist Response = keylist
@ -554,14 +554,14 @@ Service GetScrubberPMs(ShowArchived=BOOLEAN)
Flag = '' Flag = ''
keylist = '' keylist = ''
Query = '' Query = ''
Open 'DICT.PM_SPEC' to PmsDict then Open 'DICT.RECURRING_TASK_SPEC' to PmsDict then
if NOT(ShowArchived) then if NOT(ShowArchived) then
Query := 'PM_CLASS':@VM:'SCRUBBER':@FM Query := 'PM_CLASS':@VM:'SCRUBBER':@FM
Query := 'ARCHIVED':@VM:'#1':@FM Query := 'ARCHIVED':@VM:'#1':@FM
end else end else
Query := 'PM_CLASS':@VM:'SCRUBBER':@FM Query := 'PM_CLASS':@VM:'SCRUBBER':@FM
end end
Btree.Extract(Query, 'PM_SPEC', PmsDict, keylist, '', Flag) Btree.Extract(Query, 'RECURRING_TASK_SPEC', PmsDict, keylist, '', Flag)
end end
Response = keylist Response = keylist
@ -574,22 +574,22 @@ Service ScheduleNextPM(PMSID, PMNo, StartQty)
CurrDTM = Datetime() CurrDTM = Datetime()
CurrDt = Date() CurrDt = Date()
PMSpecRec = Database_Services('ReadDataRow', 'PM_SPEC', PMSID) PMSpecRec = Database_Services('ReadDataRow', 'RECURRING_TASK_SPEC', PMSID)
Interval = PMSpecRec<PM_SPEC_INTERVAL$> Interval = PMSpecRec<RECURRING_TASK_SPEC_INTERVAL$>
Units = PMSpecRec<PM_SPEC_UNITS$> Units = PMSpecRec<RECURRING_TASK_SPEC_UNITS$>
thisStartQty = ICONV(StartQty,'MD0') thisStartQty = ICONV(StartQty,'MD0')
SchedDt = '' SchedDt = ''
SchedTm = '' SchedTm = ''
SchedQty = '' SchedQty = ''
BEGIN CASE BEGIN CASE
CASE Units = 'D' CASE Units = 'D'
//SchedDt = CurrDTM + PMSpecRec<PM_SPEC_INTERVAL$> ;* Interval is in days //SchedDt = CurrDTM + PMSpecRec<RECURRING_TASK_SPEC_INTERVAL$> ;* Interval is in days
SchedDt = SRP_Datetime('AddDays', CurrDt, Interval) SchedDt = SRP_Datetime('AddDays', CurrDt, Interval)
CASE Units = 'T' CASE Units = 'T'
Interval = PMSpecRec<PM_SPEC_INTERVAL$> ;* Interval is in hours Interval = PMSpecRec<RECURRING_TASK_SPEC_INTERVAL$> ;* Interval is in hours
Interval = ( Interval/24 ) ;* Convert hours to decimal part of day Interval = ( Interval/24 ) ;* Convert hours to decimal part of day
EarlyStartDelta = PMSpecRec<PM_SPEC_EARLY_START_DELTA$> EarlyStartDelta = PMSpecRec<RECURRING_TASK_SPEC_EARLY_START_DELTA$>
SchedDTM = CurrDTM + Interval SchedDTM = CurrDTM + Interval
SchedDTM = OCONV(SchedDTM, 'DT/^S') SchedDTM = OCONV(SchedDTM, 'DT/^S')
SchedDt = SchedDTM[1,' '] SchedDt = SchedDTM[1,' ']
@ -602,7 +602,7 @@ Service ScheduleNextPM(PMSID, PMNo, StartQty)
if thisStartQty NE '' then if thisStartQty NE '' then
SchedQty = Interval + thisStartQty SchedQty = Interval + thisStartQty
end else end else
Error_Services('Add', 'Start Qty not supplied to PM_Services -> ScheduleNextPM') Error_Services('Add', 'Start Qty not supplied to RECURRING_TASK_Services -> ScheduleNextPM')
end end
Case Units = 'M' Case Units = 'M'
@ -613,15 +613,15 @@ Service ScheduleNextPM(PMSID, PMNo, StartQty)
RETURN RETURN
END CASE END CASE
if Error_Services('NoError') then if Error_Services('NoError') then
PMNo = NextKey('PM') ;* Next PMKey PMNo = NextKey('RECURRING_TASK') ;* Next PMKey
PMRec = '' PMRec = ''
PMRec<PM_PMS_ID$> = PMSId ;* New PMRec PMRec<RECURRING_TASK_PMS_ID$> = PMSId ;* New PMRec
PMrec<PM_ENTER_BY$> = 'AUTO' ;* Automated process user PMrec<RECURRING_TASK_ENTER_BY$> = 'AUTO' ;* Automated process user
PMRec<PM_ENTER_DTM$> = CurrDTM PMRec<RECURRING_TASK_ENTER_DTM$> = CurrDTM
PMRec<PM_SCHED_DT$> = SchedDt PMRec<RECURRING_TASK_SCHED_DT$> = SchedDt
PMRec<PM_SCHED_TM$> = SchedTm PMRec<RECURRING_TASK_SCHED_TM$> = SchedTm
PMRec<PM_SCHED_QTY$> = OCONV(SchedQty,'MD0') PMRec<RECURRING_TASK_SCHED_QTY$> = OCONV(SchedQty,'MD0')
Database_Services('WriteDataRow', 'PM', PMNo, PMRec) Database_Services('WriteDataRow', 'RECURRING_TASK', PMNo, PMRec)
end end
@ -630,10 +630,10 @@ end service
Service GetPMNotificationRecipients(PMSID) Service GetPMNotificationRecipients(PMSID)
Recipients = '' Recipients = ''
If PMSID NE '' then If PMSID NE '' then
If RowExists('PM_SPEC', PMSID) then If RowExists('RECURRING_TASK_SPEC', PMSID) then
Recipients := Lsl_Users_Services('GetOnShiftUsersByClass', 'Si Shift Supervisors', 0) Recipients := Lsl_Users_Services('GetOnShiftUsersByClass', 'Si Shift Supervisors', 0)
Recipients := @VM : Lsl_Users_Services('GetOnShiftUsersByClass', 'Lead Operator', 0) Recipients := @VM : Lsl_Users_Services('GetOnShiftUsersByClass', 'Lead Operator', 0)
ADNotificationGroups = XLATE('PM_SPEC', PMSID, PM_SPEC_AD_NOTIFICATION_GROUPS$, 'X') ADNotificationGroups = XLATE('RECURRING_TASK_SPEC', PMSID, RECURRING_TASK_SPEC_AD_NOTIFICATION_GROUPS$, 'X')
IF ADNotificationGroups NE '' then IF ADNotificationGroups NE '' then
for each ADGroup in ADNotificationGroups using @VM for each ADGroup in ADNotificationGroups using @VM
GroupMemberList = Active_Directory_Services('GetADGroupMembersByGroupName', ADGroup, 'INFINEON') GroupMemberList = Active_Directory_Services('GetADGroupMembersByGroupName', ADGroup, 'INFINEON')
@ -649,7 +649,7 @@ Service GetPMNotificationRecipients(PMSID)
Next ADGroup Next ADGroup
end end
end else end else
Error_Services('Add', 'Error in GetPMNotificationRecipients: PM Spec record with key id ' : PMSID : 'does not exist.') Error_Services('Add', 'Error in GetPMNotificationRecipients: RECURRING_TASK Spec record with key id ' : PMSID : 'does not exist.')
end end
end else end else
Error_Services('Add', 'Error in GetPMNotificationRecipients: PMSID was null') Error_Services('Add', 'Error in GetPMNotificationRecipients: PMSID was null')
@ -661,7 +661,7 @@ Service SendPMNotifications()
hSysLists = Database_Services('GetTableHandle', 'SYSLISTS') hSysLists = Database_Services('GetTableHandle', 'SYSLISTS')
Lock hSysLists, ServiceKeyID then Lock hSysLists, ServiceKeyID then
errMessage = '' errMessage = ''
PMStatuses = Pm_Services('GetPMStatuses') PMStatuses = RECURRING_TASK_Services('GetPMStatuses')
SentFrom = 'OI_ADMIN' SentFrom = 'OI_ADMIN'
AttachWindow = '' AttachWindow = ''
AttachKey = '' AttachKey = ''
@ -669,27 +669,27 @@ Service SendPMNotifications()
for each PMStatusLine in PMStatuses using @FM for each PMStatusLine in PMStatuses using @FM
Status = PMStatusLine<1,COL$STATUS> Status = PMStatusLine<1,COL$STATUS>
LastNotification = PMStatusLine<1,COL$NOTIFICAITON> LastNotification = PMStatusLine<1,COL$NOTIFICAITON>
PMDesc = XLATE('PM_SPEC', PMStatusLine<1,COL$PMSKEY>, PM_SPEC_DESC$, 'X') PMDesc = XLATE('RECURRING_TASK_SPEC', PMStatusLine<1,COL$PMSKEY>, RECURRING_TASK_SPEC_DESC$, 'X')
PMKey = PMStatusLine<1,COL$CURRPMKEY> PMKey = PMStatusLine<1,COL$CURRPMKEY>
PMRec = Database_Services('ReadDataRow', 'PM', PMKey) PMRec = Database_Services('ReadDataRow', 'RECURRING_TASK', PMKey)
PMSpecKey = PMStatusLine<1, COL$PMSKEY> PMSpecKey = PMStatusLine<1, COL$PMSKEY>
PMSRec = Database_Services('ReadDataRow', 'PM_SPEC', PMSpecKey) PMSRec = Database_Services('ReadDataRow', 'RECURRING_TASK_SPEC', PMSpecKey)
Tool = PMSRec<PM_SPEC_TOOL_ID$> Tool = PMSRec<RECURRING_TASK_SPEC_TOOL_ID$>
SendEarlyNotification = PMSRec<PM_SPEC_SEND_EARLY_NOTIFICATION$> SendEarlyNotification = PMSRec<RECURRING_TASK_SPEC_SEND_EARLY_NOTIFICATION$>
SendDueNotification = PMSRec<PM_SPEC_SEND_DUE_NOTIFICATION$> SendDueNotification = PMSRec<RECURRING_TASK_SPEC_SEND_DUE_NOTIFICATION$>
SendLateNotification = PMSRec<PM_SPEC_SEND_LATE_NOTIFICATION$> SendLateNotification = PMSRec<RECURRING_TASK_SPEC_SEND_LATE_NOTIFICATION$>
If LastNotification EQ '' then If LastNotification EQ '' then
Begin Case Begin Case
Case Status EQ 'EARLY' Case Status EQ 'EARLY'
IF SendEarlyNotification then IF SendEarlyNotification then
If PMRec<PM_EARLY_NOTIF_SENT$> EQ '' then If PMRec<RECURRING_TASK_EARLY_NOTIF_SENT$> EQ '' then
PMRec<PM_EARLY_NOTIF_SENT$> = Datetime() PMRec<RECURRING_TASK_EARLY_NOTIF_SENT$> = Datetime()
Database_Services('WriteDataRow', 'PM', PMKey, PMRec, 1, 0, 1) Database_Services('WriteDataRow', 'RECURRING_TASK', PMKey, PMRec, 1, 0, 1)
if Error_Services('NoError') then if Error_Services('NoError') then
UpdatedPMRec = Database_Services('ReadDataRow', 'PM', PMKey, True$, 0, False$) UpdatedPMRec = Database_Services('ReadDataRow', 'RECURRING_TASK', PMKey, True$, 0, False$)
If UpdatedPMRec<PM_EARLY_NOTIF_SENT$> NE '' then If UpdatedPMRec<RECURRING_TASK_EARLY_NOTIF_SENT$> NE '' then
Recipients = PM_Services('GetPMNotificationRecipients', PMSpecKey) Recipients = RECURRING_TASK_Services('GetPMNotificationRecipients', PMSpecKey)
if Error_Services('NoError') then if Error_Services('NoError') then
LogData = '' LogData = ''
LogData<1> = LoggingDTM;//Defined at entry of subroutine LogData<1> = LoggingDTM;//Defined at entry of subroutine
@ -698,7 +698,7 @@ Service SendPMNotifications()
LogData<4> = 'EARLY NOTIFICATIONS Prechecks passed, message okay to send.' LogData<4> = 'EARLY NOTIFICATIONS Prechecks passed, message okay to send.'
Logging_Services('AppendLog', objLogNotifications, LogData, @RM, @FM, False$) Logging_Services('AppendLog', objLogNotifications, LogData, @RM, @FM, False$)
Subject = 'PM Task Coming Due' Subject = 'RECURRING_TASK Task Coming Due'
Message = 'Tool: ': Tool : ' - ' :PMDesc:" is coming due. Scheduled due by " : OCONV(PMStatusLine<1,COL$DUEBY>, 'DT') Message = 'Tool: ': Tool : ' - ' :PMDesc:" is coming due. Scheduled due by " : OCONV(PMStatusLine<1,COL$DUEBY>, 'DT')
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)
@ -748,13 +748,13 @@ Service SendPMNotifications()
end end
Case Status EQ 'DUE' Case Status EQ 'DUE'
If SendDueNotification then If SendDueNotification then
If PMRec<PM_DUE_NOTIF_SENT$> EQ '' then If PMRec<RECURRING_TASK_DUE_NOTIF_SENT$> EQ '' then
PMRec<PM_DUE_NOTIF_SENT$> = Datetime() PMRec<RECURRING_TASK_DUE_NOTIF_SENT$> = Datetime()
Database_Services('WriteDataRow', 'PM', PMKey, PMRec, 1, 0, 1) Database_Services('WriteDataRow', 'RECURRING_TASK', PMKey, PMRec, 1, 0, 1)
if Error_Services('NoError') then if Error_Services('NoError') then
UpdatedPMRec = Database_Services('ReadDataRow', 'PM', PMKey, True$, 0, False$) UpdatedPMRec = Database_Services('ReadDataRow', 'RECURRING_TASK', PMKey, True$, 0, False$)
If UpdatedPMRec<PM_DUE_NOTIF_SENT$> NE '' then If UpdatedPMRec<RECURRING_TASK_DUE_NOTIF_SENT$> NE '' then
Recipients = PM_Services('GetPMNotificationRecipients', PMSpecKey) Recipients = RECURRING_TASK_Services('GetPMNotificationRecipients', PMSpecKey)
if Error_Services('NoError') then if Error_Services('NoError') then
LogData = '' LogData = ''
LogData<1> = LoggingDTM;//Defined at entry of subroutine LogData<1> = LoggingDTM;//Defined at entry of subroutine
@ -763,9 +763,9 @@ Service SendPMNotifications()
LogData<4> = 'DUE NOTIFICATIONS Prechecks passed, message okay to send.' LogData<4> = 'DUE NOTIFICATIONS Prechecks passed, message okay to send.'
Logging_Services('AppendLog', objLogNotifications, LogData, @RM, @FM, False$) Logging_Services('AppendLog', objLogNotifications, LogData, @RM, @FM, False$)
Subject = 'PM Task Due' Subject = 'RECURRING_TASK Task Due'
Message = 'Tool: ': Tool : ' - ' :PMDesc:" is due. Scheduled due by " : OCONV(PMStatusLine<1,COL$DUEBY>, 'DT') Message = 'Tool: ': Tool : ' - ' :PMDesc:" is due. Scheduled due by " : OCONV(PMStatusLine<1,COL$DUEBY>, 'DT')
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)
LogData = '' LogData = ''
@ -813,14 +813,14 @@ Service SendPMNotifications()
end end
Case Status EQ 'LATE' Case Status EQ 'LATE'
if SendLateNotification then if SendLateNotification then
If PMRec<PM_LATE_NOTIF_SENT$> EQ '' then If PMRec<RECURRING_TASK_LATE_NOTIF_SENT$> EQ '' then
PMRec<PM_LATE_NOTIF_SENT$> = Datetime() PMRec<RECURRING_TASK_LATE_NOTIF_SENT$> = Datetime()
Database_Services('WriteDataRow', 'PM', PMKey, PMRec, 1, 0, 1) Database_Services('WriteDataRow', 'RECURRING_TASK', PMKey, PMRec, 1, 0, 1)
if Error_Services('NoError') then if Error_Services('NoError') then
//Check to make sure this change is commited by rereading in the record //Check to make sure this change is commited by rereading in the record
UpdatedPMRec = Database_Services('ReadDataRow', 'PM', PMKey, True$, 0, False$) UpdatedPMRec = Database_Services('ReadDataRow', 'RECURRING_TASK', PMKey, True$, 0, False$)
If UpdatedPMRec<PM_LATE_NOTIF_SENT$> NE '' then If UpdatedPMRec<RECURRING_TASK_LATE_NOTIF_SENT$> NE '' then
Recipients = PM_Services('GetPMNotificationRecipients', PMSpecKey) Recipients = RECURRING_TASK_Services('GetPMNotificationRecipients', PMSpecKey)
if Error_Services('NoError') then if Error_Services('NoError') then
LogData = '' LogData = ''
LogData<1> = LoggingDTM;//Defined at entry of subroutine LogData<1> = LoggingDTM;//Defined at entry of subroutine
@ -829,9 +829,9 @@ Service SendPMNotifications()
LogData<4> = 'LATE NOTIFICATIONS Prechecks passed, message okay to send.' LogData<4> = 'LATE NOTIFICATIONS Prechecks passed, message okay to send.'
Logging_Services('AppendLog', objLogNotifications, LogData, @RM, @FM, False$) Logging_Services('AppendLog', objLogNotifications, LogData, @RM, @FM, False$)
Subject = 'PM overdue' Subject = 'RECURRING_TASK overdue'
Message = 'Tool: ': Tool : ' - ' :PMDesc:" is overdue. Scheduled due by " : OCONV(PMStatusLine<1,COL$DUEBY>, 'DT') Message = 'Tool: ': Tool : ' - ' :PMDesc:" is overdue. Scheduled due by " : OCONV(PMStatusLine<1,COL$DUEBY>, 'DT')
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)
LogData = '' LogData = ''
@ -894,7 +894,7 @@ Service GetPMStatuses()
DuePMs = '' DuePMs = ''
//Step 1: Get all PM's that are not complete //Step 1: Get all PM's that are not complete
equ TARGET_ACTIVELIST$ to 5 equ TARGET_ACTIVELIST$ to 5
Statement = "SELECT PM_SPEC WITH ARCHIVED NE 1" Statement = "SELECT RECURRING_TASK_SPEC WITH ARCHIVED NE 1"
rlist( Statement, target_activelist$, '', '', '' ) rlist( Statement, target_activelist$, '', '', '' )
PMSpecList = '' PMSpecList = ''
IF @RecCount then IF @RecCount then
@ -910,24 +910,24 @@ Service GetPMStatuses()
for each PmsKey in PMSpecList using @FM for each PmsKey in PMSpecList using @FM
CurrDt = Date() CurrDt = Date()
CurrDtm = Datetime() CurrDtm = Datetime()
PmsRec = Database_Services('ReadDataRow', 'PM_SPEC', PmsKey) PmsRec = Database_Services('ReadDataRow', 'RECURRING_TASK_SPEC', PmsKey)
Is5S = PmsRec<PM_SPEC_FIVE_S_FLAG$> Is5S = PmsRec<RECURRING_TASK_SPEC_FIVE_S_FLAG$>
Units = PmsRec<PM_SPEC_UNITS$> Units = PmsRec<RECURRING_TASK_SPEC_UNITS$>
CurrPMId = PmsRec<PM_SPEC_PM_KEYS$, 1> CurrPMId = PmsRec<RECURRING_TASK_SPEC_PM_KEYS$, 1>
CurrPmRec = Database_Services('ReadDataRow', 'PM', CurrPMId) CurrPmRec = Database_Services('ReadDataRow', 'RECURRING_TASK', CurrPMId)
Begin Case Begin Case
Case Units EQ 'T' Case Units EQ 'T'
EarlyStart = ICONV(obj_PM_Spec('EarlyStart',PmsKey:@RM:PmsRec), 'DT') EarlyStart = ICONV(obj_RECURRING_TASK_SPEC('EarlyStart',PmsKey:@RM:PmsRec), 'DT')
DueStart = ICONV(obj_PM_Spec('SchedStart',PmsKey:@RM:PmsRec), 'DT') DueStart = ICONV(obj_RECURRING_TASK_SPEC('SchedStart',PmsKey:@RM:PmsRec), 'DT')
LateStart = ICONV(obj_PM_Spec('LateStart',PmsKey:@RM:PmsRec), 'DT') LateStart = ICONV(obj_RECURRING_TASK_SPEC('LateStart',PmsKey:@RM:PmsRec), 'DT')
Case Units EQ 'D' Case Units EQ 'D'
EarlyStart = ICONV(obj_PM_Spec('EarlyStart',PmsKey:@RM:PmsRec), 'D') EarlyStart = ICONV(obj_RECURRING_TASK_SPEC('EarlyStart',PmsKey:@RM:PmsRec), 'D')
DueStart = ICONV(obj_PM_Spec('SchedStart',PmsKey:@RM:PmsRec), 'D') DueStart = ICONV(obj_RECURRING_TASK_SPEC('SchedStart',PmsKey:@RM:PmsRec), 'D')
LateStart = ICONV(obj_PM_Spec('LateStart',PmsKey:@RM:PmsRec), 'D') LateStart = ICONV(obj_RECURRING_TASK_SPEC('LateStart',PmsKey:@RM:PmsRec), 'D')
Case 0 Case 0
EarlyStart = obj_PM_Spec('EarlyStart',PmsKey:@RM:PmsRec) EarlyStart = obj_RECURRING_TASK_SPEC('EarlyStart',PmsKey:@RM:PmsRec)
DueStart = obj_PM_Spec('SchedStart',PmsKey:@RM:PmsRec) DueStart = obj_RECURRING_TASK_SPEC('SchedStart',PmsKey:@RM:PmsRec)
LateStart = obj_PM_Spec('LateStart',PmsKey:@RM:PmsRec) LateStart = obj_RECURRING_TASK_SPEC('LateStart',PmsKey:@RM:PmsRec)
End Case End Case
@ -974,18 +974,18 @@ Service GetPMStatuses()
If SendEarly then If SendEarly then
SendEarlyCnt += 1 SendEarlyCnt += 1
NotificationSent = CurrPMRec<PM_EARLY_NOTIF_SENT$> NotificationSent = CurrPMRec<RECURRING_TASK_EARLY_NOTIF_SENT$>
DuePMs<-1> = PmsKey : @VM : 'EARLY' : @VM : NotificationSent : @VM : LateStart : @VM : CurrPMId DuePMs<-1> = PmsKey : @VM : 'EARLY' : @VM : NotificationSent : @VM : LateStart : @VM : CurrPMId
end end
If SendDue then If SendDue then
SendDueCnt += 1 SendDueCnt += 1
NotificationSent = CurrPMRec<PM_DUE_NOTIF_SENT$> NotificationSent = CurrPMRec<RECURRING_TASK_DUE_NOTIF_SENT$>
DuePMs<-1> = PmsKey : @VM : 'DUE' : @VM: NotificationSent : @VM : LateStart : @VM : CurrPMId DuePMs<-1> = PmsKey : @VM : 'DUE' : @VM: NotificationSent : @VM : LateStart : @VM : CurrPMId
end end
If SendLate then If SendLate then
SendLateCnt += 1 SendLateCnt += 1
NotificationSent = CurrPMRec<PM_LATE_NOTIF_SENT$> NotificationSent = CurrPMRec<RECURRING_TASK_LATE_NOTIF_SENT$>
DuePMs<-1> = PmsKey : @VM : 'LATE' : @VM : NotificationSent : @VM : LateStart : @VM : CurrPMId DuePMs<-1> = PmsKey : @VM : 'LATE' : @VM : NotificationSent : @VM : LateStart : @VM : CurrPMId
end end
If NotDue then If NotDue then
@ -1001,17 +1001,17 @@ Service CompleteScrubberPM(ScrubberID)
Flag = '' Flag = ''
keylist = '' keylist = ''
Query = '' Query = ''
Open 'DICT.PM_SPEC' to PmsDict then Open 'DICT.RECURRING_TASK_SPEC' to PmsDict then
Query := 'TOOL_ID':@VM:ScrubberID:@FM Query := 'TOOL_ID':@VM:ScrubberID:@FM
Btree.Extract(Query, 'PM_SPEC', PmsDict, keylist, '', Flag) Btree.Extract(Query, 'RECURRING_TASK_SPEC', PmsDict, keylist, '', Flag)
end end
ScrubberPMSpecKeys = keylist ScrubberPMSpecKeys = keylist
If DCOUNT(ScrubberPMSpecKeys, @VM) GT 0 then If DCOUNT(ScrubberPMSpecKeys, @VM) GT 0 then
for each PMSKey in keylist using @VM for each PMSKey in keylist using @VM
PMKeys = XLATE('PM_SPEC', PMSKey, 'PM_KEYS', 'X') PMKeys = XLATE('RECURRING_TASK_SPEC', PMSKey, 'PM_KEYS', 'X')
If DCount(PMKeys, @VM GT 0) then If DCount(PMKeys, @VM GT 0) then
for each PMKey in PMKeys using @VM for each PMKey in PMKeys using @VM
Pm_Services('CompleteNonToolPM', PMKey, 'SYSTEM', DateTime()) RECURRING_TASK_Services('CompleteNonToolPM', PMKey, 'SYSTEM', DateTime())
If Error_Services('HasError') then If Error_Services('HasError') then
ErrMsg = Error_Services('GetMessage') ErrMsg = Error_Services('GetMessage')
Error_Services('Add', 'Error trying to complete Scrubber PM:' : ErrMsg) Error_Services('Add', 'Error trying to complete Scrubber PM:' : ErrMsg)
@ -1019,14 +1019,14 @@ Service CompleteScrubberPM(ScrubberID)
LogData<1> = OConv(Datetime(), 'DT2/^H') LogData<1> = OConv(Datetime(), 'DT2/^H')
LogData<2> = ScrubberID LogData<2> = ScrubberID
LogData<3> = 'Error' LogData<3> = 'Error'
LogData<4> = 'PM ' : PMKey : '. ' : ErrMsg LogData<4> = 'RECURRING_TASK ' : PMKey : '. ' : ErrMsg
Logging_Services('AppendLog', objLogScrubbers, LogData, @RM, @FM) Logging_Services('AppendLog', objLogScrubbers, LogData, @RM, @FM)
end else end else
LogData = '' LogData = ''
LogData<1> = OConv(Datetime(), 'DT2/^H') LogData<1> = OConv(Datetime(), 'DT2/^H')
LogData<2> = ScrubberID LogData<2> = ScrubberID
LogData<3> = 'Success' LogData<3> = 'Success'
LogData<4> = 'PM ' : PMKey : ' Completed successfully' LogData<4> = 'RECURRING_TASK ' : PMKey : ' Completed successfully'
Logging_Services('AppendLog', objLogScrubbers, LogData, @RM, @FM) Logging_Services('AppendLog', objLogScrubbers, LogData, @RM, @FM)
end end
Next PMKey Next PMKey
@ -1060,29 +1060,29 @@ Service GetActivePMsByToolId(ToolId)
ErrorMessage = '' ErrorMessage = ''
ActivePMIdList = '' ActivePMIdList = ''
If ToolId NE '' then If ToolId NE '' then
Open 'DICT.PM_SPEC' to @DICT then Open 'DICT.RECURRING_TASK_SPEC' to @DICT then
Option = '' Option = ''
Flag = '' Flag = ''
PMSpecList = '' PMSpecList = ''
SearchStr = 'TOOL_ID':@VM:ToolId:@FM SearchStr = 'TOOL_ID':@VM:ToolId:@FM
SearchStr := 'ARCHIVED':@VM:'#1':@FM SearchStr := 'ARCHIVED':@VM:'#1':@FM
Btree.Extract(SearchStr, 'PM_SPEC', @DICT, PMSpecList, '', Flag) Btree.Extract(SearchStr, 'RECURRING_TASK_SPEC', @DICT, PMSpecList, '', Flag)
If Flag EQ 0 AND PMSpecList NE '' then If Flag EQ 0 AND PMSpecList NE '' then
for each PMSpecId in PMSpecList using @VM for each PMSpecId in PMSpecList using @VM
ActivePMKeys = Database_Services('ReadDataColumn', 'PM_SPEC', PMSpecId, PM_SPEC_PM_KEYS$, True$, 0, False$) ActivePMKeys = Database_Services('ReadDataColumn', 'RECURRING_TASK_SPEC', PMSpecId, RECURRING_TASK_SPEC_PM_KEYS$, True$, 0, False$)
If ActivePMKeys NE '' then If ActivePMKeys NE '' then
ActivePMIdList<1,-1> = ActivePMKeys ActivePMIdList<1,-1> = ActivePMKeys
end end
Next PMSpecId Next PMSpecId
end else end else
ErrorMessage = 'Error in PM_Services -> GetActivePMsByToolIdAndType, unable to find active PM Specs for this tool id' ErrorMessage = 'Error in RECURRING_TASK_Services -> GetActivePMsByToolIdAndType, unable to find active PM Specs for this tool id'
end end
end else end else
ErrorMessage = 'Error in PM_Services -> GetActivePMsByToolIdAndType, error opening PM_SPEC dictionary' ErrorMessage = 'Error in RECURRING_TASK_Services -> GetActivePMsByToolIdAndType, error opening RECURRING_TASK_SPEC dictionary'
end end
end else end else
ErrorMessage = 'Error in PM_Services -> GetActivePMsByToolIdAndType, null tool id passed to routine' ErrorMessage = 'Error in RECURRING_TASK_Services -> GetActivePMsByToolIdAndType, null tool id passed to routine'
end end
Response = ActivePMIdList Response = ActivePMIdList
end service end service
@ -1094,3 +1094,4 @@ return

View File

@ -1,4 +1,4 @@
COMPILE FUNCTION PM_Spec(EntID,Event,Parm1,Parm2,Parm3,Parm4,Parm5) COMPILE FUNCTION Recurring_Task_Spec(EntID,Event,Parm1,Parm2,Parm3,Parm4,Parm5)
/* /*
Commuter module for PM_SPEC (Preventive Maintenance Schedule) window Commuter module for PM_SPEC (Preventive Maintenance Schedule) window
@ -15,8 +15,8 @@ DECLARE FUNCTION Send_Message, Msg, NextKey, Database_Services, Msg, Error_Servi
$INSERT MSG_EQUATES $INSERT MSG_EQUATES
$INSERT APPCOLORS $INSERT APPCOLORS
$INSERT PM_EQUATES $INSERT RECURRING_TASK_EQUATES
$Insert PM_Spec_Equates $Insert RECURRING_TASK_SPEC_Equates
@ -30,7 +30,7 @@ EQU COL$LATE_DTM TO 4
ErrCode = '' ErrCode = ''
ErrorMsg = '' ErrorMsg = ''
ErrTitle = 'Error in PM_SPEC routine' ErrTitle = 'Error in RECURRING_TASK_SPEC routine'
Result = '' Result = ''
BEGIN CASE BEGIN CASE
@ -89,7 +89,7 @@ RETURN
New: New:
* * * * * * * * * * * * * *
PMSId = NextKey('PM_SPEC') PMSId = NextKey('RECURRING_TASK_SPEC')
obj_Appwindow('LoadFormKeys',@WINDOW:@RM:PMSId) obj_Appwindow('LoadFormKeys',@WINDOW:@RM:PMSId)
@ -143,8 +143,8 @@ Refresh:
END END
NEXT Line NEXT Line
NEXT I NEXT I
ThisPMSpecRec = Database_Services('ReadDataRow', 'PM_SPEC', @ID, 1, 0, 0) ThisPMSpecRec = Database_Services('ReadDataRow', 'RECURRING_TASK_SPEC', @ID, 1, 0, 0)
ADNotificationGroups = ThisPMSpecRec<PM_SPEC_AD_NOTIFICATION_GROUPS$> ADNotificationGroups = ThisPMSpecRec<RECURRING_TASK_SPEC_AD_NOTIFICATION_GROUPS$>
Set_Property(@Window : '.EDT_NOTIFICATION_GROUPS', 'ARRAY', ADNotificationGroups) Set_Property(@Window : '.EDT_NOTIFICATION_GROUPS', 'ARRAY', ADNotificationGroups)
@ -155,9 +155,9 @@ RETURN
Read: Read:
* * * * * * * * * * * * * *
PMId = Get_Property(@WINDOW:'.PM_ID','DEFPROP') PMId = Get_Property(@WINDOW:'.PMS_ID','DEFPROP')
IF RowExists('PM',PMId) ELSE IF RowExists('RECURRING_TASK',PMId) ELSE
IF Get_Property(@WINDOW:'.ENTER_DTM','DEFPROP') = '' THEN IF Get_Property(@WINDOW:'.ENTER_DTM','DEFPROP') = '' THEN
CurrDTM = OCONV(Date(),'D4/'):' ':OCONV(Time(),'MTH') CurrDTM = OCONV(Date(),'D4/'):' ':OCONV(Time(),'MTH')
Set_Property(@WINDOW:'.ENTER_DTM','DEFPROP',CurrDTM) Set_Property(@WINDOW:'.ENTER_DTM','DEFPROP',CurrDTM)
@ -227,14 +227,14 @@ NewPM:
PMSId = Get_Property(@WINDOW:'.PMS_ID','DEFPROP') PMSId = Get_Property(@WINDOW:'.PMS_ID','DEFPROP')
Send_Event(@WINDOW,'WRITE') ;* Write current PM_SPEC record Send_Event(@WINDOW,'WRITE') ;* Write current RECURRING_TASK_SPEC record
PMNo = NextKey('PM') ;* Next PMKey PMNo = NextKey('RECURRING_TASK') ;* Next PMKey
PMRec = '' PMRec = ''
PMRec<PM_PMS_ID$> = PMSId ;* New PMRec PMRec<RECURRING_TASK_PMS_ID$> = PMSId ;* New PMRec
StartTime = Get_Property(@Window:'.EDL_PM_START_TIME', 'TEXT') StartTime = Get_Property(@Window:'.EDL_PM_START_TIME', 'TEXT')
PMRec<PM_SCHED_TM$> = IConv(StartTime, 'MTS') PMRec<RECURRING_TASK_SCHED_TM$> = IConv(StartTime, 'MTS')
otParms = 'PM':@RM:PMNo:@RM:@RM:PMRec otParms = 'RECURRING_TASK':@RM:PMNo:@RM:@RM:PMRec
obj_Tables('WriteRec',otParms) ;* Write new PM record obj_Tables('WriteRec',otParms) ;* Write new PM record
IF Get_Status(errCode) THEN IF Get_Status(errCode) THEN
@ -242,9 +242,9 @@ NewPM:
RETURN RETURN
END END
obj_Appwindow('ViewRelated','PM':@RM:PMNo:@RM:@RM) ;* View new related PM record obj_Appwindow('ViewRelated','RECURRING_TASK':@RM:PMNo:@RM:@RM) ;* View new related PM record
Set_Property('PM','@RETURN_KEY',PMSId) Set_Property('RECURRING_TASK','@RETURN_KEY',PMSId)
@ -265,7 +265,7 @@ PMKeyDC:
IF PMKeyList<CurrRow,COL$PM_KEY> NE '' THEN IF PMKeyList<CurrRow,COL$PM_KEY> NE '' THEN
PMKey = PMKeyList<CurrRow,COL$PM_KEY> PMKey = PMKeyList<CurrRow,COL$PM_KEY>
obj_Appwindow('ViewRelated','PM':@RM:PMKey:@RM:@RM) obj_Appwindow('ViewRelated','RECURRING_TASK':@RM:PMKey:@RM:@RM)
END END
@ -281,12 +281,12 @@ AddNotificationGroup:
If Group NE '' then If Group NE '' then
//Save any uncommited changes //Save any uncommited changes
UpdatedRec = Get_Property (@Window, "ATRECORD") UpdatedRec = Get_Property (@Window, "ATRECORD")
Locate Group in UpdatedRec<PM_SPEC_AD_NOTIFICATION_GROUPS$> using @VM setting gPos then Locate Group in UpdatedRec<RECURRING_TASK_SPEC_AD_NOTIFICATION_GROUPS$> using @VM setting gPos then
Text = "Distribution list is already assigned." Text = "Distribution list is already assigned."
Msg(@window, Text) Msg(@window, Text)
end else end else
UpdatedRec<PM_SPEC_AD_NOTIFICATION_GROUPS$, -1> = Group UpdatedRec<RECURRING_TASK_SPEC_AD_NOTIFICATION_GROUPS$, -1> = Group
Database_Services('WriteDataRow', 'PM_SPEC', @ID, UpdatedRec, 1, 0, 1) Database_Services('WriteDataRow', 'RECURRING_TASK_SPEC', @ID, UpdatedRec, 1, 0, 1)
if Error_Services('NoError') then if Error_Services('NoError') then
Set_Property (@Window, "ATRECORD", UpdatedRec) Set_Property (@Window, "ATRECORD", UpdatedRec)
Set_Property(@Window, 'SAVEWARN', 0) Set_Property(@Window, 'SAVEWARN', 0)
@ -309,9 +309,9 @@ DeleteNotificationGroup:
GroupToDelete = NotifArray<1,SelectedPos> GroupToDelete = NotifArray<1,SelectedPos>
If GroupToDelete NE '' then If GroupToDelete NE '' then
UpdatedRec = Get_Property (@Window, "ATRECORD") UpdatedRec = Get_Property (@Window, "ATRECORD")
Locate GroupToDelete in UpdatedRec<PM_SPEC_AD_NOTIFICATION_GROUPS$> using @VM setting gPos then Locate GroupToDelete in UpdatedRec<RECURRING_TASK_SPEC_AD_NOTIFICATION_GROUPS$> using @VM setting gPos then
UpdatedRec = Delete(UpdatedRec, PM_SPEC_AD_NOTIFICATION_GROUPS$, gPos, 0) UpdatedRec = Delete(UpdatedRec, RECURRING_TASK_SPEC_AD_NOTIFICATION_GROUPS$, gPos, 0)
Database_Services('WriteDataRow', 'PM_SPEC', PMSpecID, UpdatedRec, 1, 0, 1) Database_Services('WriteDataRow', 'RECURRING_TASK_SPEC', PMSpecID, UpdatedRec, 1, 0, 1)
if Error_Services('NoError') then if Error_Services('NoError') then
Set_Property (@Window, "ATRECORD", UpdatedRec) Set_Property (@Window, "ATRECORD", UpdatedRec)
Set_Property(@Window, 'SAVEWARN', 0) Set_Property(@Window, 'SAVEWARN', 0)
@ -328,3 +328,5 @@ DeleteNotificationGroup:
return return

View File

@ -0,0 +1,303 @@
Function RECURRING_TASK_SPEC_Actions(Action, CalcColName, FSList, Handle, Name, FMC, Record, Status, OrigRecord, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10)
#pragma precomp SRP_PreCompiler
/***********************************************************************************************************************
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 : RECURRING_TASK_SPEC_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)
08/25/23 jro Original programmer.
***********************************************************************************************************************/
$insert APP_INSERTS
$insert FILE.SYSTEM.EQUATES
$insert ACTION_SETUP
$insert RECURRING_TASK_EQUATES
$insert RECURRING_TASK_SPEC_EQUATES
$insert RLIST_EQUATES
$insert PM_SCHED_EQUATES
$insert TOOL_EQUATES
Equ Comma$ to ','
Declare function Error_Services, Database_Services, Environment_Services, Obj_RECURRING_TASK_SPEC
Declare function SRP_Array, SRP_Datetime
Declare subroutine Error_Services, Database_Services, Environment_Services, Logging_Services
Declare subroutine RList
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 TableName_Actions
//
// A = {COL1} ; * Reference as many data columns in this way to ensure the dictionary dependency is generated.
//
// @ANS = TableName_Actions('CalcField', 'CalcColName')
//
// ---------------------------------------------------------------------------------------------------------------------
CalculateColumn:
// Make sure the ActionFlow return variable is cleared in case nothing is calculated.
ActionFlow = ''
Begin Case
Case CalcColName EQ 'EARLY_START' ; GoSub EARLY_START
Case CalcColName EQ 'LAST_PM_DTM' ; GoSub LAST_PM_DTM
Case CalcColName EQ 'LATE_START' ; GoSub LATE_START
Case CalcColName EQ 'NEXT_PM_DT' ; GoSub NEXT_PM_DT
Case CalcColName EQ 'PM_DTM' ; GoSub PM_DTM
Case CalcColName EQ 'PM_STATUS' ; GoSub PM_STATUS
Case CalcColName EQ 'SCHED_START' ; GoSub SCHED_START
Case CalcColName EQ 'TOOL_CYCLE_CNT' ; GoSub TOOL_CYCLE_CNT
Case CalcColName EQ 'TOOL_DESC' ; GoSub TOOL_DESC
Case CalcColName EQ 'TOOL_LOCATION' ; GoSub TOOL_LOCATION
Case CalcColName EQ 'TOOL_TYPE' ; GoSub TOOL_TYPE
End Case
return
EARLY_START:
ActionFlow = obj_recurring_task_spec('EarlyStart',@ID:@RM:@RECORD)
return
LAST_PM_DTM:
ActionFlow = obj_recurring_task_spec('LastPMCompDTM',@ID)
return
LATE_START:
ActionFlow = obj_recurring_task_spec('LateStart',@ID:@RM:@RECORD)
return
NEXT_PM_DT:
ActionFlow = ''
return
PM_DTM:
PMKeys = @RECORD<18>
Ans = ''
pmCnt = COUNT(PMKeys,@VM) + (PMKeys NE '')
FOR I = 1 TO pmCnt
Ans<1,I> = PMKeys<1,I>[-1,'B*']
NEXT I
ActionFlow = Ans
return
PM_STATUS:
PMKeys = @RECORD<18>
ActionFlow = XLATE('RECURRING_TASK',PMKeys,'STATUS','X')
return
SCHED_START:
ActionFlow = obj_recurring_task_spec('SchedStart',@ID:@RM:@RECORD)
return
TOOL_CYCLE_CNT:
ToolID = @RECORD<PM_SCHED_TOOL_ID$>
ActionFlow = XLATE('TOOL',ToolID,TOOL_CYCLE_CNT$,'X')
return
TOOL_DESC:
ToolID = @RECORD<PM_SCHED_TOOL_ID$>
ActionFlow = XLATE('TOOL',ToolID,TOOL_TOOL_DESC$,'X')
return
TOOL_LOCATION:
ToolID = @RECORD<PM_SCHED_TOOL_ID$>
ActionFlow = XLATE('TOOL',ToolID,'LOCATION','X')
return
TOOL_TYPE:
ToolID = @RECORD<PM_SCHED_TOOL_ID$>
ActionFlow = XLATE('TOOL',ToolID,TOOL_TOOL_TYPE$,'X')
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$
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 = ''
* LockOwner = Record<WO_MAT_LOCKED_BY$>
* If LockOwner EQ '' then Record<WO_MAT_LOCKED_BY$> = @User4
* If @User4 EQ 'DANIEL_ST' then
* Database_Services('WriteDataRow', 'LOCKS', @Station:'*WO_MAT*':Name, '')
* end
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:
return
DELETE_RECORD:
return
// ----- Internal Methods ----------------------------------------------------------------------------------------------
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,9 +1,9 @@
Compile function PM_Spec_Services(@Service, @Params) Compile function RECURRING_TASK_SPEC_Services(@Service, @Params)
/*********************************************************************************************************************** /***********************************************************************************************************************
Name : PM_Spec_Services Name : RECURRING_TASK_SPEC_Services
Description : Handler program for all PM_SPEC services. Description : Handler program for all RECURRING_TASK_SPEC services.
Notes : Application errors should be logged using the Error Services module. There are a few methodological 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 assumptions built into way errors are managed which are important to understand in order to properly
@ -49,8 +49,8 @@ Compile function PM_Spec_Services(@Service, @Params)
$Insert APP_INSERTS $Insert APP_INSERTS
$Insert SERVICE_SETUP $Insert SERVICE_SETUP
$Insert PM_EQUATES $Insert RECURRING_TASK_EQUATES
$Insert PM_SPEC_EQUATES $Insert RECURRING_TASK_SPEC_EQUATES
$Insert TOOL_EQUATES $Insert TOOL_EQUATES
// Reduce Modes // Reduce Modes
@ -82,7 +82,7 @@ Service UpdatePMCompDtm(PMSpecID)
Push.Select(F1, F2, F3, F4) Push.Select(F1, F2, F3, F4)
ErrorMsg = '' ErrorMsg = ''
If (PMSpecID NE '') then If (PMSpecID NE '') then
If RowExists('PM_SPEC', PMSpecID) then If RowExists('RECURRING_TASK_SPEC', PMSpecID) then
TableName = "PM" TableName = "PM"
Flag = "" Flag = ""
Done = False$ Done = False$
@ -99,14 +99,14 @@ Service UpdatePMCompDtm(PMSpecID)
ReadNext Key Using CursorVar By AT else Done = TRUE$ ReadNext Key Using CursorVar By AT else Done = TRUE$
Until Done Until Done
Read Rec From FileVar, Key then Read Rec From FileVar, Key then
NewStopDtm = Rec<PM_COMP_DTM$> NewStopDtm = Rec<RECURRING_TASK_COMP_DTM$>
Done = True$ Done = True$
Open 'PM_SPEC' to hPMSpec then Open 'RECURRING_TASK_SPEC' to hPMSpec then
WriteV NewStopDtm on hPMSpec, PMSpecID, PM_SPEC_LAST_PM_COMP_DTM$ else WriteV NewStopDtm on hPMSpec, PMSpecID, RECURRING_TASK_SPEC_LAST_PM_COMP_DTM$ else
ErrorMsg = 'Error in ':Service:' service. Error writing LAST_PM_COMP_DTM on PM_SPEC record ':PMSpecID:'.' ErrorMsg = 'Error in ':Service:' service. Error writing LAST_PM_COMP_DTM on RECURRING_TASK_SPEC record ':PMSpecID:'.'
end end
end else end else
ErrorMsg = 'Error in ':Service:' service. Error opening PM_SPEC table.' ErrorMsg = 'Error in ':Service:' service. Error opening RECURRING_TASK_SPEC table.'
end end
end else end else
ErrorMsg = 'Error in ':Service:' service. Error reading PM record ':Key:'.' ErrorMsg = 'Error in ':Service:' service. Error reading PM record ':Key:'.'
@ -122,7 +122,7 @@ Service UpdatePMCompDtm(PMSpecID)
ErrorMsg = 'Error in ':Service:' service. Error calling Reduce on PM table.' ErrorMsg = 'Error in ':Service:' service. Error calling Reduce on PM table.'
end end
end else end else
ErrorMsg = 'Error in ':Service:' service. PM_SPEC record ':PMSpecID:' does not exist!' ErrorMsg = 'Error in ':Service:' service. RECURRING_TASK_SPEC record ':PMSpecID:' does not exist!'
end end
end else end else
ErrorMsg = 'Error in ':Service:' service. Null PMSpecID passed into service!' ErrorMsg = 'Error in ':Service:' service. Null PMSpecID passed into service!'
@ -152,3 +152,4 @@ ClearCursors:
return return

View File

@ -38,7 +38,7 @@ Function Scrubber_pm_API(@API)
#pragma precomp SRP_PreCompiler #pragma precomp SRP_PreCompiler
Declare Subroutine Pm_Services, Http_Services, Logging_Services Declare Subroutine Recurring_Task_Services, Http_Services, Logging_Services
Declare function Error_Services, Logging_Services, Environment_Services, Datetime Declare function Error_Services, Logging_Services, Environment_Services, Datetime
$insert APP_INSERTS $insert APP_INSERTS
@ -98,7 +98,7 @@ API scrubber_pm.ID.GET
ScrubberID = EndpointSegment ScrubberID = EndpointSegment
IF RowExists('TOOL', ScrubberID) then IF RowExists('TOOL', ScrubberID) then
Pm_Services('CompleteScrubberPM', ScrubberID) Recurring_Task_Services('CompleteScrubberPM', ScrubberID)
If Error_Services('HasError') then If Error_Services('HasError') then
ErrMsg = Error_Services('GetMessage') ErrMsg = Error_Services('GetMessage')
HTTP_Services('SetResponseStatus', 500, ErrMsg) HTTP_Services('SetResponseStatus', 500, ErrMsg)
@ -127,3 +127,6 @@ API scrubber_pm.ID.GET
Logging_Services('AppendLog', objLog, LogData, @RM, @FM) Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
end end
end api end api

View File

@ -12,3 +12,4 @@ compile insert PACKAGING_EQUATES
equ PACKAGING_COMPLETE_DTM$ to 3 equ PACKAGING_COMPLETE_DTM$ to 3
#endif #endif

View File

@ -1,26 +0,0 @@
compile insert PM_EQUATES
/*----------------------------------------
Author : Table Create Insert Routine
Written : 29/11/2016
Description : Insert for Table PM
----------------------------------------*/
Equ PM_PM_NO$ To 0
Equ PM_PMS_ID$ To 1
Equ PM_ENTER_BY$ To 2
Equ PM_ENTER_DTM$ To 3
Equ PM_SCHED_DT$ To 4
Equ PM_SCHED_TM$ To 5
Equ PM_SCHED_QTY$ To 6
Equ PM_NOTES$ To 8
Equ PM_COMP_BY$ To 9
Equ PM_COMP_DTM$ To 10
Equ PM_START_BY$ To 11
Equ PM_START_DTM$ To 12
Equ PM_COMP_QTY$ To 13
Equ PM_PASS_FAIL$ To 14
Equ PM_EARLY_NOTIF_SENT$ To 15
Equ PM_DUE_NOTIF_SENT$ To 16
Equ PM_LATE_NOTIF_SENT$ To 17

View File

@ -1,41 +0,0 @@
compile insert PM_SPEC_EQUATES
/*----------------------------------------
Author : Table Create Insert Routine
Written : 12/12/2024
Description : Insert for Table PM_SPEC
----------------------------------------*/
#ifndef __PM_SPEC_EQUATES__
#define __PM_SPEC_EQUATES__
Equ PM_SPEC_PMS_ID$ To 0
Equ PM_SPEC_TOOL_ID$ To 1
Equ PM_SPEC_DESC$ To 2
Equ PM_SPEC_CHANGE_STAT$ To 3
Equ PM_SPEC_UNITS$ To 4
Equ PM_SPEC_INT_TIME_CD$ To 5
Equ PM_SPEC_INTERVAL$ To 6
Equ PM_SPEC_INT_DT$ To 6
Equ PM_SPEC_INT_QTY$ To 6
Equ PM_SPEC_INT_TM$ To 6
Equ PM_SPEC_EARLY_START_DELTA$ To 7
Equ PM_SPEC_EARLY_START_DT$ To 7
Equ PM_SPEC_EARLY_START_QTY$ To 7
Equ PM_SPEC_EARLY_START_TM$ To 7
Equ PM_SPEC_LATE_START_DELTA$ To 8
Equ PM_SPEC_LATE_START_DT$ To 8
Equ PM_SPEC_LATE_START_QTY$ To 8
Equ PM_SPEC_LATE_START_TM$ To 8
Equ PM_SPEC_NOTES$ To 17
Equ PM_SPEC_PM_KEYS$ To 18
Equ PM_SPEC_PM_START_TIME$ To 19
Equ PM_SPEC_PM_ARCHIVED$ To 20
Equ PM_SPEC_FIVE_S_FLAG$ To 21
Equ PM_SPEC_SEND_EARLY_NOTIFICATION$ To 22
Equ PM_SPEC_SEND_DUE_NOTIFICATION$ To 23
Equ PM_SPEC_SEND_LATE_NOTIFICATION$ To 24
Equ PM_SPEC_LAST_PM_COMP_DTM$ To 25
Equ PM_SPEC_PM_CLASS$ To 26
Equ PM_SPEC_AD_NOTIFICATION_GROUPS$ To 27
Equ PM_SPEC_AREA$ To 28
#endif

View File

@ -0,0 +1,26 @@
compile insert RECURRING_TASK_EQUATES
/*----------------------------------------
Author : Table Create Insert Routine
Written : 29/11/2016
Description : Insert for Table RECURRING_TASK
----------------------------------------*/
Equ RECURRING_TASK_PM_NO$ To 0
Equ RECURRING_TASK_PMS_ID$ To 1
Equ RECURRING_TASK_ENTER_BY$ To 2
Equ RECURRING_TASK_ENTER_DTM$ To 3
Equ RECURRING_TASK_SCHED_DT$ To 4
Equ RECURRING_TASK_SCHED_TM$ To 5
Equ RECURRING_TASK_SCHED_QTY$ To 6
Equ RECURRING_TASK_NOTES$ To 8
Equ RECURRING_TASK_COMP_BY$ To 9
Equ RECURRING_TASK_COMP_DTM$ To 10
Equ RECURRING_TASK_START_BY$ To 11
Equ RECURRING_TASK_START_DTM$ To 12
Equ RECURRING_TASK_COMP_QTY$ To 13
Equ RECURRING_TASK_PASS_FAIL$ To 14
Equ RECURRING_TASK_EARLY_NOTIF_SENT$ To 15
Equ RECURRING_TASK_DUE_NOTIF_SENT$ To 16
Equ RECURRING_TASK_LATE_NOTIF_SENT$ To 17

View File

@ -0,0 +1,42 @@
compile insert RECURRING_TASK_SPEC_EQUATES
/*----------------------------------------
Author : Table Create Insert Routine
Written : 12/12/2024
Description : Insert for Table RECURRING_TASK_SPEC
----------------------------------------*/
#ifndef __RECURRING_TASK_SPEC_EQUATES__
#define __RECURRING_TASK_SPEC_EQUATES__
Equ RECURRING_TASK_SPEC_PMS_ID$ To 0
Equ RECURRING_TASK_SPEC_TOOL_ID$ To 1
Equ RECURRING_TASK_SPEC_DESC$ To 2
Equ RECURRING_TASK_SPEC_CHANGE_STAT$ To 3
Equ RECURRING_TASK_SPEC_UNITS$ To 4
Equ RECURRING_TASK_SPEC_INT_TIME_CD$ To 5
Equ RECURRING_TASK_SPEC_INTERVAL$ To 6
Equ RECURRING_TASK_SPEC_INT_DT$ To 6
Equ RECURRING_TASK_SPEC_INT_QTY$ To 6
Equ RECURRING_TASK_SPEC_INT_TM$ To 6
Equ RECURRING_TASK_SPEC_EARLY_START_DELTA$ To 7
Equ RECURRING_TASK_SPEC_EARLY_START_DT$ To 7
Equ RECURRING_TASK_SPEC_EARLY_START_QTY$ To 7
Equ RECURRING_TASK_SPEC_EARLY_START_TM$ To 7
Equ RECURRING_TASK_SPEC_LATE_START_DELTA$ To 8
Equ RECURRING_TASK_SPEC_LATE_START_DT$ To 8
Equ RECURRING_TASK_SPEC_LATE_START_QTY$ To 8
Equ RECURRING_TASK_SPEC_LATE_START_TM$ To 8
Equ RECURRING_TASK_SPEC_NOTES$ To 17
Equ RECURRING_TASK_SPEC_PM_KEYS$ To 18
Equ RECURRING_TASK_SPEC_PM_START_TIME$ To 19
Equ RECURRING_TASK_SPEC_PM_ARCHIVED$ To 20
Equ RECURRING_TASK_SPEC_FIVE_S_FLAG$ To 21
Equ RECURRING_TASK_SPEC_SEND_EARLY_NOTIFICATION$ To 22
Equ RECURRING_TASK_SPEC_SEND_DUE_NOTIFICATION$ To 23
Equ RECURRING_TASK_SPEC_SEND_LATE_NOTIFICATION$ To 24
Equ RECURRING_TASK_SPEC_LAST_PM_COMP_DTM$ To 25
Equ RECURRING_TASK_SPEC_PM_CLASS$ To 26
Equ RECURRING_TASK_SPEC_AD_NOTIFICATION_GROUPS$ To 27
Equ RECURRING_TASK_SPEC_AREA$ To 28
#endif