#!/bin/sh
# rds 27 April 2006
# Script to run asadmin.x
# $COBDIR expected to be already set up.
# If it is not, check if user in installed cobol subdirectory & if so,
# set up COBDIR.
if [ "$COBDIR" = "" ];
then
    if test -x ../aslmf/asadmin.x
    then
        cd ..
        COBDIR=`pwd`
        export COBDIR
        cd aslmf
    else
echo "You must set COBDIR and execute $COBDIR/aslmf/apptrack" 
echo "or be located in a valid cobol installation aslmf subdirectory"
echo "to run this command."
echo "Refer to your Server Express documentation for more information."
	exit 1
    fi
fi

PATH=$COBDIR/bin:$PATH

LD_LIBRARY_PATH=$COBDIR/lib:$LD_LIBRARY_PATH:/lib
export LD_LIBRARY_PATH

$COBDIR/aslmf/asadmin.x $*
