#!/usr/local/bin/perl

# ============================================================================
#
# Name    :  lm__add.pl   
#
# Purpose :  Start LM__ADD.PCF BPE process for a particular session	(first session in the GPSweek)
#
# Author  :  M. Meindl/Lotti Jivall
# Created :  08-Mar-2004
# Updated :  28-Oct-2004
# Updated :  27-Oct-2006
#            28-nov-2013 Lotti adopted for Bern 5.2
#            20140714 Adopted for NKG GNSS AC/Lotti 
#
# ============================================================================
use lib $ENV{BPE};
use startBPE;
use bpe_util;

# Check arguments
# ---------------
if (@ARGV != 2 or lc($ARGV[0]) eq "-h") {
  die "\n  Start E03_ADD BPE process for a particular session\n".
      "\n  Usage: epn_add.pl [-h] yyyy ssss\n".
      "\n  yyyy : 4-digit (or 2-digit) year".
      "\n  ssss : 4-character session".
      "\n  -h   : Display this help text\n\n" }

# Create startBPE object
# ----------------------
$bpe = new startBPE();

# Redefine mandatory variables
# ----------------------------
$$bpe{PCF_FILE}     = "PPS_ATX";
$$bpe{CPU_FILE}     = "USER";
$$bpe{BPE_CAMPAIGN} = "ISS_PPS";
$$bpe{YEAR}         = $ARGV[0];
$$bpe{SESSION}      = $ARGV[1];
$$bpe{SYSOUT}       = "antex";
$$bpe{STATUS}       = "antex.RUN";
$$bpe{TASKID}       = "AN";
$$bpe{NUM_SESS}     = "1";

# Reset CPU file
# --------------
$bpe->resetCPU();

# Start BPE process
# -----------------
print "\nPPS_ATX BPE process started on ".timstr(localtime(time))."\n";
$bpe->run();

# BPE process finished
# --------------------
print "PPS_ATX BPE process finished on ".timstr(localtime(time))."\n\n";

__END__ 

