Server Routine with sql statement.

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
arunmith
Participant
Posts: 2
Joined: Sun Nov 08, 2009 7:51 pm

Server Routine with sql statement.

Post by arunmith »

Hai, how to execute a sql statement in a server routine? Is there any function to do this? :D
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Why ? Why not use it from the job itself ?

Search for DSExecute().

Otherwise you can use universe inbuilt calls - which will be difficult to code and maintain.
arunmith
Participant
Posts: 2
Joined: Sun Nov 08, 2009 7:51 pm

Post by arunmith »

Hai Sainath, but i want to use it in an after job subroutine. How do i do this?
DS_SUPPORT
Premium Member
Premium Member
Posts: 232
Joined: Fri Aug 04, 2006 1:20 am
Location: Bangalore

Post by DS_SUPPORT »

Search the forum for the Keyword "BCI".

I will always prefer to execute the sql statements, by using After SQL tab in the target stage.

OR you can write a job and call it through the after job subroutine, which will be simpler than calling sql statements from the routine.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Wrap your sql into a script using the command line for your database and then use DSExecute in a routine to call and check it after job.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Why do you think you need to do this? Can you use a lookup instead?
Mamu Kim
Post Reply