Add MFS to prevent users from clearing RDS_LAYER

params.
This commit is contained in:
Infineon\Mitchem 2025-03-19 14:44:04 -07:00 committed by Stieber Daniel (CSC FI SPS MESLEO)
parent 2ee2112be2
commit 651b7ab420

View File

@ -49,7 +49,16 @@ $insert FILE.SYSTEM.EQUATES
$insert ACTION_SETUP
$insert RDS_LAYER_EQUATES
Declare function Tool_Parms_Services
Declare function Tool_Parms_Services, Environment_Services, Logging_Services, Memberof
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
@ -141,6 +150,386 @@ READONLY_RECORD:
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
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.'
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.'
Status = 0
Record = ''
ActionFlow = ACTION_STOP$
Error_Services('LogStack')
end else
ActionFlow = ACTION_CONTINUE$
end
end
return
WRITE_RECORD: