date conversion

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

There's an even simpler explanation here
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Thanx ray/Arnd,
Those are really a valid and presice input relevent to this discussion.

i dont have "Basic Transformer" in my pallet. so can i understand that, i have not installed the server edition or some other library not been included for this.
After installation of Px in server, can I install server editon on the same installaion
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

ArndW wrote:Kumar,

go to the on-line PDF manuals and open up Ascential DataStage Basic Guide to page 804; it will explain the date conversion codes.
Arnd this is for Basic (server) codes right. the same way do we have it for parallel :?:

regards
kumar
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You DO have BASIC Transformer. At worst, find it under Stage Types in Repository (Stage Types > All > Processing). You can customise your Palette (right mouse click in background area of Palette), choose Custom > Customize.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

ray.wurlod wrote:You DO have BASIC Transformer. At worst, find it under Stage Types in Repository (Stage Types > All > Processing). You can customise your Palette (right mouse click in background area of Palette), choose Custom > Customize.
Thanx ray,
i got it, but i got it under Stage Types > Parallel > Processing.
i wondered how the Basic Transformer was under Parellel processing.
so can i assume that this Basic transformer can be used only at very initial stages, inorder to avoid bottel necks.

regards
kumar
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

As I said, you can customize your Palette and have it wherever you want it.

It's up to you what effect the stage will have. For example, if you're reading from a delimited text file (an operation that is necessarily sequential), then running that result into a BASIC Transformer stage does not contribute much more the the bottleneck that's already there.

I think this is what you were getting at.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Hi,
I found the link associated with BASIC transfromer maintains Prallelism. I just inclued two prallel transformer on both side of this Basic transformer and found the link with the parition. And more over the follwoing were the only information i found related to the usage restriction for Basic transformer.
You can only use BASIC transformer stages on SMP systems (not on
MPP or cluster systems)
so shall i come to the conclusion that this does not going to affect much of the performace if Basic transformer replaced with conventional transformer.

regards
kumar
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

On the link between the Transformer stage and the BASIC Transformer stage is there a "collection" (fan in) icon? Or is there a "preserve partitioning" icon? This will tell you whether the BASIC Transformer stage runs in parallel or sequentially.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

ray.wurlod wrote:On the link between the Transformer stage and the BASIC Transformer stage is there a "collection" (fan in) icon? Or is there a "preserve partitioning" icon? This will tell you whether the BASIC Transformer stage runs in parallel or sequentially.
Hi ray,
Even i was expecting fan in icon, but fortunately it is not.
Basic Transformer it self has the option of Advance tab which has Excecution mode in parallel.
And Partition tab to define the partiton. :shock: :!:

regards
kumar
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

That explains the restriction to SMP. The DataStage Engine run machine (which runs BASIC things) exists on that machine, and is globally accessible by any process on that machine. In a cluster you would have to have the DataStage Engine installed on every machine, which could not be guaranteed.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
tusharzade
Participant
Posts: 13
Joined: Wed Dec 15, 2004 2:19 am

Re: date conversion

Post by tusharzade »

What is your output stage?

If it is a sequential file then while writing in the file you can specify the format as "DD-MM-YYYY". But as far as datastage is concern it will always read the date in "YYYY-MM-DD" format.

studyguy2001 wrote:hello.,

i am new to datastage.

my inut date format is : YYYY-MM-DD
THE Output date format has to be : DD-MM-YYYY

can anyone please tell me how do i do it in transformer.

also can anyone please tell me how do i set flag status to either YES or NO in a transformer.


thanks
mark
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

May i know what is the best way to convert decimal value to date without using Basic Transformer Oconv /Iconv.(Even using oconv /Iconv i am getting follwoing error sparingly)
Input : CYYMMDD (Decimal)
as u know where C is century i.e if C = 0 its 1900, it it is 1 then 2000
so if it is 1050505 it is 2005-05-05
so i tried with

Code: Select all

StringToDate(abs(19000000+inputdate),"%yyyy%mm%dd)
since 1900000 will give the century conversion and after the abs() function it is converted to integer.
and integer is implicitly converted to string. and the function StringToDate takes care fo the conversion of the date.
I gave this experession in the transformer, and assigned the output column as date. and length as 8.
But while compilation i am getting error as

Code: Select all

In field "X50605_TXN_ACT_EFF_DATE": The schema type "date" does not take parameters "8,0"
if i dont give any length i gives me

Code: Select all

In field "X50605_TXN_ACT_EFF_DATE": The schema type "date" does not take parameters "0,0"
its looks like it interpert as decimal.
i also unchecked Runtime colomn propagation.
Any symptom of reason for error.

regards
kumar
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Just on the intention of geting rid of this problem,
we found a nasty workaround.
we exported the job and opened in an editor, then we found that native type of those date field which got to be conveted has the native type as decimal[n,n].
so we deleted that. Also found that date with the data type of

Code: Select all

date[n,0]
. So that was also changed to "date".
Reimported to a different job, it works.

We dont feel it stable way, need to find some smart method...........

regards
kumar
Post Reply