Search found 78 matches

by bhasds
Fri Oct 26, 2012 1:09 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: stuck with some Business scenario
Replies: 5
Views: 2515

Hi Devesh, Even you may try this also with a single transformer- 1.Sort the records in the descending order based on the in transformer. 2. In stage variable- If Cust_Id <> SV2 Then Cust_Id :" ": Policy:" ": System:" ": Role Else SV1 :" ": Role SV1 Cust_Id SV2...
by bhasds
Fri Oct 26, 2012 9:51 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: stuck with some Business scenario
Replies: 5
Views: 2515

Hi devesh, You may try the below steps- 1.With the help of filter stage split the records into two stream. a) Having Role as 20 and 30. b) Having Role as 10 and 230. 2.Map both the link to a funnel stage . Sort the link carrying Role as 10 and 230 in decending order taking Cust_Id Policy System as k...
by bhasds
Thu Oct 25, 2012 1:36 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: concatenate row values into one column based on keys
Replies: 3
Views: 1983

Hi New_ds_man, It is a vetical pivot- 1 If col1 <> SV2 Then col3 Else SV1 :",": col3 SV1 2. col1 SV2(initialize with "") 3. In derivation of col3 take the output of SV1. 4.Use a remove duplicate stage after transformer to retain the last duplicate record in the group.
by bhasds
Wed Oct 24, 2012 10:46 am
Forum: General
Topic: Help Regarding Loop Variables inside a Sequence Job
Replies: 5
Views: 1993

Hi Arun, If you are getting the values of a single parameter from a file then using list loop can help you. 1. Cat the file with execute command|xargs|tr -d '\n' Eg- Output will be file1.sql abc.sql xyz.sql 2.Pass the command output to the loop using list loop. 3.Get the execute command output in a ...
by bhasds
Tue Oct 23, 2012 7:33 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Replacing a string with another string
Replies: 13
Views: 19333

Hi aravindunni31, The below logic may be help full- If Index(InputCol,"Kolkata",1) =0 Then InputCol Else InputCol [1,Index(InputCol,"Kolkata",1)-1] :"Calcutta":InputCol [Index(InputCol,"Kolkata",1) +7, Index(InputCol, Right(InputCol,1),1)] Please correct me if...
by bhasds
Fri Oct 19, 2012 5:06 am
Forum: General
Topic: Passing Parameter from Job A To job B
Replies: 6
Views: 2151

So what problem you are facing now to implement the logic? put this 3 jobs in job sequence.

JobA
|
|
ExecuteCommandAcitivity
|
|
JobB
|
|
JobC

And implement what I have already told in the previous post.
by bhasds
Fri Oct 19, 2012 4:10 am
Forum: General
Topic: Passing Parameter from Job A To job B
Replies: 6
Views: 2151

You can call the parameters in the output derivation of transformer or in job properties genearl tab, go to after job subroutine, choose ExecSh and echo "#param1# #param2# #param3# etc" > pathname/paramfile
by bhasds
Fri Oct 19, 2012 3:24 am
Forum: General
Topic: Passing Parameter from Job A To job B
Replies: 6
Views: 2151

Hi daniele, This may be possible through job sequence- 1. In after job subroutine of JobA, echo #param1# #param2# #param3# etc > paramfile. 2.In Job sequence after JobA take an execute command and cat the paramfile. 3.In JobB activity read each parameter from execute command output through field fun...
by bhasds
Thu Oct 18, 2012 6:41 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: convert column data in to rows
Replies: 4
Views: 2775

Hi Cherry, This may be possible through loop variable in transformer stage. 1.In stage variable- Name SV1 2. In loop variable- Loop condition- @iteration<=DCount(SV1,";") Field(SV1,";",@iteration) LV1 3.In derivation map the ID directly from input and the take the output of LV1 f...
by bhasds
Wed Oct 17, 2012 1:46 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: To get data before commas and pipe
Replies: 5
Views: 3174

Hi Cherukuri,

If you have the pattern no2,2012 is common for each delimited substring then you can use-

Code: Select all

Convert("no2,2012","",IPfield )
by bhasds
Sun Oct 07, 2012 9:32 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Vertical Pivot without any grouping column
Replies: 3
Views: 3812

Hi Abhik05, You may try this through transformer- step 1- take 2 stage variable- If DSLink105.col1 <> SV1 Then SV1:" ": DSLink105.col1 Else @FALSE SV1 @PARTITIONNUM + (@NUMPARTITIONS * (@INROWNUM - 1)) + 1 SV2 step2- In derivation constraint- Mod(SV2,3) ="0" step3- deriavtion Fie...
by bhasds
Sat Oct 06, 2012 11:52 am
Forum: General
Topic: Send mail using DSExecute
Replies: 2
Views: 1349

The below command can be called in execute command activity in Job Sequence

Code: Select all

mailx -s "SUBJECT" -r "senders Email ID" "recepient Email IDs"
by bhasds
Wed Oct 03, 2012 10:11 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Remove prefix and leading zeros
Replies: 12
Views: 7535

Hi times29,

Can you please try the below -

Code: Select all

If col1 [1,3]="KS1" OR col1 [1,2]="OR" Then Trim(col1 [Index(col1,"0","1"),Len(col1)-Index(col1,"0","1")],"0","L") Else col1
I got the desired output with this.
by bhasds
Wed Oct 03, 2012 12:40 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Remove prefix and leading zeros
Replies: 12
Views: 7535

Hi times29,

You can try this-

Code: Select all

Trim(Field("colname"[1,3] :" " :"colname" [4, Len("colname")-3 ]," ",2),"0","L")
by bhasds
Mon Oct 01, 2012 3:43 pm
Forum: General
Topic: sending mail from a param file in datastage
Replies: 4
Views: 5356

Hi Pragb, To get rid of this problem you can use the tr -d '\n' command in execute command activity. For example, if you are using the command cat filename in execute command then it should be- cat filename | tr -d '\n' Now the output from the execute command should wok fine for the notification act...