Refined event logic to prevent multiple error messages from being displayed. Imlemented GetStackTrace service in Error_Services so that the stack contents can be logged with the RDS Layer error log.

This commit is contained in:
Infineon\StieberD 2025-03-21 13:54:43 -07:00 committed by Stieber Daniel (CSC FI SPS MESLEO)
parent 651b7ab420
commit f930fd3efe
6 changed files with 543 additions and 1079 deletions

File diff suppressed because it is too large Load Diff

View File

@ -27,30 +27,47 @@ Common /ErrorServices/ ErrorMessages@, ErrorSources@, ErrorCodes@, RetStacks@, E
Equ CRLF$ to \0D0A\
Declare function Environment_Services, Logging_Services, GetSessionCallStack, Error_Services, RetStack
Declare subroutine Logging_Services, Get_Status, Set_Env
Declare subroutine Logging_Services, Get_Status, Set_Env, GetTempPath
Main:
ErrorMessages = Error_Services('GetMessages')
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\StackTrace'
LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS')
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' Error Log.csv'
objLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, ',', '', '', False$, False$)
LogData = ''
LogData<1> = CRLF$:'Timestamp: ':LogDate:' ':LogTime
LogData<2> = 'Machine: ':Environment_Services('GetServer')
LogData<3> = 'Set_Status Code:':EsSpStatCode@
LogData<4> = 'Set_Status Message:':EsSpStatMessage@
ErrorMessages = Error_Services('GetMessages')
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\StackTrace'
LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS')
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' Error Log.csv'
objLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, ',', '', '', False$, False$)
TempLogFileName = 'OIStackLog.csv'
TempDirectory = Str(\00\, 1024)
GetTempPath(Len(TempDirectory), TempDirectory)
Convert \00\ to '' in TempDirectory
TempLogPath = TempDirectory
objTempLog = Logging_Services('NewLog', TempLogPath, TempLogFileName, CRLF$, ',', '', '', False$, True$)
LogData = ''
LogData<1> = CRLF$:'Timestamp: ':LogDate:' ':LogTime
LogData<2> = 'Machine: ':Environment_Services('GetServer')
LogData<3> = 'Set_Status Code:':EsSpStatCode@
LogData<4> = 'Set_Status Message:':EsSpStatMessage@
Swap @FM with @VM in ErrorMessages
LogData<5> = 'Error_Services Messages:':ErrorMessages
LogData<6> = 'Call Depth: ':CallDepth@
LogData<7> = 'Curr Program and line no: ':CallStack@<2,1>:@VM:CallStack@<2,2>
LogData<8> = 'Call Stack / Line Nos: '
Stack = CallStack@
Stack = Delete(Stack, 1, 0, 0)
LogData<9> = Stack:CRLF$
LogData<5> = 'Error_Services Messages:':ErrorMessages
LogData<6> = 'Call Depth: ':CallDepth@
Stack = CallStack@
Begin Case
Case ( (CallStack@<1,1> EQ 'ERROR_SERVICES') and (CallStack@<2,1> EQ 'ERROR_SERVICES') )
LogData<7> = 'Curr Program and line no: ':CallStack@<3,1>:@VM:CallStack@<3,2>
Stack = Delete(Stack, 1, 0, 0)
Stack = Delete(Stack, 1, 0, 0)
Case (CallStack@<1,1> EQ 'ERROR_SERVICES')
LogData<7> = 'Curr Program and line no: ':CallStack@<2,1>:@VM:CallStack@<2,2>
Stack = Delete(Stack, 1, 0, 0)
Case Otherwise$
LogData<7> = 'Curr Program and line no: ':CallStack@<1,1>:@VM:CallStack@<1,2>
End Case
LogData<8> = 'Call Stack / Line Nos: '
Convert \00\ to '' in Stack
LogData<9> = Stack:CRLF$
Logging_Services('AppendLog', objLog, LogData, @FM, @VM, '', '', '')
Logging_Services('AppendLog', objTempLog, LogData, @FM, @VM, '', '', '')
Return

View File

@ -102,7 +102,7 @@ If Assigned(Response) else Response = ''
AutoDisplayErrors = False$ ; // Set this to True$ when debugging so all errors will automatically display.
Declare function RetStack, Error_Services, SRPSendMail, Get_Env
Declare subroutine Error_Services, Set_Env, Set_Status
Declare subroutine Error_Services, Set_Env, Set_Status, GetTempPath
GoToService else
Error_Services('Set', Service : ' is not a valid service request within the Error services module.')
@ -311,16 +311,39 @@ Service GetCodes()
End Service
//----------------------------------------------------------------------------------------------------------------------
// GetStackTrace
//
// Uses a debugger intercept to log the stack including line numbers to a temporary file and returns the contents
// in the Response variable.
//
// Warning:
// Stepping into this while debugging will interrupt the debugging session and may cause an error message to
// be displayed. It is advised to set a breakpoint after the call and let the debugger run through this.
//----------------------------------------------------------------------------------------------------------------------
Service GetStackTrace()
// Business logic goes here. Data that needs to be returned should be assigned to the Response parameter.
Response = '<Service Response>'
Error_Services('LogStack')
TempLogFileName = 'OIStackLog.csv'
TempDirectory = Str(\00\, 1024)
GetTempPath(Len(TempDirectory), TempDirectory)
Convert \00\ to '' in TempDirectory
TempLogPath = TempDirectory:TempLogFileName
OSRead Response from TempLogpath else
Error_Services('Add', 'Error in ':Service:' service. Error retrieving OIStackLog.csv')
end
End Service
//----------------------------------------------------------------------------------------------------------------------
// LogStack
//
// Uses a custom debugger intercept to log the stack including line numbers to .../LogFiles/StackTrace.
// Uses a debugger intercept, DEBUGGER_LOGGER, to log the stack including line numbers to .../LogFiles/StackTrace.
//
// Warning:
// Stepping into this while debugging will interrupt the debugging session and may cause an error message to
// be displayed. It is advised to set a breakpoint after the call and let the debugger run through this.
//----------------------------------------------------------------------------------------------------------------------
Service LogStack()
@ -402,3 +425,4 @@ SendRuntimeAlert:
MsgSent = SRPSendMail(Message, ConfigFile)
return

