Insert the records in to the tables thruogh Routines?

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
shivakumar
Participant
Posts: 31
Joined: Wed Mar 17, 2004 3:33 am

Insert the records in to the tables thruogh Routines?

Post by shivakumar »

Hi,

We are using the Server Routines in the Parallel Jobs. As per our requirements we have to Load the Job Statistics in to the Database Tables.

Is it possible to Insert the records in to the Tables From the Routines.

If So then please help me regarding this.

Thanks and Regards
Siva
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

It is possible to do this, although it is seldom a good idea to circumvent the fast and efficient loading methods in DS.

Usually the easiest method is to use your databases' command line calls for inserts and updates. The actual commands you use depend upon your OS, DataBase system and DB version. This will work for a couple of I/Os, but if you have many it is much more efficient to use the DataStage stages.
shivakumar
Participant
Posts: 31
Joined: Wed Mar 17, 2004 3:33 am

Re: Insert the records in to the tables thruogh Routines?

Post by shivakumar »

[quote="shivakumar"]Hi,

We are using the Server Routines in the Parallel Jobs. As per our requirements we have to Load the Job Statistics in to the Database Tables.

Is it possible to Insert the records in to the Tables From the Routines.

If So then please help me regarding this.

Thanks and Regards
Siva[/quote]

Can you please send me the code ie how to Insert the Records from Routien then it should be greatfull.

Thanks and Regards
Siva
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Siva,

I have already stated that "yes, it is possible". Since you still haven't answered the question as to what database you are using nobody can help you much further. The DS/BASIC routine will contain calls to DSExecute() that will do the actual SQL setup and insert to the database.
shivakumar
Participant
Posts: 31
Joined: Wed Mar 17, 2004 3:33 am

Post by shivakumar »

[quote="ArndW"]Siva,

I have already stated that "yes, it is possible". Since you still haven't answered the question as to what database you are using nobody can help you much further. The DS/BASIC routine will c ...[/quote]

Hi,


In Our Project we are Using the Oracle Database and the Operating System is Wndows.I have to load the Job Statistics in to 2 tables.Ie DSJosStartTime,DSJobEndTime etc.,

Can you please help me out.

Thanks and Regards
Siva
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I still think it is a bad idea to do it the way you intend. How about doing it a bit differently - in your BASIC routines you write the logging information to a text file. Then, either as an after-job or other call you will start a simple DataStage job that will read this text file and then load it into your Oracle database using the normal job stages?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Otherwise search the forum for BCI which is a BASIC-callable library of functions that mimic the ODBC API.
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