private void logStart() throws Exception {
		try {
			// Before opening transaction for batch_log, do any queries
			// necessary to look up batch_num and batch_seq_nbr
			
			Long tempBatchNum = -1L;
			Long tempBatchSeqNbr = -1L;
			// If this is a new run for this job, set batch_num to batch_log_id,
			// and batch_seq_nbr to 1
			if (this.batchMode == VBatchManager.BatchMode_New) {
	//					this.batch_log.setBatchNum(new BigDecimal(this.batch_log.getId()));
				//tempBatchNum = new BigDecimal(this.job_id);
				//this.batch_log.setBatchSeqNbr(new BigDecimal(1));
				tempBatchSeqNbr = 1L;
				VBatchManager.log.info(MessageFormat.format("Initiating new run for Job # {0}", ((int)this.job_id)));
			}
			// Look up last run of this batch, to get batch/seq nbr for this run.
			if (this.batchMode == VBatchManager.BatchMode_Repeat) {
				int highestBatchSeqNbr = 0;
				BatchLog latestRun = null;
				TypedQuery<BatchLog> qryRunsOfThisBatch = this.db.createQuery(
						"SELECT log from BatchLog log WHERE log.batchNum = :bNumber order by log.batchSeqNbr desc", BatchLog.class);
				List<BatchLog> lstRunsOfThisBatch = qryRunsOfThisBatch
			    		.setParameter("bNumber", this.job_id)
			    		.getResultList();
				// If there's at least one previous run with this batch number
				if (lstRunsOfThisBatch.size() > 0 ) {
					// Get the batch_seq_nbr or the latest run
					latestRun = lstRunsOfThisBatch.get(0);
					highestBatchSeqNbr = latestRun.getBatchSeqNbr().intValue();
					VBatchManager.log.info(MessageFormat.format("Initiating re-run of Batch # {0}, Job # {1}", ((int)this.job_id),latestRun.getJobDefinition().getOrderNum()));
				}
				else {  // Abort this job: no previous runs with this batch number exist
					throw new VBatchException("VBatch error:  No previous runs found for batch_id: " + this.job_id);
					
				}
				tempBatchNum = latestRun.getBatchNum();
				tempBatchSeqNbr = highestBatchSeqNbr+1L;
	 		}
					
			this.db.getTransaction().begin();
			
			// Create the main BatchLog entry
			this.batch_log = new BatchLog();
			this.batch_log.setJobDefinition(this.job_definition);
			
			this.batch_log.setOrderNum(this.job_definition.getOrderNum());
			this.batch_log.setStatus("Started");
			this.batch_log.setStartDt(this.start_time);
			this.batch_log.setShortDesc(this.job_definition.getShortDesc());
			
			//batch_num should be set from sequence BATCH_LOG_BATCH_NUM_SEQ
			String queryString = "SELECT BATCH_LOG_BATCH_NUM_SEQ.NEXTVAL FROM DUAL";	
			Query query = null;
			
			if (this.batchMode == VBatchManager.BatchMode_New) {
				query = this.db.createNativeQuery(queryString);
				List<Number> batchNumList = (List<Number>)query.getResultList();
				this.batch_log.setBatchNum(batchNumList.get(0).longValue());
				
				this.batch_log.setBatchSeqNbr(1L);
			}
			else {
				this.batch_log.setBatchNum(tempBatchNum);
				
				//batch_seq_nbr should be set to max + 1
				this.batch_log.setBatchSeqNbr(tempBatchSeqNbr);
			}
			
			String logMsg = "";
			logMsg += "Batch " + this.batch_log.getBatchNum();
			logMsg += " (seq " + this.batch_log.getBatchSeqNbr() + ")";
			logMsg += ", Job " + this.job_definition.getOrderNum();
			logMsg += " (" + this.job_definition.getLongDesc() + ")";
			this.batch_log.setLongDesc(logMsg);
			
			this.db.persist(this.batch_log);
			this.db.getTransaction().commit();
			
			/* This Logging for BATCHLogDtl will be done for each Step
			// Create the batch_log_dtl entry showing this job started
			// TODO : This should really be logged in StepManager
			this.db.getTransaction().begin();
			this.log_dtl = new BatchLogDtl();
			this.log_dtl.setBatchLog(this.batch_log);
			String msg = "Starting batch " + this.batch_log.getBatchNum();
			msg += ": " + this.job_definition.getLongDesc();
			this.log_dtl.setLongDesc(logMsg);
			this.log_dtl.setStartDt(new Date());
			this.log_dtl.setStatus("Started");
			//this.log_dtl.setJobStepsXrefJobStepSeq(this.job_definition.getJobStepsXrefs());
			System.out.println("Batch " + this.batch_log.getBatchNum() + " started.");
			
			// Commit the batch_log_dtl entry
			this.db.persist(this.log_dtl);
			this.db.getTransaction().commit();
			*/
		}
		catch(Exception e) {
			this.logFailed(e);
		}
	}