Search found 221 matches

by cosec
Thu Aug 30, 2007 2:20 am
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: problem with deleting records in the table before inserting
Replies: 15
Views: 13954

Yes I do have two separate output links goint to two separate Target Db2 Stages and yet I have the problem.....can you suggest an alternative ?

ArndW wrote:Link 1 has your before-sql "delete" in the DB2 stage, Link 2 doesn't. That is why you need to separate your stages as well. ...
by cosec
Thu Aug 30, 2007 12:47 am
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: Stored Procedure
Replies: 14
Views: 5118

Yes that's possible...but I would like to do it in the same job...

ray.wurlod wrote:Why not just create a job to delete the rows? Use user-defined SQL, supply the date (as a job parameter) and refer to this in the WHERE clause of your DELETE statement. ...
by cosec
Thu Aug 30, 2007 12:44 am
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: problem with deleting records in the table before inserting
Replies: 15
Views: 13954

Hi Ray,

No ray can't do that as the Primary Key is generated for every new row.


ray.wurlod wrote:Can't you just change your rule to "Replace existing rows"? ...
by cosec
Wed Aug 29, 2007 11:34 pm
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: Stored Procedure
Replies: 14
Views: 5118

Re: Stored Procedure

Ok thanks ...but can I also use this SQL statement in a routine ?
JoshGeorge wrote:The ODBC stage has stored procedure as one of its options in server edition.
cosec wrote:
Thanks but I am using the server edition and I believe the stored_proc is not available....
by cosec
Wed Aug 29, 2007 11:32 pm
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: problem with deleting records in the table before inserting
Replies: 15
Views: 13954

You mean I will have three output links then ?

and the order of execution will be
link 1) Constraint = Y Delete
link 2) Constraint = Y INSERT
link 3) Constraint = N INSERT

ArndW wrote:I suggest using 2 links and 2 distinct stages for exactly that reason. ...
by cosec
Wed Aug 29, 2007 10:49 pm
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: Stored Procedure
Replies: 14
Views: 5118

Re: Stored Procedure

Hello sachin, Thanks but I am using the server edition and I believe the stored_proc is not available.... so can I use the statement I mentioned earlier in a routine ? is the sysntax correct ? hello, you have to create a procedure in database having input parameters that you require for your process...
by cosec
Wed Aug 29, 2007 10:47 pm
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: problem with deleting records in the table before inserting
Replies: 15
Views: 13954

Ok sorry if I had confused you..... My job has two separate output links from the transformer to the table as you suggested. If Constraint = Y then the Link 1 is supposed to delete existing data and then insert. The Delete Statement is in SQL "Before" And insert is in "User Defined&qu...
by cosec
Wed Aug 29, 2007 10:09 pm
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: problem with deleting records in the table before inserting
Replies: 15
Views: 13954

Arndw>> My Problem is I want to delete only if it is successful in the first link but otherwise I want it to be inserted. As of now whether it's link 1 or link 2 it's deleting the data. Make two separate links go to two DB2 stages. Make the DELETE command commit immediately and order it so it execut...
by cosec
Wed Aug 29, 2007 10:05 pm
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: problem with deleting records in the table before inserting
Replies: 15
Views: 13954

Make two separate links go to two DB2 stages. Make the DELETE command commit immediately and order it so it executes before the normal insert link. ... Hi Arndw I have two Separate Links already..(1) Delete (Before), Insert(After) (2) Insert Should I split the (1) to a further ? How do I do the ord...
by cosec
Wed Aug 29, 2007 9:59 pm
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: Stored Procedure
Replies: 14
Views: 5118

Stored Procedure

How do I do a stored procedure to do the following

IF #RERUN_IND#='Y' THEN

DELETE FROM TBL_A WHERE TBL_A.MONTH=#MONTH_IND#;

ELSE 0


Pls Advice

Thanks
by cosec
Wed Aug 29, 2007 9:36 pm
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: problem with deleting records in the table before inserting
Replies: 15
Views: 13954

problem with deleting records in the table before inserting

I have two Outputs from a tranformer going in to the SAME table. Output1 If the Constraint for the first output is satisfied then I need to delete some records from that table and then insert another set of records. I have placed the DELETE in the BEFORE PORTION OF THE SQL in the Target Db2 stage. O...
by cosec
Wed Aug 29, 2007 9:11 am
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: passing parameters
Replies: 2
Views: 1020

passing parameters

Hi,
I am passing two parameters from a unix shell script to a Datastage Job.
Is it possible to use these two parameters in the SQL Script of the DB2 Stage?
Thanks
Hazmar
by cosec
Thu Aug 16, 2007 1:59 am
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: Need to add more details in job log
Replies: 6
Views: 2290

I already have a shell script to give me the jobs status but I am trying to add the number of records extracted and written.....I am not sure which variable/parameter to use. How do I find that out ?

I was able to get what I needed using Kim's Doc but I also want to try the above. Thanks
by cosec
Wed Aug 15, 2007 8:19 pm
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: Need to add more details in job log
Replies: 6
Views: 2290

Thanks but how do I accomplish the above using a shell script....
it seems that is much simpler....


chulett wrote:A) ETLStats. Say 'Thank you Mr Kim.'

B) See A.
by cosec
Wed Aug 15, 2007 8:05 pm
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: How to get an Alert Message when a File is being Written
Replies: 4
Views: 1619

Thanks for the Input...I would like the alert to be written to a Log File. For eg whenever there are rejected records I would like it to indicate that on the log...(I am assuming I will have to do some scripting in order to display that in the batch log)