Search found 138 matches

by ssnegi
Sat Aug 30, 2014 4:02 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Decimal Data Changed to Zero
Replies: 7
Views: 4659

Use StringToDecimal function in the transformer. It could be the case that the substring is being treated as character.
StringToDecimal(Table_Read.Source_Col[21,25])
by ssnegi
Wed Aug 27, 2014 12:26 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: logic required
Replies: 6
Views: 4230

DSFIELD1 : YEAR(TO_DATE(AUC_SALE_DATE,'yyyy-mm-dd'))
DSFIELD2 : WEEK(TO_DATE(AUC_SALE_DATE,'yyyy-mm-dd'))

Transformer Stage :

Column Derivation
DSFIELD1 : '-' : Str('0',2-len(DSFIELD2)):DSFIELD2
by ssnegi
Thu Aug 07, 2014 3:49 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: output to seq file
Replies: 3
Views: 2672

Goto Format tab-->Field Defaults-->choose property "Delimiter String"
Here you can enter more than one delimiter.
by ssnegi
Wed Jul 23, 2014 1:32 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Scenario: Identify duplicated in a column
Replies: 6
Views: 4897

Read the input twice. Number the rows @INROWNUM.
Join COL1 to COL2 and COL2 to COL1 in lookup stage.
So there will be 4 cols col1,col2,col3,col4.
AUS,IND,IND,AUS,1,3
IND,AUS,AUS,IND,3,1
Then add Num1+Num2
AUS,IND,IND,AUS,4
IND,AUS,AUS,IND,4
Then do remove duplicate on Num.
by ssnegi
Tue Jul 22, 2014 11:26 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Column Value as constraint or filter in datastage
Replies: 2
Views: 3280

For each row join the Key and Name from the main data with the value in the reference table. So instead of maintaining Name = 'P' maintain
Key V_SQL
1 'P'
Then in the lookup use Drop condition to drop the the incoming record if a join is unsuccessful.
by ssnegi
Thu Jul 17, 2014 2:43 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: How to search for a pattern in a string?
Replies: 8
Views: 5077

read the sequential file with format :
Delimiter = comma
Quote = Double

This will separate the fields. Then the column with value "12,34" will contain 12,34. Then you can use Convert function to remove the ,
Convert(',','',DSLINK.COL)
This will yield 1234
by ssnegi
Wed Jul 16, 2014 10:23 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: How to search for a pattern in a string?
Replies: 8
Views: 5077

It replaces multiple occurances of a sub-string in a string.
by ssnegi
Thu Jul 10, 2014 10:07 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Vertical Pivot using Looping transformer.
Replies: 4
Views: 3604

First filter Extra from the data. Then in sequential transformer sort NTFCTN_ID ascending,SEQ_NUM ascending. Then use stage variables : svSeqNo initial value 0 : if input.svNTFCTN_ID = svNTFCTN_IDold then svSeqNo+1 else 1 svNTFCTN_IDold : input.svNTFCTN_ID svPivot : if mod(svSeqNo,2) = 0 then 1 else...
by ssnegi
Tue Jul 08, 2014 6:15 pm
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: Split the column into rows
Replies: 4
Views: 7065

pivot them into rows
by ssnegi
Tue Jul 08, 2014 4:11 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Modify Stage decimal_from_string
Replies: 7
Views: 6046

you could strip the delimited file in the before-job routine by invoking shell script.
sed "s/,//g" file.txt
by ssnegi
Wed Jul 02, 2014 1:43 am
Forum: General
Topic: Pass values from stage into a Parameter
Replies: 5
Views: 3370

Use a execute command stage in sequence job.
cat filename
Then use User Variables stage.
var : exec_command.output[1,len(exec_command.output) -1]
Pass this variable to your job as a parameter from Activity variables
user_variable.var
by ssnegi
Tue Jul 01, 2014 1:43 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Null value on the accessor interfacing to field
Replies: 7
Views: 7300

make the field with null value nullable Yes in the column metadata definition.
by ssnegi
Thu Jun 26, 2014 12:46 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Timestamp with microseconds
Replies: 10
Views: 8632

Read the timestamp field as varchar.
Then in transformer use conversion :
StringToTimestamp(COL,'%yyyy%mm%dd%hh%nn%ss.3')
This will convert the string to desired format of three decimal microseconds.