open-insight/LSL2/STPROC/SAP_ANALYSIS.txt
Infineon\StieberD 7762b129af pre cutover push
2024-09-04 20:33:41 -07:00

34 lines
898 B
Plaintext

Function SAP_Analysis(Void)
#pragma precomp SRP_PreCompiler
$insert LOGICAL
BaseNumber = 'M010946'
SAPBatch = BaseNumber : '.5'
TSVFilesFolder = 'E:\apps\SAP\FTPFiles\'
InitDir TSVFilesFolder : '*.tsv'
Files = DirList()
TSVFileFound = False$
For Each File in Files using @FM
OSRead FileData from TSVFilesFolder : File then
If Index(FileData, SAPBatch, 1) then TSVFileFound = True$
end
Next File
ProdOrdNo = BaseNumber : '.1'
CassCompFolder = 'E:\apps\LogFiles\SAP\'
InitDir CassCompFolder : '*.csv'
Files = DirList()
CSVFileFound = False$
For Each File in CassCompFolder : Files using @FM
OSRead FileData from File then
If Index(FileData, ProdOrdNo, 1) then CSVFileFound = True$
end
Next File
Ans = 'TSV Found = ' : TSVFileFound : ', CSV Found = ' : CSVFileFound
Return Ans OR ''