Search found 45 matches

by kbsuryadev
Tue Sep 20, 2011 10:47 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: LAST DAY of The Month given YEAR and MONTH
Replies: 1
Views: 1804

LAST DAY of The Month given YEAR and MONTH

Just wanted to share a solution. Input: YEAR=2011 (YYYY) MONTH=2/02 (M/MM) Output: Date 2011-02-28 Code: StgMonth If MONTH EQ 12 Then StringToDate(YEAR+1: "-" :"01": "-" :"01","%yyyy-%mm-%dd") ELSE StringToDate(YEAR: "-" :Right('00': ( MONT...
by kbsuryadev
Tue Feb 08, 2011 8:08 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: StringToDate conversion problem
Replies: 11
Views: 9121

Try this.

StringToDate(Col,"%yyyy%mm%dd").Remove (-) inside the function.

By the way what is your target. Database or File.?
by kbsuryadev
Mon Feb 07, 2011 7:46 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: StringToDate conversion problem
Replies: 11
Views: 9121

StringToDate(Column,"%yyyy-%mm-%dd")
by kbsuryadev
Wed Feb 02, 2011 4:35 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Datatype issue:
Replies: 7
Views: 3344

try using bigint
by kbsuryadev
Wed Feb 02, 2011 3:02 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Datatype issue:
Replies: 7
Views: 3344

What is your input data type
by kbsuryadev
Tue Sep 14, 2010 3:15 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Converting string to date!!
Replies: 23
Views: 11576

I just did a test it works fine i used this data input- 03/13/2010 .. output comes as 2010/03/13 use input datatype as (varchar) -10 in the transformer use this code StringToDate(DSLink3.DATE,"%mm/%dd/%yyyy") Output datatype ( DATE) go to columns tab (output stage) and edit column meta dat...
by kbsuryadev
Tue Sep 14, 2010 3:06 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Converting string to date!!
Replies: 23
Views: 11576

what is your input ? database/file

what is the datatype.?

i just tested a job it works fine
by kbsuryadev
Tue Sep 14, 2010 2:44 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Converting string to date!!
Replies: 23
Views: 11576

sorry i forgot these % in the code

try this in the derivation

StringToDate(input,"%mm/%dd/%yyyy")

and do the same in the output as i mentioned in the other reply
by kbsuryadev
Tue Sep 14, 2010 2:41 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Converting string to date!!
Replies: 23
Views: 11576

please post the error.
by kbsuryadev
Tue Sep 14, 2010 1:58 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Converting string to date!!
Replies: 23
Views: 11576

try input using varchar(10) and output as date derivation : StringToDate(input,"%mm/dd/yyyy%") If you have nulls coming from source then handle it Go to output file under columns double click on the left of the output column which will open the edit column meta data window where you can sp...
by kbsuryadev
Tue Sep 14, 2010 1:46 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Converting string to date!!
Replies: 23
Views: 11576

what is your output(database/file)
by kbsuryadev
Tue Sep 14, 2010 1:07 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Converting string to date!!
Replies: 23
Views: 11576

What is the input data type/length and is the output data type (DATE) ?
by kbsuryadev
Mon Sep 13, 2010 12:59 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Trim Issues while sending Data to Fixed length File
Replies: 4
Views: 2838

I used EDIT METADATA PROPERTIES

%05d (float type) and field width =5 (float type)
column metadata properties.

Output SQL type is smallint
by kbsuryadev
Sat Aug 07, 2010 12:19 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Trim Issues while sending Data to Fixed length File
Replies: 4
Views: 2838

Trim Issues while sending Data to Fixed length File

The input Data comes as varchar(10) - TERADATA (SOURCE) col 0000 0009508 03669 08018 08065 0003065 09620 desired output ( i used char(5)) FIXED LENGTH FILE(TARGET) 00000 09508 03669 08018 08065 03065 09620 I have tried this code if (DSLink3.col) ='0000' Then '00000' else DSLink3.col[3,7] When the jo...
by kbsuryadev
Fri Mar 05, 2010 10:57 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: SetNull() function - triggering ORCHESTRATE error
Replies: 6
Views: 12857

are you using the derivation like this :

if IsNull(inputcol) Then setNull() else inputcolumn .?