How to call the Sql statement in before sub rouitne

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
srinivas.g
Participant
Posts: 251
Joined: Mon Jun 09, 2008 5:52 am

How to call the Sql statement in before sub rouitne

Post by srinivas.g »

Hi,

How to execute the Sql statement in Before job sub routine
Srinu Gadipudi
RAJARP
Participant
Posts: 147
Joined: Thu Dec 06, 2007 6:46 am
Location: Chennai

Re: How to call the Sql statement in before sub rouitne

Post by RAJARP »

srinivas.g wrote:Hi,

How to execute the Sql statement in Before job sub routine
srini,
what type of sql statement you want to execute??if you could explain me a bit,i will try to help you!!!!!!!!!!!
srinivas.g
Participant
Posts: 251
Joined: Mon Jun 09, 2008 5:52 am

Post by srinivas.g »

for example :

Delete from emp where report_date =sysdate;
Srinu Gadipudi
tkbharani
Premium Member
Premium Member
Posts: 71
Joined: Wed Dec 27, 2006 8:12 am
Location: Sydney

Post by tkbharani »

As you can't directly call a sql statement in before job subroutine. You can write a small unix script to do that and call the unix script through Execute SH command.

Else write a small procedure and call the same by ODBC stage before calling the actual stage
Thanks, BK
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You CAN directly call a sql statement in before job subroutine, by using BCI functions. Search DSXchange for more information, particularly regarding the likelihood that you will need to purchase a license for your DataDirect ODBC driver to be able to use the BCI functions.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply