########################################################## # pgmchk - Double-check programs' pgmdef settings # # J. David Schronce - Tue Feb 5 12:24:55 CST 2008 # http://www.schronce.net # Attribution: rngdbdump statements from LawsonGuru ########################################################## USAGE="\nUSAGE: $0 \n" if [ $# -ne 1 ]; then echo $USAGE;exit fi PROD=$1 typeset -u PROD echo "\nPrograms to check in pgmdef...\n" # Programs which don't have the 'in production' flag set # (and therefore aren't compiled by cobcmp or patchcompile): cnt=`rngdbdump -cnt GEN PROGRAM -f ProgramCode -v ProductLine=$PROD IsProduction=0 | wc -l` echo "Not \"In Production\": \c" echo "$cnt + 0" | bc echo "Programs which don't have the 'in production' flag set " echo " (and therefore aren't compiled by cobcmp or patchcompile):" if [ $cnt -gt 15 ]; then rngdbdump -cnt GEN PROGRAM -f ProgramCode -v ProductLine=$PROD IsProduction=0 |sed 's/"//g' | sort -u | more -n 15 -e else rngdbdump -cnt GEN PROGRAM -f ProgramCode -v ProductLine=$PROD IsProduction=0| sed 's/"//g' | sort -u fi # Programs which have the type set to 'Prototyped and 4GL' # (which will have empty .xml files created and generate # Portal errors...) cnt=`rngdbdump -cnt GEN EXECUTABLE -f ProgramCode -v ProductLine=$PROD RunType=2 | wc -l` echo "Prototyped and 4GL: \c" echo "$cnt + 0"| bc echo "Programs which have the type set to 'Prototyped and 4GL'" echo " (which will have empty .xml files created and generate" echo " Portal errors...)" if [ $cnt -gt 15 ]; then rngdbdump -cnt GEN EXECUTABLE -f ProgramCode -v ProductLine=$PROD RunType=2 | sed 's/"//g' | sort -u | more -n 15 -e else rngdbdump -cnt GEN EXECUTABLE -f ProgramCode -v ProductLine=$PROD RunType=2 |sed 's/"//g' | sort -u fi