##########################################################################
#
# routine: resolve.pl
#
# purpose: Resolves an environment variable to a filespec.
#          The filespec can contain a stretched logical (like VMS), which
#          will be resolved through the 'osfile_stretch_file' function.
# 
# Input:   ENVVAR - name of an environment variable
#
# Returns: filespec - resolved filespec from environment variable value
#
# modification history:
#
#   date    opr     who     reason
# -------- -----  --------  --------------------------------------
# 06/03/00 42246  MSwam     first version
# 
##########################################################################
sub Resolve
{
my ($ENVVAR) = @_;                           # ARGUMENTS from @_

#
# obtain the environment variable value
$pathval = $ENV{"$ENVVAR"};

# pass the value through the stretch-resolver command and trim the newline
$command = "osfile_stretch_file $pathval";
$filespec = `$command`;
chomp($filespec);

# return the resolved filespec
$filespec;
}
1;
