DCL is a proprietary command language supporting complex programming. Unix
supports several command interpreters, called shells, therefore the user must
choose among the shells the one best fitting the required needs.
In our migration activity we have translated DCL commands into Bourne
shell scripts. The main feature required by the migrated scripts is the interactive
inquiry of expected arguments if missing. DCL arguments are positional and have
predefined names p1, p2, .., migrating to Bourne shell, we have maintained
a similar convention moving arguments $1, $2, .. to $p1, $p2, ... as
shown in the following fragment.
# #-------------------------define args--------------------------------------- # case $# in 0) echo "Type Selection File Name or NL> \c" read p1 echo "Type x_y for DIST file name> \c" read p2 echo "Type file type (ex. .DAT, MU1, etc.)> \c" read p3 ;; 1) p1=$1 echo "Type x_y for DIST file name> \c" read p2 echo "Type file type (ex. .DAT, MU1, etc.)> \c" read p3 ;; 2) p1=$1; p2=$2 echo "Type file type (ex. .DAT, MU1, etc.)> \c" read p3 ;; 3) p1=$1; p2=$2; p3=$3 ;; esac echo args are: $p1 $p2 $p3For more information about command migration check also [4].