Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

report fails error -9046 - permission

Status
Not open for further replies.

disham

IS-IT--Management
Apr 15, 2002
10
0
0
GB
Can anyone help please.

I have a script that uses an SQL and ACE then a perl script to out put results. The data thats extracted is large - it keeps producing this error I have checked te space - checked permission I am sure that its to do with the large data???

Any ideas - its a simple solution
Thanks in advance




#!/bin/ksh
DBNAME=newbs
DESTINATION=" "
USAGE="Usage : sales has 4 or 5 parameters: account month(eg 03) duration(Y/N) destination(F(ile)/P(rinter)/X(cel file)/T(ext file)) office no (optional)"

if [ $# -le 3 ]
then
echo "$USAGE"
exit 1
elif [[ $3 != Y ]] && [[ $3 != N ]]
then
echo "$USAGE"
echo
echo "Duration must be Y or N"
echo
exit 1
elif [ "$4" != "F" ] && [ "$4" != "T" ] && [ "$4" != "X" ] && [ "$4" != "P" ]
then
echo "$USAGE"
echo
echo "Destination must be F, X, P or T"
echo
exit 1
else
cd /home/comppmp

ACC=$1
MON=$2
if [ "$3" = "Y" ]
then
if [ "$4" = "F" ] || [ "$4" = "X" ]
then
REP="sales2_htm.ace"
DESTINATION="\"\/tmp\/reports\/"$ACC"_dur_$MON.HTML\""
else
REP="sales2.ace"
fi
echo "with duration"
else
if [ "$4" = "F" ] || [ "$4" = "X" ]
then
REP="sales1_htm.ace"
DESTINATION="\"\/tmp\/reports\/"$ACC"_$MON.HTML\""
else
REP="sales1.ace"
fi
echo "without duration"
fi
if [ "$4" = "P" ]
then
DESTINATION="pipe \"lp -dhplas20\""
fi
if [ "$4" = "T" ]
then
DESTINATION="\"\/tmp\/reports\/"$ACC"_$MON.TXT\""
fi
echo "Report : $DESTINATION"

if [ "$4" = "F" ] || [ "$4" = "X" ] || [ "$4" = "T" ]
then
if [ -f $DESTINATION ]
then
rm -f $DESTINATION
fi
fi
if [ $# -eq 5 ]
 
Thanks people....

sorted problem...

There was an axisting file with the wrong permission...once that was deleted...new files were generated with the correct permssion
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top