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

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