Is this a permission issue I got this shl that runs okay in one data base but not in another DB


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Is this a permission issue I got this shl that runs okay in one data base but not in another DB
# 1  
Old 05-04-2010
Is this a permission issue I got this shl that runs okay in one data base but not in another DB

Is this a permission issue I got this shl that runs okay in one data base but not in another DB in UNIX
i changed the real names for xxx for this post

Code:
!/bin/ksh
set -x
##SID="$1";
##SIDQ="@${SID}";
##ORACLE_SID="@${SID}";
# set database name
SID=$ORACLE_SID;
LOWER_SID=`echo $ORACLE_SID | tr "[A-Z]" "[a-z]"`
USER=$BANUID;
#----------------------------------------------------------------------------------
# Set up script specifics
MPATH=$BANNER_HOME;
 
# Set user for sqlplus activation
SQUID="faismgr_job";
# set password utility
PW_SHL="/u02/sct/xxxxx/xxxx/pw_read.shl";
JOBNUM=$ONE_UP;
AT_SIGN="@";
 
# set job name
JOBNAME="rypidoc"
# set home directory path
MPATH=$BANNER_HOME;
MAILING_LIST="rxxxx@xxxxx.edu"
SCRIPT_PATH="${MPATH}/xxxx/plus/"
SQL_SCRIPT1="rypidoc_loadcss_run.sql"
SQL_SCRIPT2="rypidoc_process2_run.sql"
 
#rm idochd1.lst htfn1.file htfn2.file 2> /dev/null
##:WQSection Two - Identify file(s) to process, process and rename
cd "${MPATH}/middlebury/dat_files"
#Determine if there is a file to process
ls 3526*.dat > /dev/null 2>&1 
if [ $? != 0 ] 
then 
exit
fi
for i in 3526*.dat 
do
 
# Capture just the file sequence number 
fseqno=`print $i | sed 's/.*_//' | sed 's/.dat//' `
cd "${MPATH}/xxxxx/dat_files"
echo $i `date` > idochd1.lst
cp $i idoc.dat
cp $i finaid.idoc
# Load file into tables RYRIDOC_COVER, RYRIDOC_IMAGE, RYRIDOC_TAXDATA, RYRIDOC_W2
# Change dir to where the sql scripts are
cd ${SCRIPT_PATH}
###$PW_SHL $SQUID | sqlplus -s ${SQUID} ${AT_SIGN}${SQL_SCRIPT1} $fseqno ${JOBNUM} ${JOBNAME} ${USER} >>${LF1} 2>>${LF2}
$PW_SHL $SQUID | sqlplus -s ${SQUID} ${AT_SIGN} ${SQL_SCRIPT1} $fseqno ${JOBNUM} ${SID} ${PROC} >>${LF1} 2>>${LF2}
# Process 
cd ${SCRIPT_PATH}
$PW_SHL $SQUID | sqlplus -s ${SQUID} ${AT_SIGN}${SQL_SCRIPT2} ${JOBNUM} ${JOBNAME} ${USER} >>${LF1} 2>>${LF2}
cd "${MPATH}/middlebury/dat_files"
mv $i $i.processed
#Notify User
###asysmail idoc.mail "CSS IDOC file received and processed" $SOFTPATH/log/rypidoc_process2.log
### echo "\nEmail sent to ${MAILING_LIST} Loading Process Finish." >>${LF1} 2>>${LF2}
# Find the last error file for each type
tfn1=$( ls -1t ${MPATH}/XXXX/dat_files/idoc_nomatch* | grep -v BAN1bat| head -1 )
#Determine if tfn1 has any records-if so, send
count=`cat $tfn1 | wc -l `
if [ $count != 0 ]
then
cat ${MPATH}/XXXXX/dat_files/idochd1.lst $tfn1 > ${MPATH}/XXXX/dat_files/htfn1.file
##asysmail idoc.mail "CSS IDOC-No Match File" $SOFTPATH/data/finaid/idoc/htfn1.file
fi
tfn2=$( ls -1t $${MPATH}/XXXXX/dat_files/idoc_error* | grep -v BAN1bat| head -1 )
#Determine if tfn2 has any records-if so, send
count=`cat $tfn2 | wc -l `
if [ $count != 0 ]
then
cat $${MPATH}/xxxxx/dat_files/idochd1.lst $tfn2 > $S${MPATH}/xxxx/dat_files/htfn2.file
##cd $SOFTPATH/bin
###asysmail idoc.mail "CSS IDOC-Error File" $SOFTPATH/data/finaid/idoc/htfn2.file
fi
done
exit

This is the result in the DB that is not runiing
It is stock in here
/u02/sct/banner/xxxx/xxxxx
I change the the real name for xxx basicale this directory has a file with the password....
Code:
jet:/u02/sct/banner/banpprd/XXXX/shl$ sh rypidoc24
rypidoc24: #!/bin/ksh: not found

