BatchBannerBeginScript = AOR_PREB

BEGINSUB AOR_PREB
*	------------------------------------------------------
*	Begin batch
*	Clear variables once per recipient batch
*	------------------------------------------------------
#AOR_Debug=GETINIBOOL(,PRINTERID(),"AORDebug")
IF #AOR_Debug 
  RPLogMsg(NL() & "  ** AOR_PREB:" & NL() )
END
AOR_RecipBatch  = AOR_RecipBatch
#AOR_BatchCount = #AOR_BatchCount
#AOR_Processed  = #AOR_Processed #AOR_Count      = #AOR_Count
AOR_TableName   = AOR_TableName 
#AOR_Init       = #AOR_Init   
IF AOR_RecipBatch != RECIPBATCH()
  PUTINIBOOL(,"RunMode","CheckNextRecip",0)
  #AOR_PerBatch   = 
GETINISTRING(,PRINTERID(),"AORFilesPerBatch","999")
  AOR_RecipBATCH  = RECIPBATCH()
  #AOR_SubBatch   = 0
  #AOR_Count      = 0
  #AOR_BatchCount = 0 
END
AOR_BatchID = RECIPBATCH()
IF #AOR_Init = 0
   AOR_JobID = UNIQUESTRING()
   AOR_TableName = GETINISTRING(,PRINTERID(),"AORTable","AOR")       
   DBOPEN(AOR_TableName,"ODBC",".\deflib\aor.dfd", 
   "READ&WRITE&CREATE_IF_NEW")
   DBPREPVARS(AOR_TableName,"AORTABLERecord") 
END
#AOR_Init = 1
#AOR_DoEOB = 1
ENDSUB