TransBannerBeginScript = AOR_PRET
BEGINSUB AOR_PRET
* ------------------------------------------------------* Begin Transaction
* Set up new file name for recipient batch output file
* ------------------------------------------------------
IF #AOR_Debug
RPLogMsg(NL() & " ** AOR_PRET:" & NL() )
END
AOR_BatchID = AOR_BatchID
AOR_BatchDir = AOR_BatchDir
#AOR_Batch = #AOR_Batch
#AOR_Count = #AOR_Count
#AOR_PerBatch = #AOR_PerBatch
#AOR_Processed = #AOR_Processed
AOR_TransID = GVM("KEY1") & "-" & GVM("KEY2") & "-" & \ GVM("KEYID") & "-" & GVM("TRANCODE")
#AOR_Count += 1
IF (#AOR_Count > #AOR_PerBatch)
#AOR_Count -=1
CALL("AOR_EOB")
#AOR_Count = 1
END
TranFile = CALL("AOR_NEWFILE")
#AOR_Exists = PATHEXIST(AOR_BatchDir)
IF #AOR_Exists = 0
PATHCREATE(AOR_BatchDir)
#AOR_Exists = PATHEXIST(AOR_BatchDir)
IF #AOR_Exists = 0
RPErrorMsg(NL() & "** AOR batch directory " & \
AOR_Batchdir & "does not exist!")
END
END
#AOR_DoEOB = 0
SETDEVICENAME(TranFile)
BREAKBATCH()
ENDSUB