#!/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

SHLIB_PATH=$COBDIR/lib:$SHLIB_PATH:/lib
export SHLIB_PATH

$COBDIR/aslmf/asadmin.x $*
