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

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

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

sub useage {
   print "Useage: COEInstError {message}\n";
}

my $ret;
my $arg1=shift;
$arg1=cleanString($arg1, 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",
	"InstError", "$arg1");
   exit $ret;
}