#!/bin/csh
#
#
cat <<+++

   Script to run program dataex.f taking all default prompts

   It is assumed that program dataex.f is in the same directory
   as this script file.

+++
#
set dfilspec = '*.*'
set checknp = TRUE
set parsit = TRUE
set retdata = FALSE
set printit = FALSE
set dbhead = TRUE
set mname0 = "NDSC"
#
set gotit = no
while ( $gotit == no )
#
#  Obtain the absolute pathname for the files to be checked
#
   set noglob
   echo "Enter pathname for files to be checked ("$dfilspec"):"
   set filspec = $<
   if ( "$filspec" == "" )  set filspec = $dfilspec
   unset noglob
#
#  See if the variables are named properly.
#
   set noglob
   cat <<+++

   pathname of files to check = $filspec
   checknp = $checknp
   parsit  = $parsit
   retdata = $retdata
   printit = $printit
   dbhead  = $dbhead
   mname0  = $mname0

+++
   unset noglob
   echo -n "Are these values ok (y)? "
   set yesno = $<
   if ( "$yesno" == y || "$yesno" == Y || "$yesno" == "" )  set gotit = yes
end
#
#  Create the file dataex.in.
#  This is done by writing the program control variables to dataex.in,
#  writing the list of pathnames to tmp1, and then concatenating the
#  two files.
#
#  Define a bogus name for the file ckctlz.dat.
#  Sun Fortran will read past ^Z so no need for a separate check.
#
set czpath = CKCTLZ.DAT
cat <<+++  > dataex.in
$checknp
$parsit
$retdata
$printit
$dbhead
$mname0
$czpath
+++
\ls -1 $filspec > tmp1$$
cat tmp1$$ >> dataex.in
#
#  Delete temporay files.
#
rm -f tmp1$$
#
#  Run program dataex.
#
dataex.exe <dataex.in >dataex.out
#
exit