View File

@ -81,12 +81,6 @@ LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' RDS
Headers = 'Logging DTM' : @FM : 'RDSNo' : @FM : 'WONo' : @FM : 'CassNo' : @FM : 'Reactor Type'
objLog3 = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, Comma$, Headers, '', False$, False$)
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\RDS_LAYER'
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' RDS_LAYER Log.csv'
Headers = 'Logging DTM' : @FM : 'Results'
ColumnWidths = 20 : @FM : 100
objLog2 = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, ' ', Headers, ColumnWidths, False$, False$)
If KeyID then GoSub Initialize_System_Variables
Begin Case
@ -1045,3 +1039,4 @@ Restore_System_Variables:
return

View File

@ -49,21 +49,13 @@ $insert FILE.SYSTEM.EQUATES
$insert ACTION_SETUP
$insert RDS_LAYER_EQUATES
Declare function Tool_Parms_Services, Environment_Services, Logging_Services, Memberof
Declare function Tool_Parms_Services, Environment_Services, Logging_Services, Memberof, Error_Services
Declare subroutine Logging_Services, Error_Services
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\RDS_LAYER_WriteIssue'
LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS')
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' RDS_LAYER WriteIssue Log.csv'
Headers = 'Logging DTM' : @FM : 'User' : @FM : 'RDS_LAYER Key ID' : @FM : 'Notes'
objLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, Comma$, Headers, '', False$, False$)
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
If KeyID then GoSub Initialize_System_Variables
Begin Case
Case Action _EQC 'CalcField' ; GoSub Calc_Field
Case Action _EQC 'READ_RECORD_PRE' ; GoSub READ_RECORD_PRE
Case Action _EQC 'READ_RECORD' ; GoSub READ_RECORD
@ -74,7 +66,7 @@ Begin Case
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
@ -99,7 +91,7 @@ Return ActionFlow
Calc_Field:
// Make sure the ActionFlow return variable is cleared in case nothing is calculated.
ActionFlow = ''
Begin Case
Case CalcColName EQ 'EXPORT_CONTROL' ; GoSub EXPORT_CONTROL
End Case
@ -151,382 +143,68 @@ return
WRITE_RECORD_PRE:
EngineeringCheck = Memberof(@User4, 'ENGINEERING')
If (EngineeringCheck EQ True$) then
ActionFlow = ACTION_CONTINUE$
end else
WriteIssue = False$
If (OrigRecord<RDS_LAYER_EPI_TIME_MIN$> NE '') AND (Record<RDS_LAYER_EPI_TIME_MIN$> EQ '') then
If Not(Memberof(@User4, 'ENGINEERING')) then
If ( (OrigRecord<RDS_LAYER_EPI_TIME_MIN$> NE '') AND (Record<RDS_LAYER_EPI_TIME_MIN$> EQ '') ) |
or ( (OrigRecord<RDS_LAYER_EPI_TIME_MAX$> NE '') AND (Record<RDS_LAYER_EPI_TIME_MAX$> EQ '') ) |
or ( (OrigRecord<RDS_LAYER_EPI_H2_FLOW_MIN$> NE '') AND (Record<RDS_LAYER_EPI_H2_FLOW_MIN$> EQ '') ) |
or ( (OrigRecord<RDS_LAYER_EPI_H2_FLOW_MAX$> NE '') AND (Record<RDS_LAYER_EPI_H2_FLOW_MAX$> EQ '') ) |
or ( (OrigRecord<RDS_LAYER_TCS_FLOW_MIN$> NE '') AND (Record<RDS_LAYER_TCS_FLOW_MIN$> EQ '') ) |
or ( (OrigRecord<RDS_LAYER_TCS_FLOW_MAX$> NE '') AND (Record<RDS_LAYER_TCS_FLOW_MAX$> EQ '') ) |
or ( (OrigRecord<RDS_LAYER_AUX1_MIN$> NE '') AND (Record<RDS_LAYER_AUX1_MIN$> EQ '') ) |
or ( (OrigRecord<RDS_LAYER_AUX1_MAX$> NE '') AND (Record<RDS_LAYER_AUX1_MAX$> EQ '') ) |
or ( (OrigRecord<RDS_LAYER_F_OFFSET_MIN$> NE '') AND (Record<RDS_LAYER_F_OFFSET_MIN$> EQ '') ) |
or ( (OrigRecord<RDS_LAYER_F_OFFSET_MAX$> NE '') AND (Record<RDS_LAYER_F_OFFSET_MAX$> EQ '') ) |
or ( (OrigRecord<RDS_LAYER_SUSC_ETCH_MIN$> NE '') AND (Record<RDS_LAYER_SUSC_ETCH_MIN$> EQ '') ) |
or ( (OrigRecord<RDS_LAYER_SUSC_ETCH_MAX$> NE '') AND (Record<RDS_LAYER_SUSC_ETCH_MAX$> EQ '') ) |
or ( (OrigRecord<RDS_LAYER_DILUENT_MIN$> NE '') AND (Record<RDS_LAYER_DILUENT_MIN$> EQ '') ) |
or ( (OrigRecord<RDS_LAYER_DILUENT_MAX$> NE '') AND (Record<RDS_LAYER_DILUENT_MAX$> EQ '') ) |
or ( (OrigRecord<RDS_LAYER_DOPANT_FLOW_MIN$> NE '') AND (Record<RDS_LAYER_DOPANT_FLOW_MIN$> EQ '') ) |
or ( (OrigRecord<RDS_LAYER_DOPANT_FLOW_MAX$> NE '') AND (Record<RDS_LAYER_DOPANT_FLOW_MAX$> EQ '') ) |
or ( (OrigRecord<RDS_LAYER_HCL_FLOW_MIN$> NE '') AND (Record<RDS_LAYER_HCL_FLOW_MIN$> EQ '') ) |
or ( (OrigRecord<RDS_LAYER_HCL_FLOW_MAX$> NE '') AND (Record<RDS_LAYER_HCL_FLOW_MAX$> EQ '') ) |
or ( (OrigRecord<RDS_LAYER_BAKE_TIME_MIN$> NE '') AND (Record<RDS_LAYER_BAKE_TIME_MIN$> EQ '') ) |
or ( (OrigRecord<RDS_LAYER_BAKE_TIME_MAX$> NE '') AND (Record<RDS_LAYER_BAKE_TIME_MAX$> EQ '') ) |
or ( (OrigRecord<RDS_LAYER_DCS_FLOW_MIN$> NE '') AND (Record<RDS_LAYER_DCS_FLOW_MIN$> EQ '') ) |
or ( (OrigRecord<RDS_LAYER_DCS_FLOW_MAX$> NE '') AND (Record<RDS_LAYER_DCS_FLOW_MAX$> EQ '') ) |
or ( (OrigRecord<RDS_LAYER_AUX2_MIN$> NE '') AND (Record<RDS_LAYER_AUX2_MIN$> EQ '') ) |
or ( (OrigRecord<RDS_LAYER_AUX2_MAX$> NE '') AND (Record<RDS_LAYER_AUX2_MAX$> EQ '') ) |
or ( (OrigRecord<RDS_LAYER_S_OFFSET_MIN$> NE '') AND (Record<RDS_LAYER_S_OFFSET_MIN$> EQ '') ) |
or ( (OrigRecord<RDS_LAYER_S_OFFSET_MAX$> NE '') AND (Record<RDS_LAYER_S_OFFSET_MAX$> EQ '') ) |
or ( (OrigRecord<RDS_LAYER_R_OFFSET_MIN$> NE '') AND (Record<RDS_LAYER_R_OFFSET_MIN$> EQ '') ) |
or ( (OrigRecord<RDS_LAYER_R_OFFSET_MAX$> NE '') AND (Record<RDS_LAYER_R_OFFSET_MAX$> EQ '') ) |
or ( (OrigRecord<RDS_LAYER_ETCH1_MIN$> NE '') AND (Record<RDS_LAYER_ETCH1_MIN$> EQ '') ) |
or ( (OrigRecord<RDS_LAYER_ETCH1_MAX$> NE '') AND (Record<RDS_LAYER_ETCH1_MAX$> EQ '') ) |
or ( (OrigRecord<RDS_LAYER_ETCH2_MIN$> NE '') AND (Record<RDS_LAYER_ETCH2_MIN$> EQ '') ) |
or ( (OrigRecord<RDS_LAYER_ETCH2_MAX$> NE '') AND (Record<RDS_LAYER_ETCH2_MAX$> EQ '') ) |
or ( (OrigRecord<RDS_LAYER_ETCH3_MIN$> NE '') AND (Record<RDS_LAYER_ETCH3_MIN$> EQ '') ) |
or ( (OrigRecord<RDS_LAYER_ETCH3_MAX$> NE '') AND (Record<RDS_LAYER_ETCH3_MAX$> EQ '') ) |
or ( (OrigRecord<RDS_LAYER_UL_TEMP_MIN$> NE '') AND (Record<RDS_LAYER_UL_TEMP_MIN$> EQ '') ) |
or ( (OrigRecord<RDS_LAYER_UL_TEMP_MAX$> NE '') AND (Record<RDS_LAYER_UL_TEMP_MAX$> EQ '') ) then
ErrorMsg = 'RDS_LAYER specifications can only be cleared by a member of Engineering.'
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\RDS_LAYER'
LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS')
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' RDS_LAYER_Spec_Clear_Attempt_Log.csv'
Headers = 'Logging DTM' : @FM : 'User' : @FM : 'RDS_LAYER Key ID' : @FM : 'Notes'
objLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, Comma$, Headers, '', False$, False$)
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = @USER4
LogData<3> = Name
LogData<4> = 'RDS_LAYER Epi Time Min can only be cleared by a member of Engineering.'
LogData<4> = ErrorMsg
LogData<5> = Error_Services('GetStackTrace')
Logging_Services('AppendLog', ObjLog, LogData, @RM, @FM, False$)
Error_Services('Add', 'RDS_LAYER Epi Time Min can only be cleared by a member of Engineering.')
WriteIssue = True$
end
If (OrigRecord<RDS_LAYER_EPI_TIME_MAX$> NE '') AND (Record<RDS_LAYER_EPI_TIME_MAX$> EQ '') then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = @USER4
LogData<3> = Name
LogData<4> = 'RDS_LAYER Epi Time Max can only be cleared by a member of Engineering.'
Logging_Services('AppendLog', ObjLog, LogData, @RM, @FM, False$)
Error_Services('Add', 'RDS_LAYER Epi Time Max can only be cleared by a member of Engineering.')
WriteIssue = True$
end
If (OrigRecord<RDS_LAYER_EPI_H2_FLOW_MIN$> NE '') AND (Record<RDS_LAYER_EPI_H2_FLOW_MIN$> EQ '') then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = @USER4
LogData<3> = Name
LogData<4> = 'RDS_LAYER Epi H2 Flow Min can only be cleared by a member of Engineering.'
Logging_Services('AppendLog', ObjLog, LogData, @RM, @FM, False$)
Error_Services('Add', 'RDS_LAYER Epi H2 Flow Min can only be cleared by a member of Engineering.')
WriteIssue = True$
end
If (OrigRecord<RDS_LAYER_EPI_H2_FLOW_MAX$> NE '') AND (Record<RDS_LAYER_EPI_H2_FLOW_MAX$> EQ '') then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = @USER4
LogData<3> = Name
LogData<4> = 'RDS_LAYER Epi H2 Flow Max can only be cleared by a member of Engineering.'
Logging_Services('AppendLog', ObjLog, LogData, @RM, @FM, False$)
Error_Services('Add', 'RDS_LAYER Epi H2 Flow Max can only be cleared by a member of Engineering.')
WriteIssue = True$
end
If (OrigRecord<RDS_LAYER_TCS_FLOW_MIN$> NE '') AND (Record<RDS_LAYER_TCS_FLOW_MIN$> EQ '') then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = @USER4
LogData<3> = Name
LogData<4> = 'RDS_LAYER TCS Flow Min can only be cleared by a member of Engineering.'
Logging_Services('AppendLog', ObjLog, LogData, @RM, @FM, False$)
Error_Services('Add', 'RDS_LAYER TCS Flow Min can only be cleared by a member of Engineering.')
WriteIssue = True$
end
If (OrigRecord<RDS_LAYER_TCS_FLOW_MAX$> NE '') AND (Record<RDS_LAYER_TCS_FLOW_MAX$> EQ '') then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = @USER4
LogData<3> = Name
LogData<4> = 'RDS_LAYER TCS Flow Max can only be cleared by a member of Engineering.'
Logging_Services('AppendLog', ObjLog, LogData, @RM, @FM, False$)
Error_Services('Add', 'RDS_LAYER TCS Flow Max can only be cleared by a member of Engineering.')
WriteIssue = True$
end
If (OrigRecord<RDS_LAYER_AUX1_MIN$> NE '') AND (Record<RDS_LAYER_AUX1_MIN$> EQ '') then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = @USER4
LogData<3> = Name
LogData<4> = 'RDS_LAYER Aux1 Min can only be cleared by a member of Engineering.'
Logging_Services('AppendLog', ObjLog, LogData, @RM, @FM, False$)
Error_Services('Add', 'RDS_LAYER Aux1 Min can only be cleared by a member of Engineering.')
WriteIssue = True$
end
If (OrigRecord<RDS_LAYER_AUX1_MAX$> NE '') AND (Record<RDS_LAYER_AUX1_MAX$> EQ '') then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = @USER4
LogData<3> = Name
LogData<4> = 'RDS_LAYER Aux1 Max can only be cleared by a member of Engineering.'
Logging_Services('AppendLog', ObjLog, LogData, @RM, @FM, False$)
Error_Services('Add', 'RDS_LAYER Aux1 Max can only be cleared by a member of Engineering.')
WriteIssue = True$
end
If (OrigRecord<RDS_LAYER_F_OFFSET_MIN$> NE '') AND (Record<RDS_LAYER_F_OFFSET_MIN$> EQ '') then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = @USER4
LogData<3> = Name
LogData<4> = 'RDS_LAYER F Offset Min can only be cleared by a member of Engineering.'
Logging_Services('AppendLog', ObjLog, LogData, @RM, @FM, False$)
Error_Services('Add', 'RDS_LAYER F Offset Min can only be cleared by a member of Engineering.')
WriteIssue = True$
end
If (OrigRecord<RDS_LAYER_F_OFFSET_MAX$> NE '') AND (Record<RDS_LAYER_F_OFFSET_MAX$> EQ '') then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = @USER4
LogData<3> = Name
LogData<4> = 'RDS_LAYER F Offset Max can only be cleared by a member of Engineering.'
Logging_Services('AppendLog', ObjLog, LogData, @RM, @FM, False$)
Error_Services('Add', 'RDS_LAYER F Offset Max can only be cleared by a member of Engineering.')
WriteIssue = True$
end
If (OrigRecord<RDS_LAYER_SUSC_ETCH_MIN$> NE '') AND (Record<RDS_LAYER_SUSC_ETCH_MIN$> EQ '') then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = @USER4
LogData<3> = Name
LogData<4> = 'RDS_LAYER Susc Etch Min can only be cleared by a member of Engineering.'
Logging_Services('AppendLog', ObjLog, LogData, @RM, @FM, False$)
Error_Services('Add', 'RDS_LAYER Susc Etch Min can only be cleared by a member of Engineering.')
WriteIssue = True$
end
If (OrigRecord<RDS_LAYER_SUSC_ETCH_MAX$> NE '') AND (Record<RDS_LAYER_SUSC_ETCH_MAX$> EQ '') then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = @USER4
LogData<3> = Name
LogData<4> = 'RDS_LAYER Susc Etch Max can only be cleared by a member of Engineering.'
Logging_Services('AppendLog', ObjLog, LogData, @RM, @FM, False$)
Error_Services('Add', 'RDS_LAYER Susc Etch Max can only be cleared by a member of Engineering.')
WriteIssue = True$
end
If (OrigRecord<RDS_LAYER_DILUENT_MIN$> NE '') AND (Record<RDS_LAYER_DILUENT_MIN$> EQ '') then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = @USER4
LogData<3> = Name
LogData<4> = 'RDS_LAYER Dilutent Min can only be cleared by a member of Engineering.'
Logging_Services('AppendLog', ObjLog, LogData, @RM, @FM, False$)
Error_Services('Add', 'RDS_LAYER Dilutent Min can only be cleared by a member of Engineering.')
WriteIssue = True$
end
If (OrigRecord<RDS_LAYER_DILUENT_MAX$> NE '') AND (Record<RDS_LAYER_DILUENT_MAX$> EQ '') then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = @USER4
LogData<3> = Name
LogData<4> = 'RDS_LAYER Dilutent Max can only be cleared by a member of Engineering.'
Logging_Services('AppendLog', ObjLog, LogData, @RM, @FM, False$)
Error_Services('Add', 'RDS_LAYER Dilutent Max can only be cleared by a member of Engineering.')
WriteIssue = True$
end
If (OrigRecord<RDS_LAYER_DOPANT_FLOW_MIN$> NE '') AND (Record<RDS_LAYER_DOPANT_FLOW_MIN$> EQ '') then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = @USER4
LogData<3> = Name
LogData<4> = 'RDS_LAYER Dopant Flow Min can only be cleared by a member of Engineering.'
Logging_Services('AppendLog', ObjLog, LogData, @RM, @FM, False$)
Error_Services('Add', 'RDS_LAYER Dopant Flow Min can only be cleared by a member of Engineering.')
WriteIssue = True$
end
If (OrigRecord<RDS_LAYER_DOPANT_FLOW_MAX$> NE '') AND (Record<RDS_LAYER_DOPANT_FLOW_MAX$> EQ '') then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = @USER4
LogData<3> = Name
LogData<4> = 'RDS_LAYER Dopant Flow Max can only be cleared by a member of Engineering.'
Logging_Services('AppendLog', ObjLog, LogData, @RM, @FM, False$)
Error_Services('Add', 'RDS_LAYER Dopant Flow Max can only be cleared by a member of Engineering.')
WriteIssue = True$
end
If (OrigRecord<RDS_LAYER_HCL_FLOW_MIN$> NE '') AND (Record<RDS_LAYER_HCL_FLOW_MIN$> EQ '') then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = @USER4
LogData<3> = Name
LogData<4> = 'RDS_LAYER HCL Flow Min can only be cleared by a member of Engineering.'
Logging_Services('AppendLog', ObjLog, LogData, @RM, @FM, False$)
Error_Services('Add', 'RDS_LAYER HCL Flow Min can only be cleared by a member of Engineering.')
WriteIssue = True$
end
If (OrigRecord<RDS_LAYER_HCL_FLOW_MAX$> NE '') AND (Record<RDS_LAYER_HCL_FLOW_MAX$> EQ '') then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = @USER4
LogData<3> = Name
LogData<4> = 'RDS_LAYER HCL Flow Max can only be cleared by a member of Engineering.'
Logging_Services('AppendLog', ObjLog, LogData, @RM, @FM, False$)
Error_Services('Add', 'RDS_LAYER HCL Flow Max can only be cleared by a member of Engineering.')
WriteIssue = True$
end
If (OrigRecord<RDS_LAYER_BAKE_TIME_MIN$> NE '') AND (Record<RDS_LAYER_BAKE_TIME_MIN$> EQ '') then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = @USER4
LogData<3> = Name
LogData<4> = 'RDS_LAYER Bake Time Min can only be cleared by a member of Engineering.'
Logging_Services('AppendLog', ObjLog, LogData, @RM, @FM, False$)
Error_Services('Add', 'RDS_LAYER Bake Time Min can only be cleared by a member of Engineering.')
WriteIssue = True$
end
If (OrigRecord<RDS_LAYER_BAKE_TIME_MAX$> NE '') AND (Record<RDS_LAYER_BAKE_TIME_MAX$> EQ '') then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = @USER4
LogData<3> = Name
LogData<4> = 'RDS_LAYER Bake Time Max can only be cleared by a member of Engineering.'
Logging_Services('AppendLog', ObjLog, LogData, @RM, @FM, False$)
Error_Services('Add', 'RDS_LAYER Bake Time Max can only be cleared by a member of Engineering.')
WriteIssue = True$
end
If (OrigRecord<RDS_LAYER_DCS_FLOW_MIN$> NE '') AND (Record<RDS_LAYER_DCS_FLOW_MIN$> EQ '') then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = @USER4
LogData<3> = Name
LogData<4> = 'RDS_LAYER DCS Flow Min can only be cleared by a member of Engineering.'
Logging_Services('AppendLog', ObjLog, LogData, @RM, @FM, False$)
Error_Services('Add', 'RDS_LAYER DCS Flow Min can only be cleared by a member of Engineering.')
WriteIssue = True$
end
If (OrigRecord<RDS_LAYER_DCS_FLOW_MAX$> NE '') AND (Record<RDS_LAYER_DCS_FLOW_MAX$> EQ '') then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = @USER4
LogData<3> = Name
LogData<4> = 'RDS_LAYER DCS Flow Max can only be cleared by a member of Engineering.'
Logging_Services('AppendLog', ObjLog, LogData, @RM, @FM, False$)
Error_Services('Add', 'RDS_LAYER DCS Flow Max can only be cleared by a member of Engineering.')
WriteIssue = True$
end
If (OrigRecord<RDS_LAYER_AUX2_MIN$> NE '') AND (Record<RDS_LAYER_AUX2_MIN$> EQ '') then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = @USER4
LogData<3> = Name
LogData<4> = 'RDS_LAYER Aux2 Min can only be cleared by a member of Engineering.'
Logging_Services('AppendLog', ObjLog, LogData, @RM, @FM, False$)
Error_Services('Add', 'RDS_LAYER Aux2 Min can only be cleared by a member of Engineering.')
WriteIssue = True$
end
If (OrigRecord<RDS_LAYER_AUX2_MAX$> NE '') AND (Record<RDS_LAYER_AUX2_MAX$> EQ '') then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = @USER4
LogData<3> = Name
LogData<4> = 'RDS_LAYER Aux2 Max can only be cleared by a member of Engineering.'
Logging_Services('AppendLog', ObjLog, LogData, @RM, @FM, False$)
Error_Services('Add', 'RDS_LAYER Aux2 Max can only be cleared by a member of Engineering.')
WriteIssue = True$
end
If (OrigRecord<RDS_LAYER_S_OFFSET_MIN$> NE '') AND (Record<RDS_LAYER_S_OFFSET_MIN$> EQ '') then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = @USER4
LogData<3> = Name
LogData<4> = 'RDS_LAYER S Offset Min can only be cleared by a member of Engineering.'
Logging_Services('AppendLog', ObjLog, LogData, @RM, @FM, False$)
Error_Services('Add', 'RDS_LAYER S Offset Min can only be cleared by a member of Engineering.')
WriteIssue = True$
end
If (OrigRecord<RDS_LAYER_S_OFFSET_MAX$> NE '') AND (Record<RDS_LAYER_S_OFFSET_MAX$> EQ '') then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = @USER4
LogData<3> = Name
LogData<4> = 'RDS_LAYER S Offset Max can only be cleared by a member of Engineering.'
Logging_Services('AppendLog', ObjLog, LogData, @RM, @FM, False$)
Error_Services('Add', 'RDS_LAYER S Offset Max can only be cleared by a member of Engineering.')
WriteIssue = True$
end
If (OrigRecord<RDS_LAYER_R_OFFSET_MIN$> NE '') AND (Record<RDS_LAYER_R_OFFSET_MIN$> EQ '') then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = @USER4
LogData<3> = Name
LogData<4> = 'RDS_LAYER R Offset Min can only be cleared by a member of Engineering.'
Logging_Services('AppendLog', ObjLog, LogData, @RM, @FM, False$)
Error_Services('Add', 'RDS_LAYER R Offset Min can only be cleared by a member of Engineering.')
WriteIssue = True$
end
If (OrigRecord<RDS_LAYER_R_OFFSET_MAX$> NE '') AND (Record<RDS_LAYER_R_OFFSET_MAX$> EQ '') then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = @USER4
LogData<3> = Name
LogData<4> = 'RDS_LAYER R Offset Max can only be cleared by a member of Engineering.'
Logging_Services('AppendLog', ObjLog, LogData, @RM, @FM, False$)
Error_Services('Add', 'RDS_LAYER R Offset Max can only be cleared by a member of Engineering.')
WriteIssue = True$
end
If (OrigRecord<RDS_LAYER_ETCH1_MIN$> NE '') AND (Record<RDS_LAYER_ETCH1_MIN$> EQ '') then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = @USER4
LogData<3> = Name
LogData<4> = 'RDS_LAYER Etch 1 Min can only be cleared by a member of Engineering.'
Logging_Services('AppendLog', ObjLog, LogData, @RM, @FM, False$)
Error_Services('Add', 'RDS_LAYER Etch 1 Min can only be cleared by a member of Engineering.')
WriteIssue = True$
end
If (OrigRecord<RDS_LAYER_ETCH1_MAX$> NE '') AND (Record<RDS_LAYER_ETCH1_MAX$> EQ '') then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = @USER4
LogData<3> = Name
LogData<4> = 'RDS_LAYER Etch 1 Max can only be cleared by a member of Engineering.'
Logging_Services('AppendLog', ObjLog, LogData, @RM, @FM, False$)
Error_Services('Add', 'RDS_LAYER Etch 1 Max can only be cleared by a member of Engineering.')
WriteIssue = True$
end
If (OrigRecord<RDS_LAYER_ETCH2_MIN$> NE '') AND (Record<RDS_LAYER_ETCH2_MIN$> EQ '') then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = @USER4
LogData<3> = Name
LogData<4> = 'RDS_LAYER Etch 2 Min can only be cleared by a member of Engineering.'
Logging_Services('AppendLog', ObjLog, LogData, @RM, @FM, False$)
Error_Services('Add', 'RDS_LAYER Etch 2 Min can only be cleared by a member of Engineering.')
WriteIssue = True$
end
If (OrigRecord<RDS_LAYER_ETCH2_MAX$> NE '') AND (Record<RDS_LAYER_ETCH2_MAX$> EQ '') then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = @USER4
LogData<3> = Name
LogData<4> = 'RDS_LAYER Etch 2 Max can only be cleared by a member of Engineering.'
Logging_Services('AppendLog', ObjLog, LogData, @RM, @FM, False$)
Error_Services('Add', 'RDS_LAYER Etch 2 Max can only be cleared by a member of Engineering.')
WriteIssue = True$
end
If (OrigRecord<RDS_LAYER_ETCH3_MIN$> NE '') AND (Record<RDS_LAYER_ETCH3_MIN$> EQ '') then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = @USER4
LogData<3> = Name
LogData<4> = 'RDS_LAYER Etch 3 Min can only be cleared by a member of Engineering.'
Logging_Services('AppendLog', ObjLog, LogData, @RM, @FM, False$)
Error_Services('Add', 'RDS_LAYER Etch 3 Min can only be cleared by a member of Engineering.')
WriteIssue = True$
end
If (OrigRecord<RDS_LAYER_ETCH3_MAX$> NE '') AND (Record<RDS_LAYER_ETCH3_MAX$> EQ '') then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = @USER4
LogData<3> = Name
LogData<4> = 'RDS_LAYER Etch 3 Max can only be cleared by a member of Engineering.'
Logging_Services('AppendLog', ObjLog, LogData, @RM, @FM, False$)
Error_Services('Add', 'RDS_LAYER Etch 3 Max can only be cleared by a member of Engineering.')
WriteIssue = True$
end
If (OrigRecord<RDS_LAYER_UL_TEMP_MIN$> NE '') AND (Record<RDS_LAYER_UL_TEMP_MIN$> EQ '') then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = @USER4
LogData<3> = Name
LogData<4> = 'RDS_LAYER UL Temp Min can only be cleared by a member of Engineering.'
Logging_Services('AppendLog', ObjLog, LogData, @RM, @FM, False$)
Error_Services('Add', 'RDS_LAYER UL Temp Min can only be cleared by a member of Engineering.')
WriteIssue = True$
end
If (OrigRecord<RDS_LAYER_UL_TEMP_MAX$> NE '') AND (Record<RDS_LAYER_UL_TEMP_MAX$> EQ '') then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = @USER4
LogData<3> = Name
LogData<4> = 'RDS_LAYER UL Temp Max can only be cleared by a member of Engineering.'
Logging_Services('AppendLog', ObjLog, LogData, @RM, @FM, False$)
Error_Services('Add', 'RDS_LAYER UL Temp Max can only be cleared by a member of Engineering.')
WriteIssue = True$
end
// User is attempting to erase data that is prohibited from being erased Set the FS104 error and block the write.
If WriteIssue EQ True$ then
OrigFileError = 104:': RDS_LAYER params can only be cleared by a member of Engineering.'
Error_Services('LogStack')
Error_Services('Add', ErrorMsg)
OrigFileError = 104:': ':ErrorMsg
Status = 0
Record = ''
ActionFlow = ACTION_STOP$
Error_Services('LogStack')
end else
ActionFlow = ACTION_CONTINUE$
ActionFlow = ACTION_STOP$
end
end
@ -545,12 +223,13 @@ 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
@ -559,11 +238,11 @@ Initialize_System_Variables:
CurrentDictName = Field(@TABLES(0), @FM, fPos, 1)
end
end
If CurrentDictName NE DictName then
Open DictName to @DICT else Status = 'Unable to initialize @DICT'
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.
@ -573,16 +252,21 @@ Initialize_System_Variables:
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

