Inserting data through routines in database

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
poorna.ds
Participant
Posts: 18
Joined: Sun Jun 22, 2008 3:07 am
Location: Mumbai

Inserting data through routines in database

Post by poorna.ds »

Can we insert data into any database through routines in server jobs?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Yes, but I certainly wouldn't advise it. Far better to use a job for that and have the routine land the data in a flat file for it to load.
-craig

"You can never have too many knives" -- Logan Nine Fingers
poorna.ds
Participant
Posts: 18
Joined: Sun Jun 22, 2008 3:07 am
Location: Mumbai

Post by poorna.ds »

chulett wrote:Yes, but I certainly wouldn't advise it. Far better to use a job for that and have the routine land the data in a flat file for it to load. ...

Could you tell me what would be the issue if we insert data through routine. Can you also tell me with a small example how we write the command in routine?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Search for "BCI" here and make sure you understand the licensing issues that it brings to the table when you go through those posts.
-craig

"You can never have too many knives" -- Logan Nine Fingers
mk_ds09
Participant
Posts: 72
Joined: Sun Jan 25, 2009 4:50 pm
Location: Pune

Post by mk_ds09 »

You can use DSExecute function to execute the command.
You can excecute the unix script using above command.

In the unix script you can your insert statements.

Routine - > DSExecute - > Unix Script - > Database inserts..

This could be one of the way doing what you want to achieve...

---------------------------
Hope this helps

-------------------------

MK
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Actually, Windows has far fewer licensing issues when using BCI functions because you can make the calls via the free ODBC drivers one tends to get on/for Windows systems.
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