added LSL2 stored procedures
This commit is contained in:
33
LSL2/STPROC/SAP_ANALYSIS.txt
Normal file
33
LSL2/STPROC/SAP_ANALYSIS.txt
Normal file
@ -0,0 +1,33 @@
|
||||
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 ''
|
Reference in New Issue
Block a user