@ -35,6 +35,7 @@ Compile function RDS_LAYER_EVENTS(CtrlEntId, Event, @PARAMS)
#pragma precomp SRP_PreCompiler
#window RDS_LAYER
$Insert EVENT_SETUP
$Insert RDS_EQUATES
$Insert APP_INSERTS
$Insert RLIST_EQUATES
@ -54,7 +55,7 @@ EQU HIDDEN$ TO 32
Declare subroutine Comm_RDS_Layer, Tool_Parms_Services, Set_Status, RList, Errmsg, Database_Services, Msg
Declare subroutine PlaceDialog, obj_RDS_Layer, Security_Err_Msg
Declare function Tool_Parms_Services, Get_Property, Database_Services, Security_Check, MemberOf
Declare function Tool_Parms_Services, Get_Property, Database_Services, Security_Check, MemberOf, Get_EventStatus
GoToEvent Event for CtrlEntId else
// Event not implemented
@ -98,7 +99,7 @@ Event WINDOW.WRITE()
IF CurrRecord NE OrgRecord THEN
CurrDTM = OCONV(Date(),'D4/'):' ':OCONV(Time(),'MTS')
NewLine = @USER4:@VM:CurrDTM
Send_Message(@WINDOW:'.MODIFY_USER','INSERT',1,NewLine)
Send_Message(@WINDOW:'.MODIFY_USER', 'INSERT', 1, NewLine)
END
IOOptions = Get_Property(@Window, 'IOOPTIONS')
@ -107,104 +108,16 @@ Event WINDOW.WRITE()
Set_Status(0)
Forward_Event()
errCode = ''
If Get_Status(errCode) then ErrMsg('Save failed. Error code: ':errCode)
Post_Event(@WINDOW,'CLOSE')
* end else
*
* MsgHead = 'Default Run Parameters'
* MsgText = 'Would you like to use these parameters as the default for future lots?'
*
* Response = Msg(@WINDOW,'','YESNO','',MsgHead:@FM:MsgText)
*
* IF Response EQ True$ THEN
*
* RDSNo = Get_Property(@Window : '.RDS_NO', 'TEXT')
* Database_Services('ActivateRecord', 'RDS', RDSNo)
* WorkOrder = {WO}
* ReactorNo = {REACTOR}
* PSN = {PROD_SPEC_ID}
* If PSN NE '' then
* If ReactorNo EQ '' then
* ReactorNo = {SCHED_REACTOR}
* If ReactorNo EQ '' then
* ErrorMsg = 'No scheduled reactor found for work order: ':WorkOrder:'. Could not apply current ':@SVM |
* : 'run parameters. Please assign a reactor to this RDS first.'
* ErrMsg(ErrorMsg)
* return
* end
* end
* // Create a new TOOL_PARMS record, which is the "master" parameter record.
* Tool_Parms_Services('CreateToolParmsRec', PSN, ReactorNo, RDSNo)
* If Error_Services('NoError') then
* Msg(@Window, '', 'SUCCESS', '', 'Run parameters have been set for reactor ':ReactorNo)
* end else
* Errmsg('Error setting run parameters. Error message: ':Error_Services('GetMessage'))
* end
* end else
* ErrorMsg = 'No PSN assigned to this RDS. Could not apply current ':@SVM |
* : 'run parameters. Please assign a PSN to this RDS first.'
* ErrMsg(ErrorMsg)
* return
* end
* end
* end
If Get_EventStatus(errCode) then
EventFlow = EVENT_STOP$
end else
Post_Event(@WINDOW,'CLOSE')
end
end event
* Event BTN_SET_CURR_RUN_PARMS.CLICK()
*
* // Use new RDS_LAYER parameters to create a new TOOL_PARMS record.
* // Then apply the new TOOL_PARMS to all RDS records in this work order on this reactor.
* // Note: If a reactor has not yet been assigned to an RDS in this work order, then
* // the TOOL_PARMS will be applied anyways as a convenience. Should the RDS be
* // reassigned to another reactor later, the appropriate TOOL_PARMS will be applied
* // by the RDS_ACTIONS MFS.
*
* Savewarn = Get_Property(@Window, 'SAVEWARN')
* Set_Property(@Window, '@SKIPSCRIPT', True$)
* If Savewarn EQ True$ then
* IOOptions = Get_Property(@Window, 'IOOPTIONS')
* IOOptions<6> = 1
* Set_Property(@Window, 'IOOPTIONS', IOOptions)
* Send_Event(@Window, 'WRITE')
* end
* RDSNo = Get_Property(@Window : '.RDS_NO', 'TEXT')
* Database_Services('ActivateRecord', 'RDS', RDSNo)
* WorkOrder = {WO}
* ReactorNo = {REACTOR}
* PSN = {PROD_SPEC_ID}
* If PSN NE '' then
* If ReactorNo EQ '' then
* ReactorNo = {SCHED_REACTOR}
* If ReactorNo EQ '' then
* ErrorMsg = 'No scheduled reactor found for work order: ':WorkOrder:'. Could not apply current ':@SVM |
* : 'run parameters. Please assign a reactor to this RDS first.'
* ErrMsg(ErrorMsg)
* return
* end
* end
* // Create a new TOOL_PARMS record, which is the "master" parameter record.
* Tool_Parms_Services('CreateToolParmsRec', PSN, ReactorNo, RDSNo)
* // Apply new TOOL_PARMS record to all RDS_LAYERS in this run without an unload signature.
* Tool_Parms_Services('ApplyCurrentRunParms', PSN, ReactorNo)
* If Error_Services('NoError') then
* Msg(@Window, '', 'SUCCESS', '', 'Run parameters have been set for reactor ':ReactorNo)
* end else
* Errmsg('Error setting run parameters. Error message: ':Error_Services('GetMessage'))
* end
* end else
* ErrorMsg = 'No PSN assigned to this RDS. Could not apply current ':@SVM |
* : 'run parameters. Please assign a PSN to this RDS first.'
* ErrMsg(ErrorMsg)
* return
* end
*
* end event
Event PUB_CONFIRM_PARMS.CLICK()
RDSNo = Get_Property(@Window:'.RDS_NO', 'TEXT')
@ -248,9 +161,11 @@ end event
ClearCursors:
For counter = 0 to 8
ClearSelect counter
Next counter
return
@ -348,11 +263,6 @@ Refresh:
Parameter_Styles = Send_Message( @WINDOW:'.RECIPE_PARMS', "COLSTYLE", 0, ParameterStyles )
LimitStyles = Send_Message( @WINDOW:'.RECIPE_LIMITS', "COLSTYLE", 0, LimitStyles )
* Set_Property( @WINDOW:'.RECIPE_INFO', "AUTOSIZECOL", 16 )
* Set_Property( @WINDOW:'.RECIPE_LIMITS', "AUTOSIZECOL", 16 )
* QBF buttons
Ctrls = @WINDOW:'.QBF_FIRST_FIX':@RM ; Props = 'ENABLED':@RM
@ -389,7 +299,6 @@ Refresh:
NEXT I
NEXT I
TestList = Get_Property(@WINDOW:'.RDS_TEST_KEYS','LIST')
FOR I = 1 TO COUNT(TestList,@FM) + (TestList NE '')
@ -400,14 +309,6 @@ Refresh:
END
NEXT I
* RPCopy = RecipeParms
* Convert @FM to '' in RPCopy
* If RPCopy EQ '' then
* Set_Property(@Window : '.BTN_SET_CURR_RUN_PARMS', 'ENABLED', False$)
* end else
* Set_Property(@Window : '.BTN_SET_CURR_RUN_PARMS', 'ENABLED', True$)
* end
IsTestWafer = Xlate('RDS', RDSNo, 'ON_TW_FREQ', 'X')
RDSLayerAck = RDSRec<RDS_RDS_LAYER_ACK$>
If ( (IsTestWafer EQ True$) and ( (RDSLayerAck EQ False$) or (RDSLayerAck EQ '') ) ) then