Home » SQL & PL/SQL » SQL & PL/SQL » Advance Shipment Notice Import program
Advance Shipment Notice Import program [message #306520] Fri, 14 March 2008 09:37 Go to next message
shree_z
Messages: 75
Registered: February 2008
Member
Hi all,

I am calling "IN: Ship Notice/Manifest (856/DESADV)" from a shell script. actually the called procedure does the import of ASNs to Oracle tables like RCV_HEADERS_INTERFACE,RCV_INTERFACE_HEADERS, RCV_SHIPMENT_HEADERS etc.

I am calling the procedure from another host program to import ASNs by batch.

Here is the problem I am facing.

When I am running "IN: Ship Notice/Manifest (856/DESADV)" separately as a concurrent program,and then query in TOAD i get the Processing_status_code column in RCV_HEADERS_INTERFACE as "Success" or "error"

But when I call the procedure from another concurrent progarm (host) to do the batch function, and then query the table RCV_HEADERS_INTERFACE , I am always getting the Processing_status_code column in RCV_HEADERS_INTERFACE as "Pending" always.

here is the my program

#!/bin/ksh
while read fname

do

echo  $fname 
export fname

sqlplus -S <<-END-OF-STD-INPUT-MARKER
  $db_user/$db_pass
var retval number;
DECLARE

v_retcode varchar2(100);
v_errbuf varchar2(100);
v_filepath varchar2(100);
v_fname varchar2(100);


BEGIN

v_filepath := '$datadir';
v_fname := '$fname' ;

ECEASNI.PROCESS_ASNI_INBOUND(v_retcode
                            ,v_errbuf
			    ,v_filepath
                            ,v_fname
                            ,'Y' 
                            ,'ASNI'  
                            ,'164' 
                            ,'0' 
                            ,'WE8ISO8859P1');
:retval := v_errbuf;
END;
/
exit :retval;
END-OF-STD-INPUT-MARKER

if [ $? -ne 0 ]
then
  echo "Error while Importing "
  echo "-------------------------------------------------------------------------"
else
mv $fname $archdir
echo The file $fname was successfully imported and moved from $datadir to $archdir
echo "----------------------------------------------------------------------------"
fi
done


Thanks in advance

[Updated on: Fri, 14 March 2008 10:00]

Report message to a moderator

Re: Advance Shipment Notice Import program [message #307008 is a reply to message #306520] Mon, 17 March 2008 08:57 Go to previous message
shree_z
Messages: 75
Registered: February 2008
Member
Any help???

Thanks
Previous Topic: Oracle number(*,0) [merged]
Next Topic: Different result of SELECT COUNT(*)
Goto Forum:
  


Current Time: Sun Dec 04 22:39:00 CST 2016

Total time taken to generate the page: 0.12028 seconds