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

studyguy2001
Participant
Posts: 19
Joined: Tue Feb 01, 2005 11:46 pm

date conversion

Post by studyguy2001 »

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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Did you search the forum? What did you turn up? This post for example may prove informative.
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 mark,
As ray indicated, if u make a search in this forum, you can get at most all of your basic doubts cleared.
you can acheive your requirement by many ways,
one way can be as follows

Code: Select all

Oconv(Iconv("data value","D2-YMD[422]),"D2-DMY[224])
And regarding your flag setting, is that u want to set a column as YES and NO based on any other column or a value, is this case u can very well use

Code: Select all

If <condition1> Then "YES" Else "NO"
-kumar
elavenil
Premium Member
Premium Member
Posts: 467
Joined: Thu Jan 31, 2002 10:20 pm
Location: Singapore

Post by elavenil »

This OConv/IConv functions available when you use Basic transformer not for Parallel transformer. Pls keep in mind that when you use transformer to achieve this.

Regards
Saravanan
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

elavenil wrote:This OConv/IConv functions available when you use Basic transformer not for Parallel transformer. Pls keep in mind that when you use transformer to achieve this.
Saravanan, i never knew this.
do mean to say that the transformer in parellel extender is quite different from the server edition transformer stage. :roll:
elavenil
Premium Member
Premium Member
Posts: 467
Joined: Thu Jan 31, 2002 10:20 pm
Location: Singapore

Post by elavenil »

Yes. It is.

If you are using Parallel transformer, most of the functions cannot be used. In order to call those functions, the BASIC transformer is to be used.

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

Post by ray.wurlod »

It is VERY different. For a start it generates C++ rather than BASIC. Try it; you will see different operands in the expression editor. And you will see "data type" as an extra grid in stage variable declaration (one of the more common traps for those converting from server jobs).
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 »

can we use Basic transformer(I assume basic transformer is just transformer in the server edition) in parellel extender(DSEE)

regards
kumar
elavenil
Premium Member
Premium Member
Posts: 467
Joined: Thu Jan 31, 2002 10:20 pm
Location: Singapore

Post by elavenil »

Basic transformer can be used DS EE.

Regards
Saravanan
bchau
Charter Member
Charter Member
Posts: 46
Joined: Tue Jan 18, 2005 7:39 am
Location: Japan
Contact:

Post by bchau »

yes it can, but I dont think your job will run in parallel in a basic transformer. It does become a bottleneck of a parallel job from what i hear.
narayana_382
Premium Member
Premium Member
Posts: 37
Joined: Wed Mar 23, 2005 5:20 am

clarification..

Post by narayana_382 »

hi saravan,

kindly tell me what does D2-YMD[422]),"D2-DMY[224] this part of the IConv function exactly... does??

naraine.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Re: clarification..

Post by kumar_s »

narayana_382 wrote:hi saravan,

kindly tell me what does D2-YMD[422]),"D2-DMY[224] this part of the IConv function exactly... does??

naraine.
hi naraine,

it i simply converting

Code: Select all

YYYY-MM-DD formate to DD-MM-YYY
in D@-YMD[4,2,2] Y is for year which has 4 digit, likewise month and day.

Do a search in this forum or go thorugh the document for more clear information.

regards
kumar
bchau
Charter Member
Charter Member
Posts: 46
Joined: Tue Jan 18, 2005 7:39 am
Location: Japan
Contact:

Re: clarification..

Post by bchau »

narayana_382 wrote:hi saravan,

kindly tell me what does D2-YMD[422]),"D2-DMY[224] this part of the IConv function exactly... does??

naraine.
YMD corresponds to year/month/day....the [422] indicates a format like YYYY-MM-DD

DMY[224] ---> DD-MM-YYYY
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Open Designer Help. Find OCONV. Find the hyperlink to D. Read on...
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

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.
Post Reply