Added lock protection for COC service.

This commit is contained in:
Infineon\Mitchem 2024-12-03 10:20:52 -07:00
parent 8dce7988c6
commit 7782918afd

View File

@ -27,6 +27,7 @@ $Insert COC_EQUATES
$Insert COMPANY_EQUATES $Insert COMPANY_EQUATES
Declare function Error_Services, Company_Services, FTP_Services, Environment_Services, Logging_Services, Shipment_Services Declare function Error_Services, Company_Services, FTP_Services, Environment_Services, Logging_Services, Shipment_Services
Declare function Database_Services
Declare subroutine Error_Services, Mona_Services, Rlist, SRP_Stopwatch, Logging_Services, Database_Services Declare subroutine Error_Services, Mona_Services, Rlist, SRP_Stopwatch, Logging_Services, Database_Services
Declare subroutine Shipment_Services, OBJ_Notes Declare subroutine Shipment_Services, OBJ_Notes
@ -61,6 +62,8 @@ Options MonaResources = 'FILE_GENERATION', 'FILE_TRANSMISSION', 'FILE_AVAILABILI
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
Service CycleRetentionDates() Service CycleRetentionDates()
hSysLists = Database_Services('GetTableHandle', 'SYSLISTS')
Lock hSysLists, ServiceKeyID then
CycleRec = Xlate('APP_INFO', 'COC_AVAILABILITY', '', 'X') CycleRec = Xlate('APP_INFO', 'COC_AVAILABILITY', '', 'X')
TodayDate = Date() TodayDate = Date()
EarliestDate = Shipment_Services('GetEarliestDate') EarliestDate = Shipment_Services('GetEarliestDate')
@ -103,6 +106,8 @@ Service CycleRetentionDates()
EndDate = Oconv(EndDate, 'D4-') EndDate = Oconv(EndDate, 'D4-')
Shipment_Services('CheckFileAvailability', StartDate, EndDate) Shipment_Services('CheckFileAvailability', StartDate, EndDate)
end end
Unlock hSysLists, ServiceKeyID else null
end
end service end service
@ -320,3 +325,4 @@ CompanyExceptionCheck:
return return