Home » Developer & Programmer » Warehouse Builder » How to run mappings from Unix ? (OWB 10.0.2 AIX 5.3)
How to run mappings from Unix ? [message #347852] Sun, 14 September 2008 10:48 Go to next message
rahulnavathe
Messages: 1
Registered: September 2008
Junior Member
Hi guys,

Can someone please tell me how to run mappings from Unix. Because of some constraints I cannot install Oracle Workflow. I will have to call and schedule the mappings from some Unix or PL/SQL Script. Please let me know how this can be done.

Thanks a lot in advance.
Re: How to run mappings from Unix ? [message #349904 is a reply to message #347852] Tue, 23 September 2008 07:54 Go to previous message
ramya.pathak
Messages: 15
Registered: August 2007
Junior Member
Here is the Script. I have used this one for quite long. See if this helps..

# Call for the mapping Package..

step1()
{
cd ${HOME}
# Retrieve Oracle connection string CONNECT
get_ora_connect ${SCHEMA}

echo "==== Executing Oracle procedure"
sqlplus -s ${CONNECT} <<!

variable exit_status number
whenever sqlerror exit 128
whenever oserror exit 127
set serveroutput on size 1000000

DECLARE
p_status varchar2(100);
p_errormsg varchar2(100);
BEGIN
dbms_output.put_line('Executing Mapping <ur mapping name> ');
<ur mapping name>.main(p_status);
dbms_output.put_line('Status = ' || p_status);
if p_status = 'OK' then
dbms_output.put_line('<ur mapping name>.. Succefully Executed..');
:exit_status := 0;
else
dbms_output.put_line('Error Msg = ' || p_errormsg);
dbms_output.put_line('<ur mapping name> Failed ..');
:exit_status := -1;
end if ;
END;
/
EXIT :exit_status
!

ret_status=$?
echo "The return_status is $ret_status "
exit $ret_status
}
Previous Topic: Using SQL Select as Source for a Mapping
Next Topic: JOINS
Goto Forum:
  


Current Time: Wed Aug 27 18:28:41 CDT 2014

Total time taken to generate the page: 0.08515 seconds