262 IBM Content Manager OnDemand Guide
            else                                                       
             let log=$log+001                                          
             typeset -Z3 log                                           
           fi                                                          
         ####################################                          
         # Set date after log count         #                          
         ####################################                          
           datum=`date +%Y-%m-%d`                                      
           blank=" "                                                   
         ####################################                          
         # Update this document with count  #                          
         # of reprints and current date     #                          
         ####################################                          
         arsdoc update -h $host -g $applgrp -f $folder -n log="$log$blank$datum" -n 
reprint=I -u admin -p ondemand -i "where account-number='$account-number'" -v    
         fi                                                            
         ####################################                          
         # Done, remove the .cntl file      #                          
         ####################################                          
         done                                                          
         rm $mine                                                      
        fi                                                             
 fi
else
(
if [[ ${OS} = AIX ]] ; then
echo /bin/enq -r -P "$1" -N $2 -T "${TITLE}" $6 ${EXTRA_OPTIONS} ${PRT_OPTIONS} 
${FILE}
else
echo ${BASE_DIR}/lprafp -p "$1" -s "${ARSPRT_HOSTNAME}" -o "COPIES=${2}" -o 
"JOBNAME=${TITLE}" -o "TITLE=${TITLE}" $6 ${EXTRA_OPTIONS} ${PRT_OPTIONS} ${FILE}
fi
echo "$(date)-->OnDemand Failed Print File >${FILE}< to Queue >$1<"
) >/dev/console
exit ${RC}
fi
#
# If there is an options file, wait until the file has been
# printed before removing it.
#
if [[ ${DEL} != 0 ]] ; then
while(( 1 ))
do
if [[ -f "${FILE}" ]] ; then
sleep 30
else
${RM} -f ${OPTS_FILE} ${NOTES_FILE}
break
fi
done
fi
exit 0