#!/bin/bash
# ************************************************************
# *
# * Name: INS0030
# *
# * Desc: Run hercules to initialize the MVS systes volume
# *       using a stand alone utility
# *
# *       This is required as IEHDASDR can only write to
# *       a 3350 device that has a correct vtoc written,
# *       and that has the correct number of alternate
# *       tracks
# *
# ************************************************************
PATH=../hercules:${PATH}
THISDIR=`pwd`
cd ..
GENDIR=`pwd`

cd ${THISDIR}
echo " "
echo "**********************************************************"
echo "*                                                         "
echo "*    *************** D A N G E R *******************      "
echo "*                                                         "
echo "*                                                         "
echo "*    THIS PROCEDURE WILL completely erase all the data    "
echo "*    on your sysres volume                                "
echo "*                                                         "
echo "*             MVSRES                                      "
echo "*                                                         "
echo "*    ONLY RUN THIS IF YOU REALLY WANT TO START THE        "
echo "*    SYSGEN PROCESS FROM AFRESH!!!!!!!!!!!!!!!!!!!        "
echo "*                                                         "
echo "*    *************** D A N G E R *******************      "
echo "*                                                         "
echo "**********************************************************"
echo " "
echo "Press the ENTER key to continue"
echo "or press CTRL-C to abort"
read dummy
if ! test -f ../dasd/mvsres_n.148
then
   echo "The non-compressed dasd imnage file "
   echo "              mvsres_n.148          "
   echo "does not exist in the ${GENDIR}/dasd"
   echo "subdirectory.  Did you really run   "
   echo "installation script ins0020??       "
   echo " "
   echo "Press the enter key to end this script"
   read dummy
else
   hercules -f ../conf/dasdinit.conf >../log/dasdinit.log
fi