Code:
+ SID=PPRD
+ + tr [A-Z] [a-z]
+ echo PPRD
LOWER_SID=pprd
+ USER=
+ MPATH=/u02/sct/banner/banpprd
+ SQUID=fimsmgr_job
+ PW_SHL=/u02/sct/banner/XXXX/pw_read.shl
+ JOBNUM=
+ AT_SIGN=@
+ JOBNAME=rypidoc_shl
+ MPATH=/u02/sct/banner/banpprd
+ MAILING_LIST=recheverri@middlebury.edu
+ SCRIPT_PATH=/u02/sct/banner/banpprd/xxxxx/plus/
+ SQL_SCRIPT1=rypidoc_loadcss_run.sql
+ SQL_SCRIPT2=rypidoc_process2_run.sql
+ cd /u02/sct/banner/banpprd/xxxx/dat_files
+ ls 3526_419184.dat
+ 1> /dev/null 2>& 1
+ [ 0 != 0 ]
+ + print 3526_419184.dat
+ sed s/.dat//
+ sed s/.*_//
fseqno=419184
+ cd /u02/sct/banner/banpprd/xxxxx/dat_files
+ date
+ echo 3526_419184.dat Tue May 4 19:49:27 EDT 2010
+ 1> idochd1.lst
+ cp 3526_419184.dat idoc.dat
+ cp 3526_419184.dat finaid.idoc
+ cd /u02/sct/banner/banpprd/xxxxx/plus/
+ sqlplus -s fimsmgr_job @ rypidoc_loadcss_run.sql 419184 PPRD
+ /u02/sct/banner/xxxx/xxxxx fimsmgr_job (stop here...) 
+


Last edited by jim mcnamara; 05-04-2010 at 10:22 PM.. Reason: code tags
# 2  
Old 05-04-2010
Look at what I marked in red - there was an incomplete shebang there. shebang == #!

What seems to be the real problem - excuse me - but I don't see it clearly.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Grep Data Base on Header

HI Guys, File A.txt UID,HD1,HD2,HD3,HD4 1,2,33,44,55 2,10,14,15,16 File B.txt UID HD1 HD4 A.txt B.txt >>>Output.txt UID,HD1,HD4 1,2,55 2,10,16 (11 Replies)
Discussion started by: pareshkp
11 Replies

2. Shell Programming and Scripting

Grep Data Base on Column

HI Want to grep data from column header and match with second file. File A.txt 1 2 3 4 5 6 X1 A L D J Q R X2 B M K P w T X3 C S L P e Y X4 R Z M A r U FileB.txt 1 2 3 4 6 7 (3 Replies)
Discussion started by: pareshkp
3 Replies

3. Shell Programming and Scripting

Combine data from two files base on uniq data

File 1 ID Name Po1 Po2 DD134 DD134_4A_1 NN-1 L_0_1 DD134 DD134_4B_1 NN-2 L_1_1 DD134 DD134_4C_1 NN-3 L_2_1 DD142 DD142_4A_1 NN-1 L_0_1 DD142 DD142_4B_1 NN-2 L_1_1 DD142 DD142_4C_1 NN-3 L_2_1 DD142 DD142_3A_1 NN-41 L_3_1 DD142 DD142_3A_1 NN-42 L_3_2 File 2 ( Combination of... (1 Reply)
Discussion started by: pareshkp
1 Replies

4. Shell Programming and Scripting

Change Data base on Column

Base of last two column i want to change may data if Last two Column have A and C then Copy Column $4 to Column $3. Input :- DD142 0_1 DD142_A DD142_B A B DD142 1_1 DD142_B DD142_C B C DD142 2_1 DD142_A DD142_C A C DD142 3_1 DD142_A A DD142 3_2 DD142_A A DD142 4_1 DD142_B B ... (4 Replies)
Discussion started by: pareshkp
4 Replies

5. Shell Programming and Scripting

Filtering data base on range

Hi All, I have the file in following format. I need to change column 16 and column 17 for those lines which has atleast one numerical digit in column 2 , with the exception on SUPP1 Input file : S00005615|1044|0|0.00|0|0.00| |112|-30|28.1|0|0| |20130331|220.2|2|3|... (2 Replies)
Discussion started by: nua7
2 Replies

6. Shell Programming and Scripting

Copy same name data from other file base on column

HI I have input file A.txt X Y Z File B.txt 1 X 10 AAA 11123 2 Y 22 PlD 4563 3 Z 55 PlD 54645 4 Z 66 PlD 15698 5 F 44 PlD 154798 6 C 55 PlD 12554 7 Z 88 PlD 23265 8 C 99 PlD 151654 9 C 11 PlD 21546546 I need New File C.txt (1 Reply)
Discussion started by: pareshkp
1 Replies

7. Cybersecurity

basic shellcode - why it runs on my system, if .data is not executable

Greetings, Suppose we have this piece of code, on Linux/i686 (my machine is Slackware Linux 13.1, 32 bit): char sc= /* 24 bytes */ "\x31\xc0" /* xorl %eax,%eax */ "\x50" /* pushl %eax ... (2 Replies)
Discussion started by: aigoia
2 Replies

8. Shell Programming and Scripting

data base update

hello everyone I need to update data base in file 1-ID 2-Name 3-ID group 4-ID teacher 5-mark list unique ID is (ID+ID group+ID teacher) we can append 5 th columns (marks list) main base file: Code: 1:John:3:1:4 3 2 2:Mark:1:2:1 3 3:Susan:3:4: input file: (1 Reply)
Discussion started by: mleplawy
1 Replies

9. Shell Programming and Scripting

Using loop reading a file,retrieving data from data base.

Hi All, I am having trouble through, I am reading the input from tab delimited file containing several records, e.g. line1 field1 field2 field3 so on.. line2 field1 field2 field3 so on.. .. .. on the basis of certain fields for each record in input file, I have to retrieve... (1 Reply)
Discussion started by: Sonu4lov
1 Replies

10. Programming

data base

Dear sirs, I am new to DataBase in C++,Also here iam using mysql, How can do it nad get the result back from the database and do operation onit. Thanks in advance, arunkumar (2 Replies)
Discussion started by: arunkumar_mca
2 Replies
Login or Register to Ask a Question