Search found 78 matches

by bhasds
Wed May 20, 2015 3:58 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Dataset and Configuration File
Replies: 1
Views: 1624

Re: Dataset and Configuration File

Hi Atul, The second job will be able to read the dataset created by the first job as the reading of dataset is not dependent on the configuration file of the current job but the copy of the configuration file exist in the control file or the descriptor file of the dataset you are trying to read. Bha...
by bhasds
Wed Apr 09, 2014 8:25 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: horizontal pivoting using transformer
Replies: 14
Views: 13040

Hi HemaV, The scenario can be solved by using loop variable. In iteration- @ITERATION <= Len(Reference.col2) /2 Take 2 loop variables- Derivation LoopVariable If @ITERATION <=1 Then LV1 Else LV1 +2 LV1(initialize with 2) If @ITERATION <=1 Then LV2 Else LV2 +3 LV2(initialize with 3) Output Derivation...
by bhasds
Fri Aug 02, 2013 6:52 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: how to pass dataset value as a parameter to next job
Replies: 2
Views: 2460

how to pass dataset value as a parameter to next job

I think you can use orchadmin command in after job subroutine to get the value in ascii format in a file.
And then use that value as parameter in the required job.

Please let me know if it works.
by bhasds
Thu Jun 20, 2013 1:09 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Get the first and last day of previous month
Replies: 11
Views: 9849

Hi Raji33,

You may try the below to get the first day of last month-

Code: Select all

CurrentDate()[1,4]:"-"If  CurrentDate()[6,2]-1 < 10 Then 0: CurrentDate()[6,2]-1 Else  CurrentDate()[6,2]-1):"-":"01
by bhasds
Wed Jun 19, 2013 12:14 am
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: getting data for the last three months
Replies: 13
Views: 10739

getting data for the last three months

Hi uzl,

You may use the following to get the 3 month back date-

Code: Select all

'01':"-":(if  DSJobStartTimestamp[6,2] - 3 <10 Then 0:DSJobStartTimestamp[6,2] - 3 Else DSJobStartTimestamp[6,2] - 3):"-":DSJobStartTimestamp[1,4]:'00:00:00'
by bhasds
Wed Dec 05, 2012 1:56 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: PIVOT STAGE
Replies: 9
Views: 5655

I am not sure why you are getting the error giving error .../bin/echo: write error: Broken pipe If this key column NAME1 NAME 2 LAST NAME NAME_TYPE 123 ABC DEF GHI P XYS XXX YYY A WWW BBB AA A is your desired output- Then the posted code will give you the output which can be read in separate columns...
by bhasds
Wed Dec 05, 2012 11:23 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: PIVOT STAGE
Replies: 9
Views: 5655

Please find the corrected code as below- In stage variable in transformer- If key column <> SV2 Then NAME1 :" ": NAME2 :" ": LAST NAME:" ":Left(NAME_TYPE,1) Else If Index(NAME_TYPE,"ALIAS",1)>0 Then SV1 :" ":NAME1 :" ":NAME2:" ":L...
by bhasds
Wed Dec 05, 2012 6:32 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Looping in Transformer stage
Replies: 2
Views: 2875

Hi pillip,

Could you please post some sample input records and the desired output.
by bhasds
Wed Dec 05, 2012 2:21 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: PIVOT STAGE
Replies: 9
Views: 5655

Hi ghutchin, You may try this in stage variable- If ME1 <> SV2 Then NAME1 :" ": NAME2 :" ": LAST Else If Index(NAME_TYPE,"ALIAS",1)>0 Then SV1 :" ":NAME1 :" ":NAME2:" ":LAST:" ": Left(NAME_TYPE,1) Else @FALSE---->SV1 ME1--->SV2
by bhasds
Wed Dec 05, 2012 1:05 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Multiple rows to single row
Replies: 9
Views: 5914

@Ray- Could you please suggest how to generate this part ijkl(PDPI); in pivot enterprise stage. @bond88- You may try the below in transformer to get the desired output. 1.In stage variable- If ToT.Role <> SV3 Then "[":ID:"]" Else SV1:",": "[":ID:"]" ...
by bhasds
Sat Dec 01, 2012 10:59 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: how to get the result in Transformer
Replies: 11
Views: 5433

Hi Craig,

I will try not to think field() function in every post and reading the records as single string. :(
by bhasds
Sat Dec 01, 2012 1:02 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: how to get the result in Transformer
Replies: 11
Views: 5433

Hi prasson_ibm, I think the: field(in.col,",",1) in transformer output link should be- in.col[1,4]:",":field(in.col,",",5) link1 in.col[1,4]:",":field(in.col,",",6) link2 in.col[1,4]:",":field(in.col,",",7) link3 in.col[1,4]:"...
by bhasds
Sat Dec 01, 2012 10:53 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: how to get the result in Transformer
Replies: 11
Views: 5433

Hi Deesh, You may try with a transformer and a pivot stage. 1.In transformer output derivation, 1,2,3,4 into a column and A,B,C,D in four different columns. 2. In pivot stage you can take the first column as key column(1,2,3,4) and pivot the 4 columns into a single column. Note- The above is possibl...
by bhasds
Sat Dec 01, 2012 4:26 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: how to get the result in Transformer
Replies: 11
Views: 5433

If you are trying with loop you may try the below-

1.In stage variable-

Code: Select all

col1    SV1
2.Loop While -

Code: Select all

@iteration<=Dcount(SV1,",")-4
3.In loop variable derivation-

Code: Select all

Field(SV1,",",4+@iteration)  LV1
4.OUtput col deriavtion-

Code: Select all

Col1:",":LV1   Col1
by bhasds
Tue Nov 20, 2012 11:49 pm
Forum: General
Topic: how to rename files after datastage job completed?
Replies: 10
Views: 9927

Hi qutesanju, For this in individual job? As Ray has posted ExecSh option is avalable in the afterjob subroutine of a individual datastage job. Choose ExecSh option and in input value- mv generatedfile generatedfile_`date +%Y%m%d%H%M%S` And Check the option- Only Run after-job subroutine on successf...