From b4922b45eaadc8bd9e6d0276ab868299375e9879 Mon Sep 17 00:00:00 2001 From: "Ouellette Jonathan (CSC FI SSM MAI MESLEO)" Date: Tue, 4 Nov 2025 21:32:52 +0000 Subject: [PATCH] Merged PR 30013: Error Handling in OBJ_SAP SendRecord Modified obj_sap SendRecord to let the calling gosub handle the deletion of the record. Most importantly blocked the deletion of a record upon failure to send via FTP. --- LSL2/STPROC/OBJ_SAP.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/LSL2/STPROC/OBJ_SAP.txt b/LSL2/STPROC/OBJ_SAP.txt index b143e1a..5e38579 100644 --- a/LSL2/STPROC/OBJ_SAP.txt +++ b/LSL2/STPROC/OBJ_SAP.txt @@ -1093,7 +1093,7 @@ SendRecord: OSWrite ToSAPScript ON ToSAPScriptName StartTime = Time() - DELETE Buffer,TxSeqNo ELSE Null + Stat = 'VAR' FTPCommand = "psftp ":FTPUser:"@":FTPServerIP:" -pw ":FTPPassword:" -b ":ToSAPScriptName:" -batch" @@ -1118,12 +1118,14 @@ SendRecord: Parms = Recipients:@RM:SentFrom:@RM:Subject:@RM:Message:@RM:AttachWindow:@RM:AttachKey:@RM:SendToGroup obj_Notes('Create',Parms) Mona_Services('PostStatus', MonaOutboundResource, 'SFTP-Interface-Outbound', 'critical') + ClearFlag = 0 end else + ClearFlag = 1 Mona_Services('PostStatus', MonaOutboundResource, 'SFTP-Interface-Outbound', 'ok') end StopTime = Time() - ClearFlag = 1 + OSDelete DosTable ;* Removes table from C: drive RETURN @@ -1502,3 +1504,4 @@ CheckForErrors: return +