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.
This commit is contained in:
parent
55cebe9f3a
commit
b4922b45ea
@ -1093,7 +1093,7 @@ SendRecord:
|
|||||||
|
|
||||||
OSWrite ToSAPScript ON ToSAPScriptName
|
OSWrite ToSAPScript ON ToSAPScriptName
|
||||||
StartTime = Time()
|
StartTime = Time()
|
||||||
DELETE Buffer,TxSeqNo ELSE Null
|
|
||||||
Stat = 'VAR'
|
Stat = 'VAR'
|
||||||
|
|
||||||
FTPCommand = "psftp ":FTPUser:"@":FTPServerIP:" -pw ":FTPPassword:" -b ":ToSAPScriptName:" -batch"
|
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
|
Parms = Recipients:@RM:SentFrom:@RM:Subject:@RM:Message:@RM:AttachWindow:@RM:AttachKey:@RM:SendToGroup
|
||||||
obj_Notes('Create',Parms)
|
obj_Notes('Create',Parms)
|
||||||
Mona_Services('PostStatus', MonaOutboundResource, 'SFTP-Interface-Outbound', 'critical')
|
Mona_Services('PostStatus', MonaOutboundResource, 'SFTP-Interface-Outbound', 'critical')
|
||||||
|
ClearFlag = 0
|
||||||
end else
|
end else
|
||||||
|
ClearFlag = 1
|
||||||
Mona_Services('PostStatus', MonaOutboundResource, 'SFTP-Interface-Outbound', 'ok')
|
Mona_Services('PostStatus', MonaOutboundResource, 'SFTP-Interface-Outbound', 'ok')
|
||||||
end
|
end
|
||||||
|
|
||||||
StopTime = Time()
|
StopTime = Time()
|
||||||
ClearFlag = 1
|
|
||||||
OSDelete DosTable ;* Removes table from C: drive
|
OSDelete DosTable ;* Removes table from C: drive
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
@ -1502,3 +1504,4 @@ CheckForErrors:
|
|||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user