Merged PR 28607: Archive Services Initial Pull

This is the initial pull for Archiving data.
This commit is contained in:
Ouellette Jonathan (CSC FI SPS MESLEO)
2025-10-16 23:55:23 +00:00
parent cbb52c469b
commit 05e0fb3eda
15 changed files with 3246 additions and 696 deletions

View File

@ -72,24 +72,24 @@ Options BOOLEAN = True$, False$
// Therefore, this will be removed before returning to the caller.
//----------------------------------------------------------------------------------------------------------------------
Service GetServer()
NumFields = DCount(@Station, '_')
Server = Field(@Station, '_', 1, NumFields - 1)
Response = Server
end service
Service IsProd()
Machine = Environment_Services('GetServer')
IsProd = False$
If Machine _NEC "messa012" and Machine _NEC "mestsa01ec" and Machine _NEC "mestsa09ec" and Machine _NEC "mestsa010ec" and Machine _NEC "mestsa011ec" and Machine _NEC "mestsa012ec" and Machine _NEC "mestsa024ec" and Machine _NEC "MESTST1010" and Machine _NEC "MESTST1009" then
IsProd = True$
end
Response = IsProd
Machine = Environment_Services('GetServer')
IsProd = False$
If Machine _NEC "messa012" and Machine _NEC "mestsa01ec" and Machine _NEC "mestsa09ec" and Machine _NEC "mestsa010ec" and Machine _NEC "mestsa011ec" and Machine _NEC "mestsa012ec" and Machine _NEC "mestsa024ec" and Machine _NEC "MESTST1010" and Machine _NEC "MESTST1009" then
IsProd = True$
end
Response = IsProd
end service
@ -99,12 +99,12 @@ end service
// Returns the application's root path. If this is a server, the shared folder will be included.
//----------------------------------------------------------------------------------------------------------------------
Service GetApplicationRootPath()
RootIP = Environment_Services('GetApplicationRootIP')
ApplicationRootPath = RootIP : '\Apps'
Response = ApplicationRootPath
end service
@ -114,17 +114,17 @@ end service
// Returns the application's root IP.
//----------------------------------------------------------------------------------------------------------------------
Service GetApplicationRootIP()
Machine = Environment_Services('GetServer')
Begin Case
Case Machine EQ 'MESSA005' ; ApplicationRootIP = '\\messa005.infineon.com'
Case Machine EQ 'MESSA005' ; ApplicationRootIP = '\\messa005.infineon.com'
Case Machine EQ 'MESTSA01EC' ; ApplicationRootIP = '\\10.95.140.13'
Case Machine EQ 'MESTSA09EC' ; ApplicationRootIP = '\\10.95.140.62'
Case Machine EQ 'MESTSA010EC' ; ApplicationRootIP = '\\10.95.140.63'
Case Machine EQ 'MESTSA011EC' ; ApplicationRootIP = '\\10.95.140.64'
Case Machine EQ 'MESTSA012EC' ; ApplicationRootIP = '\\10.95.140.65'
Case Machine EQ 'MESTSA024EC' ; ApplicationRootIP = '\\10.95.140.66'
Case Machine EQ 'MESTSA09EC' ; ApplicationRootIP = '\\10.95.140.62'
Case Machine EQ 'MESTSA010EC' ; ApplicationRootIP = '\\10.95.140.63'
Case Machine EQ 'MESTSA011EC' ; ApplicationRootIP = '\\10.95.140.64'
Case Machine EQ 'MESTSA012EC' ; ApplicationRootIP = '\\10.95.140.65'
Case Machine EQ 'MESTSA024EC' ; ApplicationRootIP = '\\10.95.140.66'
Case Machine EQ 'MESSA012' ; ApplicationRootIP = '\\10.95.176.50'
Case Machine EQ 'MESST5201' ; ApplicationRootIP = '\\10.95.140.14'
Case Machine EQ 'MESST5202' ; ApplicationRootIP = '\\10.95.140.14'
@ -132,9 +132,9 @@ Service GetApplicationRootIP()
Case Machine EQ 'MESTST1010' ; ApplicationRootIP = '\\10.95.140.13'
Case Otherwise$ ; ApplicationRootIP = '\\10.95.140.14'
End Case
Response = ApplicationRootIP
end service
@ -144,10 +144,10 @@ end service
// Returns the FTP root path. This is where the scripts and FTP transfer files will be located.
//----------------------------------------------------------------------------------------------------------------------
Service GetFTPRootPath()
Machine = Environment_Services('GetServer')
RootPath = Environment_Services('GetLocalRootPath')
Begin Case
Case Machine EQ 'MESIRWAP001' ; FTPRootPath = RootPath
Case Machine EQ 'MESSA005' ; FTPRootPath = RootPath : '\FTP'
@ -156,9 +156,9 @@ Service GetFTPRootPath()
Case Machine EQ 'MESST6502' ; FTPRootPath = RootPath : '\FTP'
Case Otherwise$ ; FTPRootPath = RootPath : '\FTP'
End Case
Response = FTPRootPath
end service
@ -168,10 +168,10 @@ end service
// Returns the Reports root path. This is where various reports will be located.
//----------------------------------------------------------------------------------------------------------------------
Service GetReportsRootPath()
RootPath = Environment_Services('GetLocalRootPath')
Response = RootPath : '\OIReports'
end service
@ -181,10 +181,10 @@ end service
// Returns the user data root path. This is where various reports will be located.
//----------------------------------------------------------------------------------------------------------------------
Service GetUserDataRootPath()
UserDataRootPath = '\\messdv002.na.infineon.com'
Response = UserDataRootPath
end service
@ -194,10 +194,10 @@ end service
// Returns the user data production path. This is where various reports will be located.
//----------------------------------------------------------------------------------------------------------------------
Service GetUserDataProductionPath()
ProductionPath = Environment_Services('GetUserDataRootPath') : '\IT'
Response = ProductionPath
end service
@ -207,17 +207,17 @@ end service
// Returns the SPC data path.
//----------------------------------------------------------------------------------------------------------------------
Service GetSpcFilesharePath()
IsProd = Environment_Services("IsProd")
If IsProd EQ True$ then
Response = '\\mesfs.infineon.com\EC_SPC_Si_Import\TXT'
end else
Path = Environment_Services('GetApplicationRootPath'):'\SPC_Data'
MakeDirSuccess = Utility("MAKEDIR", Path)
Response = Path
end
IsProd = Environment_Services("IsProd")
If IsProd EQ True$ then
Response = '\\mesfs.infineon.com\EC_SPC_Si_Import\TXT'
end else
Path = Environment_Services('GetApplicationRootPath'):'\SPC_Data'
MakeDirSuccess = Utility("MAKEDIR", Path)
Response = Path
end
end service
@ -227,17 +227,17 @@ end service
// Returns the SPC data path.
//----------------------------------------------------------------------------------------------------------------------
Service GetSPCDataPath()
IsProd = Environment_Services("IsProd")
If IsProd EQ True$ then
Response = '\\messa04ec.infineon.com\OI_SPC_Data_Transfer'
end else
Path = Environment_Services('GetApplicationRootPath'):'\SPC_Data'
MakeDirSuccess = Utility("MAKEDIR", Path)
Response = Path
end
IsProd = Environment_Services("IsProd")
If IsProd EQ True$ then
Response = '\\messa04ec.infineon.com\OI_SPC_Data_Transfer'
end else
Path = Environment_Services('GetApplicationRootPath'):'\SPC_Data'
MakeDirSuccess = Utility("MAKEDIR", Path)
Response = Path
end
end service
@ -247,10 +247,10 @@ end service
// Returns the Metrology Viewer URL.
//----------------------------------------------------------------------------------------------------------------------
Service GetMetrologyViewerURL()
ProductionPath = 'http://messa010ec.infineon.com/'
Response = ProductionPath
end service
@ -260,10 +260,10 @@ end service
// Returns the wafer map production path.
//----------------------------------------------------------------------------------------------------------------------
Service GetWaferMapProductionPath()
ProductionPath = '\\mesfs.infineon.com\EC_Metrology_Si\MetrologyAttachments\TencorRunData_'
Response = ProductionPath
end service
@ -276,7 +276,7 @@ Service GetMetrologyProductionPath()
ProductionPath = 'messqlec1.infineon.com\PROD1,53959'
Response = ProductionPath
end service
@ -307,11 +307,11 @@ end service
// Returns the Control Plan production path.
//----------------------------------------------------------------------------------------------------------------------
Service GetControlPlanProductionPath()
ProductionPath = 'iqsdms1'
Response = ProductionPath
end service
@ -321,11 +321,11 @@ end service
// Returns the Wafer Track data production path.
//----------------------------------------------------------------------------------------------------------------------
Service GetWaferTrackProductionPath()
ProductionPath = 'IQSDMS1'
Response = ProductionPath
end service
@ -335,29 +335,29 @@ end service
// Returns the local root path. This is where the scripts and FTP transfer files will be located.
//----------------------------------------------------------------------------------------------------------------------
Service GetLocalRootPath()
Machine = Environment_Services('GetServer')
Begin Case
Case Machine EQ 'MESIRWAP001' ; LocalRootPath = 'C:'
Case Machine EQ 'MESSA005' ; LocalRootPath = 'D:'
Case Machine EQ 'MESSA012' ; LocalRootPath = 'D:'
Case Machine EQ 'MESSA01EC' ; LocalRootPath = 'D:'
Case Machine EQ 'MESTSA01EC' ; LocalRootPath = 'D:'
Case Machine EQ 'MESTSA09EC' ; LocalRootPath = 'D:'
Case Machine EQ 'MESTSA010EC' ; LocalRootPath = 'D:'
Case Machine EQ 'MESTSA011EC' ; LocalRootPath = 'D:'
Case Machine EQ 'MESTSA012EC' ; LocalRootPath = 'D:'
Case Machine EQ 'MESTSA024EC' ; LocalRootPath = 'D:'
Case Machine EQ 'MESTSA09EC' ; LocalRootPath = 'D:'
Case Machine EQ 'MESTSA010EC' ; LocalRootPath = 'D:'
Case Machine EQ 'MESTSA011EC' ; LocalRootPath = 'D:'
Case Machine EQ 'MESTSA012EC' ; LocalRootPath = 'D:'
Case Machine EQ 'MESTSA024EC' ; LocalRootPath = 'D:'
Case Machine EQ 'MESST6501' ; LocalRootPath = 'C:' ; // This is a map to the user's actual C drive.
Case Machine EQ 'MESST6502' ; LocalRootPath = 'C:' ; // This is a map to the user's actual C drive.
Case Machine EQ 'MESTST1006' ; LocalRootPath = 'C:' ; // This is a map to the user's actual C drive.
Case Machine EQ 'MESTST1007' ; LocalRootPath = 'C:' ; // This is a map to the user's actual C drive.
Case Otherwise$ ; LocalRootPath = 'C:'
End Case
Response = LocalRootPath
end service
@ -367,12 +367,12 @@ end service
// Returns the method that label programs should use for printing (i.e., OIPI or DirectPrint).
//----------------------------------------------------------------------------------------------------------------------
Service GetLabelPrintMethod()
LabelPrintMethod = Database_Services('ReadDataRow', 'APP_INFO', 'LABEL_PRINT_METHOD')<1>
Locate LabelPrintMethod in 'OIPI,DirectPrint' using ',' setting cPos else LabelPrintMethod = 'OIPI'
Response = LabelPrintMethod
end service
@ -396,7 +396,7 @@ end service
// Returns printer server UNC path.
//----------------------------------------------------------------------------------------------------------------------
Service GetPrintServerPath()
ServerPath = '\\messp1002.na.infineon.com\'
Response = ServerPath
@ -424,10 +424,10 @@ end service
// accessing the database.
//----------------------------------------------------------------------------------------------------------------------
Service SetServerCanary()
hSysLists = Database_Services('GetTableHandle', 'SYSLISTS')
Lock hSysLists, ServiceKeyID then
DateTimeStamp = Oconv(Date(), 'D4/') : ' - ' : Oconv(Time(), 'MTHS')
Database_Services('WriteDataRow', 'APP_INFO', 'CANARY', DateTimeStamp, True$, False$, True$)
If Error_Services('NoError') then
@ -443,7 +443,7 @@ Service SetServerCanary()
Message<7> = 'TEXT'
Message<8> = 'Error in ' : Service : ' service. Message: ' : Error
Message<9> = ''
Config = ''
Config<1> = SendUsing_Port$
Config<3> = 25
@ -454,10 +454,10 @@ Service SetServerCanary()
Config<8> = False$
Result = SRP_Send_Mail(Message, Config)
end
Unlock hSysLists, ServiceKeyID else Null
end
end service
@ -465,12 +465,12 @@ Service GetSAPPath()
Machine = Environment_Services('GetServer')
Environment = 'QA'
Begin Case
Case Machine EQ 'MESSA005' ; Environment = 'PRD'
Case Machine EQ 'MESSA01EC' ; Environment = 'PRD'
End Case
Response = Environment
end service
@ -478,25 +478,25 @@ end service
Service GetSQLScrapeConnectionString()
Machine = Environment_Services('GetServer')
Begin Case
Case Machine = 'MESSA01EC'
// PROD SQL Servers
ConnectionString = 'Provider=MSOLEDBSQL.1;Password=0okm9ijn;Persist Security Info=True;User ID=srpadmin;Initial Catalog=LSL2SQL;Data Source=MESSQLEC1.infineon.com\PROD1,53959;Initial File Name="";Trust Server Certificate=True;Server SPN="";Authentication="";Access Token=""'
Case ( (Machine = 'MESTSA01EC') or (Machine = 'MESTSA09EC') or (Machine = 'MESTSA010EC') or (Machine = 'MESTSA011EC') or (Machine = 'MESTSA012EC') )
// DEV SQL Servers
Machine = Environment_Services('GetServer')
Begin Case
Case Machine = 'MESSA01EC'
// PROD SQL Servers
ConnectionString = 'Provider=MSOLEDBSQL.1;Password=0okm9ijn;Persist Security Info=True;User ID=srpadmin;Initial Catalog=LSL2SQL;Data Source=MESSQLEC1.infineon.com\PROD1,53959;Initial File Name="";Trust Server Certificate=True;Server SPN="";Authentication="";Access Token=""'
Case ( (Machine = 'MESTSA01EC') or (Machine = 'MESTSA09EC') or (Machine = 'MESTSA010EC') or (Machine = 'MESTSA011EC') or (Machine = 'MESTSA012EC') )
// DEV SQL Servers
ConnectionString = 'Provider=MSOLEDBSQL.1;Password=Fisql2023!;Persist Security Info=True;User ID=fisql;Initial Catalog=LSL2SQL;Data Source=10.95.140.27\TEST1,50572;Initial File Name="";Trust Server Certificate=True;Server SPN="";Authentication="";Access Token=""'
Case Otherwise$
// Default to DEV SQL Servers just in case
ConnectionString = 'Provider=MSOLEDBSQL.1;Password=Fisql2023!;Persist Security Info=True;User ID=fisql;Initial Catalog=LSL2SQL;Data Source=10.95.140.27\TEST1,50572;Initial File Name="";Trust Server Certificate=True;Server SPN="";Authentication="";Access Token=""'
End Case
Response = ConnectionString
Case Otherwise$
// Default to DEV SQL Servers just in case
ConnectionString = 'Provider=MSOLEDBSQL.1;Password=Fisql2023!;Persist Security Info=True;User ID=fisql;Initial Catalog=LSL2SQL;Data Source=10.95.140.27\TEST1,50572;Initial File Name="";Trust Server Certificate=True;Server SPN="";Authentication="";Access Token=""'
End Case
Response = ConnectionString
end service
Service GetUserDesktopPath()
Response = ''
UserRootPath = ''
UserName = RTI_GetNetworkUserName()
@ -514,94 +514,115 @@ end service
Service GetTempPath()
TempDirectory = Str(\00\, 1024)
GetTempPath(Len(TempDirectory), TempDirectory)
Convert \00\ to '' in TempDirectory
Response = TempDirectory
TempDirectory = Str(\00\, 1024)
GetTempPath(Len(TempDirectory), TempDirectory)
Convert \00\ to '' in TempDirectory
Response = TempDirectory
end service
Service GetMonaResource()
If Environment_Services("IsProd") then
Response = "OPENINSIGHT_MES_OP_FE"
end else
Response = "OPENINSIGHT_MES_OP_FE_DEV"
end
If Environment_Services("IsProd") then
Response = "OPENINSIGHT_MES_OP_FE"
end else
Response = "OPENINSIGHT_MES_OP_FE_DEV"
end
end service
Service GetMonInBufferedWorkerApiUrl()
If Environment_Services("IsProd") then
Response = "https://messa014.infineon.com:7851"
end else
Response = "https://mestsa008.infineon.com:7851"
end
If Environment_Services("IsProd") then
Response = "https://messa014.infineon.com:7851"
end else
Response = "https://mestsa008.infineon.com:7851"
end
end service
Service GetProveInApiUrl()
If Environment_Services("IsProd") then
Response = "https://messa014.infineon.com:8851"
end else
Response = "https://mestsa008.infineon.com:8851"
end
If Environment_Services("IsProd") then
Response = "https://messa014.infineon.com:8851"
end else
Response = "https://mestsa008.infineon.com:8851"
end
end service
Service GetIfxEmailServer()
Response = 'smtp.intra.infineon.com'
Response = 'smtp.intra.infineon.com'
end service
Service GetEnvironmentVariable(VariableName)
If VariableName NE '' then
VarLength = GetEnvironmentVariable(VariableName, "", 0) + 1
VarValue = space(VarLength+1)
VarLength = GetEnvironmentVariable(VariableName, VarValue, VarLength)
VarValue = VarValue[1, VarLength]
Response = VarValue
end else
Error_Services('Add', 'Error in service ':Service:'. Null VariableName passed in')
end
If VariableName NE '' then
VarLength = GetEnvironmentVariable(VariableName, "", 0) + 1
VarValue = space(VarLength+1)
VarLength = GetEnvironmentVariable(VariableName, VarValue, VarLength)
VarValue = VarValue[1, VarLength]
Response = VarValue
end else
Error_Services('Add', 'Error in service ':Service:'. Null VariableName passed in')
end
end service
Service GetServiceManagerPort()
FilePath = Drive():'\SRPEngineServer.ini'
OSRead IniFile from FilePath then
CharIndex = Index(IniFile, 'Port', 1)
Line = IniFile[CharIndex, 'F':CRLF$]
Response = Trim(Line[-1, 'B='])
end
end service
Service GetScrapeServerPort()
FilePath = Drive():'\SRPEngineServerScrape.ini'
OSRead IniFile from FilePath then
CharIndex = Index(IniFile, 'Port', 1)
Line = IniFile[CharIndex, 'F':CRLF$]
Response = Trim(Line[-1, 'B='])
end
end service
Service GetTextDataBackupRootDir()
Machine = Environment_Services('GetServer')
DataBackupDir = ''
Begin Case
Case Machine = 'MESSA01EC'
// PROD SQL Servers
DataBackupDir = '\\MESFS.INFINEON.COM\MES_OpenInsight_Backups\DataBackups\'
Case ( (Machine = 'MESTSA01EC') or (Machine = 'MESTSA09EC') or (Machine = 'MESTSA010EC') or (Machine = 'MESTSA011EC') or (Machine = 'MESTSA012EC') )
// DEV SQL Servers
DataBackupDir = 'd:\MES_OpenInsight_Backups\DataBackups\'
Case Otherwise$
// Default to DEV SQL Servers just in case
DataBackupDir = 'd:\MES_OpenInsight_Backups\DataBackups\'
End Case
Response = DataBackupDir
end service
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Internal GoSubs
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////