diff --git a/LSL2/STPROC/RDS_LAYER_ACTIONS.txt b/LSL2/STPROC/RDS_LAYER_ACTIONS.txt index 147832a..e8d5909 100644 --- a/LSL2/STPROC/RDS_LAYER_ACTIONS.txt +++ b/LSL2/STPROC/RDS_LAYER_ACTIONS.txt @@ -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 NE '') AND (Record 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 NE '') AND (Record 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 NE '') AND (Record 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 NE '') AND (Record 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 NE '') AND (Record 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 NE '') AND (Record 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 NE '') AND (Record 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 NE '') AND (Record 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 NE '') AND (Record 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 NE '') AND (Record 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 NE '') AND (Record 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 NE '') AND (Record 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 NE '') AND (Record 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 NE '') AND (Record 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 NE '') AND (Record 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 NE '') AND (Record 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 NE '') AND (Record 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 NE '') AND (Record 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 NE '') AND (Record 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 NE '') AND (Record 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 NE '') AND (Record 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 NE '') AND (Record 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 NE '') AND (Record 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 NE '') AND (Record 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 NE '') AND (Record 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 NE '') AND (Record 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 NE '') AND (Record 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 NE '') AND (Record 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 NE '') AND (Record 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 NE '') AND (Record 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 NE '') AND (Record 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 NE '') AND (Record 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 NE '') AND (Record 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 NE '') AND (Record 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 NE '') AND (Record 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 NE '') AND (Record 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: