#!/h/COE/Comp/PERL5/bin/perl -T -I/h/COE/lib -w
use strict;
use Coe;

my $VERSION="1.1.4.1";
my $PRGM="COEMsg";

if (@ARGV == 0) {
   useage;
   exit -1;
} 

useage {
   print "Useage: COEMsg [options] {message}\n";
}

my $ret;
my $arg1=cleanString(shift,4);

if ("$arg1" eq "-h") {
   useage;
   exit 0;
} elsif ("$arg1" eq "-H") {
   coeMan("COE_HOME/docs/man/$PRGM");
   exit 0;
} elsif ("$arg1" eq "-V") {
   print "VERSION: $VERSION\n";
   exit 0;
} else {
   $ret=coeRun ("COE_COMP/JAVA2/bin/java",
   	"-Dcfgfile=COE_HOME/lib/coeenv.txt",
   	"-classpath",
	"COE_HOME/lib/opencoe.jar:COE_HOME/lib",
	"org.opencoe.coe.kernel.apps.COEDialog",
	"Msg", "$arg1");
  exit $ret;
}