Sql Loader by using shell script, not able to insert data
Hi,
I am trying to dump the data by using shell script.(in shell script i am having sqlldr command)(its a host excutable method cocurrent program)
When i am loading the data, by placing my files(.ctl,.prog,.csv,symbolink file for .prog) in $Custom_top/bin, it is loading exactly. 17000 records inserted.
But if i am loading the data by placing my files in $custom_top/custom_folders. unable to insert total data. only 43 records inserting.
Please any one can help me.
Thanks in advance.
Rama.
Srini, Thanks a lot for ur reply,
Oracle Apps version R12,
Microsoft windows XP profissional
Version 2002 service Pack 3
My Control file Script is:
load data
infile '$XADP_TOP/data/CPIU/in/XXOKS_Price_Increase.csv'
append
into table XXOKS_CONTRACT_PRICE_INCR_DTLS
fields terminated BY ',' optionally enclosed by '"'
TRAILING NULLCOLS
(EXCLUSION_FLAG,
LEGACY_NUMBER,
CUSTOMER_NUMBER,
CUSTOMER_NAME,
REQUEST_ID,
CONTRACT_NUMBER,
CONTRACT_START_DATE,
CONTRACT_END,
REQUEST_LINE_ID,
LINE_START_DATE,
LINE_END_DATE,
ITEM_NUMBER,
ITEM_DESCRIPTION,
UNIT_PRICE,
QTY,
NEW_UNIT_PRICE,
LINE_AMOUNT,
NEW_LINE_AMOUNT,
PRICE_INCREASED_DATE,
PERCENTAGE_INCREASED,
ORIGINAL_CONTRACT_AMOUNT,
NEW_CONTRACT_AMOUNT,
PRICE_INCREASE_AMOUNT)
My .prog File is: Please fidn that i created symbolink file also for my .prog.
if [ -z $XADP_TOP ];then
echo "XADP_TOP environment variable is not set!"
exit 1
fi
cd $XADP_TOP/data/CPIU/in
DATE=`date +%y%m%d:%H%M`
i_program_name="$0"
i_ora_pwd="$1"
i_user_id="$2"
i_user_name="$3"
i_request_id="$4"
i_ftp_host_name="$5"
i_ftp_user_name="$6"
i_ftp_user_password="$7"
ftp_prog() {
# FTP Function to reuse the FTP Commands
if [ $# -ne 6 ];then
echo "Usage : ftp_prog <Hostname> <User name> <Password> <Remote Directory> <command> <filename>"
exit 2
fi
l_ftp_host_name="$1"
l_ftp_user_name="$2"
l_ftp_user_password="$3"
l_ftpdir="$4"
l_ftp_command="$5"
l_ftp_filename="$6"
ftp -v -n ${l_ftp_host_name} <<EOF
user ${l_ftp_user_name} ${l_ftp_user_password}
ascii
cd ${l_ftpdir}
${l_ftp_command} ${l_ftp_filename}
quit
EOF
#exit $?
# setting the ftp directory
#ftpdir="/`echo ${TWO_TASK:-$ORACLE_SID}|tr "[A-Z]" "[a-z]"`/CPIU"
##ftpdir="/FinTEST/quoting/PS/ar"
ftpdir="$XADP_TOP/data/CPIU/in"
# setting the in directory and out directory
indir="$XADP_TOP/data/CPIU/in"
outdir="$XADP_TOP/data/CPIU/out"
ftp_prog ${i_ftp_host_name} ${i_ftp_user_name} ${i_ftp_user_password} ${ftpdir} get XXOKS_Price_Increase.csv
echo $ftpdir
echo "Converting the data file into unix mode"
dos2unix XXOKS_Price_Increase.csv XXOKS_Price_Increase.csv
chmod 777 XXOKS_Price_Increase.csv
cd $XADP_TOP/bin
echo "Trying to excute sqlldr and entering into the into control file"
$ORACLE_HOME/bin/sqlldr userid=$i_ora_pwd control=XXOKS_PRICE_INCR_LOAD log=$XADP_TOP/log/XXOKS_PRICE_INCR_LOAD_${DATE}.log;
exit_status=$?
echo "Checking the status and giving permissions to the data file which in in dir"
if [ $exit_status -eq 0 ]; then
cd $XADP_TOP/data/CPIU/in
chmod 777 XXOKS_Price_Increase.csv
echo "try to move data file into out dir"
# Moving the file to out directory
mv XXOKS_Price_Increase.csv ${outdir}/XXOKS_Price_Increase.csv_${DATE}
#echo "ready to zip file in out dir step6"
# Zipping the file
#gzip -f ${outdir}/XXOKS_Price_Increase.csv_${DATE}
echo "deleting the file which is in dir"
# Deleting the file from in directory
/bin/rm -f ${indir}/XXOKS_Price_Increase.csv
# Deleting from the remote directory
ftp_prog ${i_ftp_host_name} ${i_ftp_user_name} ${i_ftp_user_password} ${ftpdir} delete XXOKS_Price_Increase.csv
echo "sqlloader finished successfully."
else
echo "Error in loader"
##echo "Loader error in Price Increase Detials File ${i_file}"
fi
exit $exit_status
And My Log file Comments are
SQL*Loader: Release 10.1.0.5.0 - Production on Thu Dec 3 01:32:08 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Control File: XXOKS_PRICE_INCR_LOAD.ctl
Data File: /oesapp/applmgr/GIS11/apps/apps_st/appl/xadp/12.0.0/data/CPIU/in/XXOKS_Price_Increase.csv
Bad File: XXOKS_Price_Increase.bad
Discard File: none specified
(Allow all discards)
Number to load: ALL
Number to skip: 0
Errors allowed: 50
Bind array: 64 rows, maximum of 256000 bytes
Continuation: none specified
Path used: Conventional
Table XXOKS_CONTRACT_PRICE_INCR_DTLS, loaded from every logical record.
Insert option in effect for this table: APPEND
TRAILING NULLCOLS option in effect
Column Name Position Len Term Encl Datatype
EXCLUSION_FLAG FIRST * , O(") CHARACTER
LEGACY_NUMBER NEXT * , O(") CHARACTER
CUSTOMER_NUMBER NEXT * , O(") CHARACTER
CUSTOMER_NAME NEXT * , O(") CHARACTER
REQUEST_ID NEXT * , O(") CHARACTER
CONTRACT_NUMBER NEXT * , O(") CHARACTER
CONTRACT_START_DATE NEXT * , O(") CHARACTER
CONTRACT_END NEXT * , O(") CHARACTER
REQUEST_LINE_ID NEXT * , O(") CHARACTER
LINE_START_DATE NEXT * , O(") CHARACTER
LINE_END_DATE NEXT * , O(") CHARACTER
ITEM_NUMBER NEXT * , O(") CHARACTER
ITEM_DESCRIPTION NEXT * , O(") CHARACTER
UNIT_PRICE NEXT * , O(") CHARACTER
QTY NEXT * , O(") CHARACTER
NEW_UNIT_PRICE NEXT * , O(") CHARACTER
LINE_AMOUNT NEXT * , O(") CHARACTER
NEW_LINE_AMOUNT NEXT * , O(") CHARACTER
PRICE_INCREASED_DATE NEXT * , O(") CHARACTER
PERCENTAGE_INCREASED NEXT * , O(") CHARACTER
ORIGINAL_CONTRACT_AMOUNT NEXT * , O(") CHARACTER
NEW_CONTRACT_AMOUNT NEXT * , O(") CHARACTER
PRICE_INCREASE_AMOUNT NEXT * , O(") CHARACTER
value used for ROWS parameter changed from 64 to 43
Table XXOKS_CONTRACT_PRICE_INCR_DTLS:
43 Rows successfully loaded.
0 Rows not loaded due to data errors.
0 Rows not loaded because all WHEN clauses were failed.
0 Rows not loaded because all fields were null.
Space allocated for bind array: 255162 bytes(43 rows)
Read buffer bytes: 1048576
Total logical records skipped: 0
Total logical records read: 43
Total logical records rejected: 0
Total logical records discarded: 0
Run began on Thu Dec 03 01:32:08 2009
Run ended on Thu Dec 03 01:32:08 2009
Elapsed time was: 00:00:00.19
CPU time was: 00:00:00.04
Plz srini help me.
Thanks in advance
Rama..
Similar Messages
-
Not able to insert data in a table...using MS SQL 2000
Hi guys,
Since this morning, for some reasons that I don't know, I can't insert data into my database. This is piece of my code:
Statement statement1 = connection.createStatement();
String sql = "SELECT PeopleID, LastName FROM People" + " WHERE LastName='" + lastName + "'";
ResultSet resultSet = statement1.executeQuery(sql);
and this is the error message I'm having:
Error executing the SQL statement[Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Invalid object name 'People'.
Any idea on how to fix that...?? I played around with the database to make sure that I have all the right permissions, still it doesn't work...
Thanks...How do I check to make sure that it has an object.It doesn't. Period. That's what the error message is saying.
I'm able to query that table People and I get a
result back from it.Then whatever tool you're using to query that table, is connected to a different database (and/or connected as a different user) than the one your code is trying to connect to. -
How to Compile the PL/SQL Package/ Procedure using shell script
Hi,
I tried to Compiled the shell script but I am facing some error.
Can any one help me how to compile the PL/SQL shell script without error. Awaiting for your valuable reply.
Thanks,
Arun Prakashuser8726849 wrote:
PL/SQL shell script without errorWhat's a PL/SQL shell script?
Can you please post exactly what you are trying to do (As in the actual code that you are executing and its output)? Also please post it in \ tags (See FAQ). -
Not able to insert data in database via forms
Hi there. i have been trying to insert data into my database, which i am connected to remotely. i have written some sql code for a button.
INSERT INTO address_repository VALUES('ADD'|| :address.address_id, :address.address_street_num,
:address.address_street_name, :address.address_suburb, :address.address_postcode, :address.address_state, :address.address_country);
where the above are the above are textfield items. my code compiles fine, and no errors are displayed on my form, but when i click the button, nothing happens, and the page is busy, and appears to be processing something, but does nothing.don't write
INSERT INTO address_repository VALUES('ADD'|| :address.address_id, :address.address_street_num,
:address.address_street_name, :address.address_suburb, :address.address_postcode, :address.address_state, :address.address_country);
write
INSERT INTO address_repository (address_id, ....., ....., .....
VALUES('ADD'|| :address.address_id, :address.address_street_num,
:address.address_street_name, :address.address_suburb, :address.address_postcode, :address.address_state, :address.address_country);
if the same error is still active, then we look further, ok? -
Not able to insert the data in JDBC receiver
hi Team,
Please help me i am working on IDOC - JDBC interface i am not able to insert data into the table.
error says that table doesn't exists, but if i check in the database the table exists..
below is the error getting triggered.
could not execute statement for table/stored proc."A_PORDER_REG"(structure " STATEMENT") due to
java.sql.SQLException: ORA - 00942 table does not exist
Thanks & Regards,
Vishnu vardhan.Might be u have given table name is diffarent, table name must be match in table field of jdbc receiver structure and table name of data base tables.both places u must give the same table names . this is one reason another one u might be given jdbc structure is wrong. u must specify jdbc structure like this.
STATEMENT
TEST
action(attribute) (action u specify as INSERT)
TABLE( here u give the table name )
access ( below u write the fields)
and one more is u check the receiver communication channel in that u check properly u have given jdbc drivers, connections , user name and pass word.
check all those things definatly u wil find the error. -
Hi,
I want to study in details about how to use shell script in pl/sql codes. Can any one suggest some useful link on the same.
Nordiksmon wrote:
BluShadow wrote:
miriam_omaha wrote:
If you mean execute a shell script from a procedure, there are ways, not easy ways, to execute a shell script - try this thread on that topic:Not easy?
What's not easy about setting up a job using DBMS_SCHEDULER which can directly call any executable at the operating system level?that doesn't meet the requirement, it's about executing host commands from within plsql.Which you can do with DBMS_SCHEDULER by creating a job to execute straight away. DBMS_SCHEDULER can execute operating system commands...
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_sched.htm#i1010013
>
'EXECUTABLE'
This specifies that the program is external to the database. External programs implies anything that can be executed from the operating system's command line. AnyData arguments are not supported with job or program type EXECUTABLE. -
How to Email Concurrent Program Output to Email using Shell Script
Hi All,
Have a Nice Day,
I have a tricky requirement and i was not able to achieve, let me explain my requirement
I have created a PLSQL Concurrent Program named "Approval Update". This will do update and it display the number of rows updated.
Now i need to take this concurrent program output and it needs to be send it to the person who submits this program as an email using shell scripts.
I have referred meta link note as well as some OTN posts but I was not able to achieve this.
Please help me to complete this As soon as possible, Thanks in advance for your help.
Let me know if you need more clarifications.
Regards,
CSKI don't have much idea in shell scripts all i want is, in my shell script i need to get the parent concurrent program output and that needs to be emailed to the intended person.
Please help to to get the shell script commands for this.I do not have any shell script to share, sorry! If you want the query to get the parent request_id so you can get the log/out file name/location from then please refer to:
REQUESTS.sql Script for Parent/Child Request IDs and Trace File IDs [ID 280295.1]
http://etrm.oracle.com/pls/et1211d9/etrm_pnav.show_object?c_name=FND_CONC_REQ_SUMMARY_V&c_owner=APPS&c_type=VIEW
http://etrm.oracle.com/pls/et1211d9/etrm_pnav.show_object?c_name=FND_CONCURRENT_REQUESTS&c_owner=APPLSYS&c_type=TABLE -- LOGFILE_NAME & OUTFILE_NAME
Thanks,
Hussein -
How to get ORA errors in alertlog file using shell script.
Hi,
Can anyone tell me how to get all ORA errors between two particular times in an alertlog file using shell script.
ThanksHi,
You can define the alert log as an external table, and extract messages with SQL, very cool:
http://www.dba-oracle.com/t_oracle_alert_log_sql_external_tables.htm
If you want to write a shell script to scan the alert log, see here:
http://www.rampant-books.com/book_2007_1_shell_scripting.htm
#!/bin/ksh
# log monitoring script
# report all errors (and specific warnings) in the alert log
# which have occurred since the date
# and time in last_alerttime_$ORACLE_SID.txt
# parameters:
# 1) ORACLE_SID
# 2) optional alert exclusion file [default = alert_logmon.excl]
# exclude file format:
# error_number error_number
# error_number ...
# i.e. a string of numbers with the ORA- and any leading zeroes that appear
# e.g. (NB the examples are NOT normally excluded)
# ORA-07552 ORA-08006 ORA-12819
# ORA-01555 ORA-07553
BASEDIR=$(dirname $0)
if [ $# -lt 1 ]; then
echo "usage: $(basename) ORACLE_SID [exclude file]"
exit -1
fi
export ORACLE_SID=$1
if [ ! -z "$2" ]; then
EXCLFILE=$2
else
EXCLFILE=$BASEDIR/alert_logmon.excl
fi
LASTALERT=$BASEDIR/last_alerttime_$ORACLE_SID.txt
if [ ! -f $EXCLFILE ]; then
echo "alert exclusion ($EXCLFILE) file not found!"
exit -1
fi
# establish alert file location
export ORAENV_ASK=NO
export PATH=$PATH:/usr/local/bin
. oraenv
DPATH=`sqlplus -s "/ as sysdba" <<!EOF
set pages 0
set lines 160
set verify off
set feedback off
select replace(value,'?','$ORACLE_HOME')
from v\\\$parameter
where name = 'background_dump_dest';
!EOF
`
if [ ! -d "$DPATH" ]; then
echo "Script Error - bdump path found as $DPATH"
exit -1
fi
ALOG=${DPATH}/alert_${ORACLE_SID}.log
# now create awk file
cat > $BASEDIR/awkfile.awk<<!EOF
BEGIN {
# first get excluded error list
excldata="";
while (getline < "$EXCLFILE" > 0)
{ excldata=excldata " " \$0; }
print excldata
# get time of last error
if (getline < "$LASTALERT" < 1)
{ olddate = "00000000 00:00:00" }
else
{ olddate=\$0; }
errct = 0; errfound = 0;
{ if ( \$0 ~ /Sun/ || /Mon/ || /Tue/ || /Wed/ || /Thu/ || /Fri/ || /Sat/ )
{ if (dtconv(\$3, \$2, \$5, \$4) <= olddate)
{ # get next record from file
next; # get next record from file
# here we are now processing errors
OLDLINE=\$0; # store date, possibly of error, or else to be discarded
while (getline > 0)
{ if (\$0 ~ /Sun/ || /Mon/ || /Tue/ || /Wed/ || /Thu/ || /Fri/ || /Sat/ )
{ if (errfound > 0)
{ printf ("%s<BR>",OLDLINE); }
OLDLINE = \$0; # no error, clear and start again
errfound = 0;
# save the date for next run
olddate = dtconv(\$3, \$2, \$5, \$4);
continue;
OLDLINE = sprintf("%s<BR>%s",OLDLINE,\$0);
if ( \$0 ~ /ORA-/ || /[Ff]uzzy/ )
{ # extract the error
errloc=index(\$0,"ORA-")
if (errloc > 0)
{ oraerr=substr(\$0,errloc);
if (index(oraerr,":") < 1)
{ oraloc2=index(oraerr," ") }
else
{ oraloc2=index(oraerr,":") }
oraloc2=oraloc2-1;
oraerr=substr(oraerr,1,oraloc2);
if (index(excldata,oraerr) < 1)
{ errfound = errfound +1; }
else # treat fuzzy as errors
{ errfound = errfound +1; }
END {
if (errfound > 0)
{ printf ("%s<BR>",OLDLINE); }
print olddate > "$LASTALERT";
function dtconv (dd, mon, yyyy, tim, sortdate) {
mth=index("JanFebMarAprMayJunJulAugSepOctNovDec",mon);
if (mth < 1)
{ return "00000000 00:00:00" };
# now get month number - make to complete multiple of three and divide
mth=(mth+2)/3;
sortdate=sprintf("%04d%02d%02d %s",yyyy,mth,dd,tim);
return sortdate;
!EOF
ERRMESS=$(nawk -f $BASEDIR/awkfile.awk $ALOG)
ERRCT=$(echo $ERRMESS|awk 'BEGIN {RS="<BR>"} END {print NR}')
rm $LASTALERT
if [ $ERRCT -gt 1 ]; then
echo "$ERRCT Errors Found \n"
echo "$ERRMESS"|nawk 'BEGIN {FS="<BR>"}{for (i=1;NF>=i;i++) {print $i}}'
exit 2
fi -
How to write CLOB parameter in a file or XML using shell script?
I executed a oracle stored procedure using shell script. How can i get the OUT parameter of the procedure(CLOB) and write it in a file or XML in UNIX environment using shell script?
Edit/Delete MessageSQL> var c clob
SQL>
SQL> begin
2 select
3 DBMS_XMLGEN.getXML(
4 'select rownum, object_type, object_name from user_objects where rownum <= 5'
5 ) into :c
6 from dual;
7 end;
8 /
PL/SQL procedure successfully completed.
SQL>
SQL> set long 999999
SQL> set heading off
SQL> set pages 0
SQL> set feedback off
SQL> set termout off
SQL> set trimspool on
// following in the script is not echo'ed to screen
set echo off
spool /tmp/x.xml
select :c from dual;
spool off
SQL>
SQL> --// file size
SQL> !ls -l /tmp/x.xml
-rw-rw-r-- 1 billy billy 583 2011-12-22 13:35 /tmp/x.xml
SQL> --// file content
SQL> !cat /tmp/x.xml
<?xml version="1.0"?>
<ROWSET>
<ROW>
<ROWNUM>1</ROWNUM>
<OBJECT_TYPE>TABLE</OBJECT_TYPE>
<OBJECT_NAME>BONUS</OBJECT_NAME>
</ROW>
<ROW>
<ROWNUM>2</ROWNUM>
<OBJECT_TYPE>PROCEDURE</OBJECT_TYPE>
<OBJECT_NAME>CLOSEREFCURSOR</OBJECT_NAME>
</ROW>
<ROW>
<ROWNUM>3</ROWNUM>
<OBJECT_TYPE>TABLE</OBJECT_TYPE>
<OBJECT_NAME>DEPT</OBJECT_NAME>
</ROW>
<ROW>
<ROWNUM>4</ROWNUM>
<OBJECT_TYPE>TABLE</OBJECT_TYPE>
<OBJECT_NAME>EMP</OBJECT_NAME>
</ROW>
<ROW>
<ROWNUM>5</ROWNUM>
<OBJECT_TYPE>TABLE</OBJECT_TYPE>
<OBJECT_NAME>EMPTAB</OBJECT_NAME>
</ROW>
</ROWSET>
SQL> -
Passing flexfield from report wrapper to seeded report using shell script
I am unable to pass flexfield values from report wrapper to seeded report using shell script
below is the shell script that i am using to transfer GL Account High and GL Account Low to the seeded program Receipt Journal Report (ARXRJR). the flex fields get passed through the parameter v_param_12 and v_param_13. but all i am getting in the seeded report log file is the reporting level,reporting context,set_of_books,period, gl_date_low/high .
#TEST Program for Passing GL Account High and GL Account Low
v_user_name=`echo $3`
v_login_pwd=`echo $FCP_LOGIN`
v_prog_name=`echo TESTARXRJR`
echo 'v_prog_name: '$v_prog_name
# testing for passing the arguments from CM ...
if [ -z "$1" ]
then
echo "Please pass the first argument...."
exit 1
fi
v_request_id=`echo $4`
echo 'v_request_id: '$v_request_id
v_param_1=`echo $5`
echo 'v_param_1: '$v_param_1
v_param_2=`echo $6`
echo 'v_param_2: '$v_param_2
v_param_3=`echo $7`
echo 'v_param_3: '$v_param_3
v_param_4=`echo $8`
echo 'v_param_4: '$v_param_4
v_param_5="$9"
echo 'v_param_5: '$v_param_5
shift
v_param_6=`echo $9`
echo 'v_param_6: '$v_param_6
shift
v_param_7=`echo $9'`
echo 'v_param_7: '$v_param_7
shift
v_param_8=`echo "$9"`
echo 'v_param_8: '$v_param_8
shift
v_param_9=`echo $9`
echo 'v_param_9: '$v_param_9
shift
v_param_10=`echo $9`
echo 'v_param_10: '$v_param_10
shift
v_param_11=`echo $9`
echo 'v_param_11: '$v_param_11
shift
v_param_12=`echo $9`
echo 'v_param_12: '$v_param_12
shift
v_param_13=`echo $9`
echo 'v_param_13: '$v_param_13
shift
v_param_14=`echo $9`
echo 'v_param_14: '$v_param_14
shift
v_param_15=`echo $9`
echo 'v_param_15: '$v_param_15
shift
v_param_16=`echo $9`
echo 'v_param_16: '$v_param_16
shift
v_param_17=`echo $9`
echo 'v_param_17: '$v_param_17
shift
v_param_18=`echo $9`
echo 'v_param_18: '$v_param_18
shift
v_param_19=`echo $9`
echo 'v_param_19: '$v_param_19
shift
v_param_20=`echo $9`
echo 'v_param_20: '$v_param_20
shift
v_param_21=`echo $9`
echo 'v_param_21: '$v_param_21
shift
v_param_22=`echo $9`
echo 'v_param_22: '$v_param_22
shift
v_param_23=`echo $9`
echo 'v_param_23: '$v_param_23
echo "Executiong SQL to obtain org id and responsibility name"
(sqlplus -s /nolog <<end_of_sql
conn $v_login_pwd
set heading off
set echo off
set feedback off
SELECT 'ORGID:'||b.profile_option_value || ':' ||e.responsibility_name
FROM fnd_profile_options a,
fnd_profile_option_values b,
fnd_concurrent_requests c,
fnd_responsibility d,
fnd_responsibility_tl e
WHERE c.request_id = $v_request_id
AND c.responsibility_id = b.level_value
AND b.profile_option_id = a.profile_option_id
AND a.application_id = b.application_id
AND c.responsibility_application_id = d.application_id
AND d.application_id = e.application_id
AND a.profile_option_name = 'ORG_ID'
AND c.responsibility_id = d.responsibility_id
AND d.responsibility_id = e.responsibility_id;
exit
end_of_sql
) > a.log
v_var=`grep -iv "ORG_ID" a.log|sed 's/Connected.//'`
echo 'v_var: ' $v_var
v_org=`echo $v_var| awk 'FS=":" {print $2 }'`
v_resp_name=`echo $v_var | awk 'FS=":" {print $3}'`
echo 'v_org :'$v_org
echo 'v_resp_name :'$v_resp_name
echo 'Sumitting Receipt Journal Report...'
user_request=`CONCSUB $v_login_pwd GL "$v_resp_name" $v_user_name WAIT=Y CONCURRENT AR ARXRJR \
\"$v_param_3\"\
\"$v_param_4\"\
\"$v_param_5\"\
\"$v_param_6\"\
\"$v_param_7\"\
\"$v_param_8\"\
\"$v_param_9\"\
\"$v_param_10\"\
\"$v_param_11\"\
\"$v_param_12\"\
\"$v_param_13\"\
\"$v_param_14\"\
\"$v_param_15\"\
\"$v_param_16\"\
\"$v_param_17\"\
\"$v_param_18\"\
\"$v_param_19\"\
\"$v_param_20\"\
\"$v_param_21\"\
\"$v_param_22\"\
\"$v_param_23\"`
user_request=`echo $user_request|awk '{print $3}'`
echo Request is $user_request
trx_rep_file="$user_request"
echo 'trx_rep_file: '$trx_rep_file
sleep 10
for i in 1 2 3 4 5
do
if test -f $APPLCSF/$APPLLOG/l$user_request.req
then
if test [`grep -i '"Concurrent process completed successfully"' $APPLCSF/$APPLLOG/l$user_request.req`]
then
if test -f $APPLCSF/$APPLOUT/o$trx_rep_file.out
then
echo +++++++++++++++++++++++++++++++++
echo 'output file found'
echo ++++++++++++++++++++++++++++++++++++++
else
echo +++++++++++++++++++++++++++++++++++++++++
echo failure in Report listing production
echo +++++++++++++++++++++++++++++++++++++++
fi
break
else
echo +++++++++++++++++++++++++++++++++++++++
echo Job not Over Yet
echo +++++++++++++++++++++++++++++++++++++++++++++
fi
echo +++++++++++++++++++++++++++++++++++++++
echo File not found yet
echo ++++++++++++++++++++++++++++++++++++++
fi
sleep 10
done
echo ----------------------------------------------------------
echo Transaction Listing process over
echo ---------------------------------------------------------
echo ----------------------------------------------------------
echo Executing SQL to derive Search Pattern
echo ----------------------------------------------------------
v_pattern=`sqlplus -s /nolog <<EOF1
conn $v_login_pwd
set heading off
set echo off
set feedback off
SELECT 'SEARCH^'||meaning||'^'||attribute1||'^'||attribute2||'^'||attribute3
FROM fnd_lookup_values
WHERE lookup_type = '$v_param_2'
AND lookup_code = '$v_prog_name';
exit
EOF1`
echo 'v_pattern: '$v_pattern
v_pattern_n1=`echo $v_pattern|sed 's/Connected.//'|awk 'FS="^" {print $2}'`
echo 'v_pattern_n1: '$v_pattern_n1
v_pattern_n2=`echo $v_pattern|sed 's/Connected.//'|awk 'FS="^" {print $3}'`
echo 'v_pattern_n2: '$v_pattern_n2
v_pattern_n3=`echo $v_pattern|sed 's/Connected.//'|awk 'FS="^" {print $4}'`
echo 'v_pattern_n3: '$v_pattern_n3
v_pattern_n4=`echo $v_pattern|sed 's/Connected.//'|awk 'FS="^" {print $4}'|sed 's/ //'`
echo 'v_pattern_n4: '$v_pattern_n4
echo 'v_param_12: '$v_param_12
echo 'v_param_13: '$v_param_13
echo -----------------------------------
echo Deriving final output
echo ----------------------------------
v_var=`cat $APPLCSF/$APPLOUT/o$trx_rep_file.out | grep -i "$v_pattern_n1"|\
sed "s/(/-/g"|sed "s/)/ /g"|\
sed "s/$v_pattern_n1/$v_pattern_n2/g"|\
sed 's/ /~/g'|\
sed 's/~~*/~/g'|\
sed 's/ *//g'|\
sed 's/,//g'`
echo 'v_var: '$v_var
v_var_2=`cat $APPLCSF/$APPLOUT/o$trx_rep_file.out|grep -i "$v_pattern_n3"|\
uniq`
v_out_1=`echo "$v_var"|grep -i "$v_pattern_n2"|awk 'FS="~" {print $3}'`
echo 'v_out_1: '$v_out_1
echo 'v_var_2: '$v_var_2
echo ------------------------------------------------------------
v_out_2=`echo "$v_var_2"|grep -i "$v_pattern_n3"|awk 'FS=":" {print $2}'`
echo 'v_out_2: '$v_out_2
echo ----------------------------------------------
echo Process comleted
echo ----------------------------------------------------
echo ================================================================================
#---------------------------------------------------------------------------------------------------The name of this OTN group is "Database - General"
Your question relates to an unnamed application that might be E-Business Suite, or PeopleSoft, or Siebel, who can say.
Please re-ask your question in the appropriate applications forum and be sure to clearly name the full product name and version. We are not mind readers and we can not look over your shoulder. -
Error Handling with sql *plus from a shell script
When I execute sql plus in a shell script with the wrong username/pass pair, the shell script hangs without terminating. What is the proper way to execute sql plus in a shell script that will catch a login failure and make sure the script doesn't hang?
Example:
We execute the following in our shell script:
sqlplus ${ORACLE_INST} @./sql/ftp_ledger_put.sql
Now if somebody comes along and alters the login then the script would hang. Is there a way to have the script exit gracefully?Not the most elegant solution but.......
sqlplus <<EOD 2>&1 >some_log_file
user/pwd
@somescript
exit
EOD
Because sqlplus allows for 3 tries at log in if user/pwd is not valid it will try to use subsequent lines. Each will fail.
You have to look in some_log_file to determine success/failure
Ken -
Not able to display data in separate columns using Unicode encoding
Hi,
Iam using Unicode encoding in my Java appln to support Japanese characters while downloading CSV report. But using the Unicode encoding displays all data in the first column of Excel sheet.
Please let me know how to display data in different columns using Unicode encoding in Excel sheet.
This is an urgent need. Please help me out.Hi,
I have no problem with item :P15_EV_LCL this is having a value my probem here is i am using java script to display the value in different color based on the condtion case
eg:
select
case
TRUNC((
( (NVL(Z."AEWP",0) - NVL(Z."BEWP_Final",0) ) / DECODE(Z."BEWP_Final",0,NULL,Z."BEWP_Final") ) * 100
),2)
= :P15_EV_LCL
then
span style="background-color:lightgreen"
|| TRUNC((
( (NVL(Z."AEWP",0) - NVL(Z."BEWP_Final",0) ) / DECODE(Z."BEWP_Final",0,NULL,Z."BEWP_Final") ) * 100
),2) || '%' || /span
else
span style="background-color:yellow"
|| TRUNC(
( (NVL(Z."AEWP",0) - NVL(Z."BEWP_Final",0) ) / DECODE(Z."BEWP_Final",0,NULL,Z."BEWP_Final") ) * 100
),2) || '%' || /span
end "Effort"
from actuals Z
If i dont use this <Span style="Background-color:color"> i am able to generate data in excel sheet if i use this color coding i am not able to get data in spread sheet.
Please suggest
Thanks
Sudhir
Edited by: Sudhir_N on Mar 23, 2009 10:00 PM -
Sending an email using shell script in Oracle Applications
Hi,
I have a pl/sql package which will call a shell script program.The shell script program is written in order to send the invoice hold details of AP as a mail.The parameters to this program are passed in the pl/sql package.
The shell script program has
5 parameters namely
to - email
from - email
hold id - which is a number
hold name - varchar2( free text)
hold reason - varchar2( free text)
the shell script looks as below.
FROM_EMAIL=`echo $1|cut -f9 -d " "|sed 's/\"//g'`
echo "From email id is $FROM_EMAIL" -- From email
TO_EMAIL=`echo $1|cut -f10 -d " "|sed 's/\"//g'`
echo "To Email id is $TO_EMAIL" -- to email
PARAM0=`echo $1 | awk '{print $11}'|sed -e "s/\"//g"`
echo "Param0: $PARAM0" -- hold id
PARAM1=`echo "$1" | cut -d" " -f12-| sed -e "s/\" \"/\"^\"/g" | awk -F'^' '{print $1}'|sed -e "s/\"//g"`
echo "Param1: $PARAM1" -- hold name
PARAM2=`echo "$1" | cut -d" " -f13-| sed -e "s/\" \"/\"^\"/g" | awk -F'^' '{print $1}'|sed -e "s/\"//g"`
echo "Param2: $PARAM2" -- hold reason
the values that am passinf to this program are if suppose
from email ---- [email protected]
to email [email protected]
12345 ------ hold id
test hold name ------ hold name
test hold reason ------- hold reasonIs there a question here?
In any case you could easily have done this inside the database using UTL_SMTP. -
Hello all,
We are running Oracle 10G on Unix and I am fairly new to Unix. I know how to assign a SQL select statements values to an alias in a SQL environment such as TOAD, such as for example;
Select LogID ID, LogType Type, LogDate Date from audit_logs
where LogDate = sysdate;
That will give the determined values the labels of ID, Type, and Date respectively. But how do I assign the multiple SQL select values to shell script variables in UNIX? I have found how to do it for a single value but not a multiple value.
Thanks in advance
Regards
AlanoThanks for reply.
What we want to do is ensure a relevant file was deleted by a database package\procedure that is part of a third party application. My aim will be to interrogate the relevant table, extract the three relevant fields and join them together into one line\string that will be appended to a lof file
Thanks again in advance
Regards
Alano -
Can SQL*Loader be used for Oracle html pages, for e.g Customer, Tasks etc
Hi,
Can SQL*Loader be used for Oracle html pages, for e.g Customer, Tasks etc.
Reason: We have a job that creates leads, tasks in 11i, but r12 is not working as expected, an SR is open with Oracle for a long time and no solution so far. I am thinking of using SQL*loader to populate the data, but these are html pages. Will SQL* Loader work?
12.1.4 / 11g db
Appreciate your inputs.
Thanks,
KCan SQL*Loader be used for Oracle html pages, for e.g Customer, Tasks etc. It should work.
Reason: We have a job that creates leads, tasks in 11i, but r12 is not working as expected, What is the issue you have with R12?
an SR is open with Oracle for a long time and no solution so far. I am thinking of using SQL*loader to populate the data, but these are html pages. Will SQL* Loader work?What was Oracle feedback? Did they say it is certified and can be used?
Thanks,
Hussein
Maybe you are looking for
-
I have a Mac Mini with a processor that won't upgrade to Mavericks. I am running OSX 10.6.8 on it---but there are functions in OSX 10.7 I'd like to use. The Apple iTunes Store told me they were sorry but my licenses would no longer work---wife's co
-
Streaming videos from Cloudfront in Captivate 6
Hi, I'm really hoping someone out there can explain this to me in as simple a way as possible. I have a large project with 10 video files at various points throughout the course. I've run some tests with the videos set to progressively download, but
-
please help me out... i am working on oracle 6i forms ...so how can i change the look of forms like java or .net applications.. is there any tool or file so please share !!!!! back end version -10g
-
i'm trying to get an issue resolved and i was asked to send a copy of my system profile. im new to macs and dont understand what this is or where to find it, could someone help me out please? how do i get a copy of my system profile? thank you
-
Sub Total in REUSE_ALV_HIERSEQ_LIST_DISPLAY
Hello Guys, I am using the FM REUSE_ALV_HIERSEQ_LIST_DISPLAY to display my final Ouptut. At present my output is: MATNR KUNNR LABST 002 212 50 002 212 100 150 002