Type Conversion Using Modify Stage

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

Post Reply
amit_dwh
Participant
Posts: 22
Joined: Tue Apr 11, 2006 6:04 am

Type Conversion Using Modify Stage

Post by amit_dwh »

Hi

I tried using Modify Stage for converting varchar to Date using below conversion specification :

new_date : date = StringToDate(old_date,"%yyyy-%mm-%dd")

But it gives error saying :

main_program: Error parsing modify adapter: Error in binding: Unknown conversion: StringToDate
Expected destination field selector, got: ")"; input:
new_date : date = StringToDate(old_date,"%yyyy-%mm-%dd")


But same function works when i use tht in Transformer Stage.

Why is it so.


Amit
richdhan
Premium Member
Premium Member
Posts: 364
Joined: Thu Feb 12, 2004 12:24 am

Post by richdhan »

Hi Amit,

Do a search on Modify stage. Modify stage uses direct orchestrate functions. Search the Orchestrate manuals and you will find the orchestrate functions to be used in Modify stage.

In this case it will Date_From_String

HTH
--Rich
amit_dwh
Participant
Posts: 22
Joined: Tue Apr 11, 2006 6:04 am

thanks

Post by amit_dwh »

richdhan wrote:Hi Amit,

Do a search on Modify stage. Modify stage uses direct orchestrate functions. Search the Orchestrate manuals and you will find the orchestrate functions to be used in Modify stage.

In this case it will Date_From_String

HTH
--Rich
Hi

Thanks for the help.It works.

Can you suggest me where to go for these kind of things.

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

Post by ray.wurlod »

The Orchestrate Operators manual. These can be had from IBM for the asking - ask your support provider to supply a set.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

There are quite a few errors in this Chapter.

For example it gives the Transformer stage function for null handling rather than the Modify stage function.

There are also errors of omission, such as the fix_zero option for decimal numbers.

Be very, very careful. Check anything you propose to do with the Orchestrate Operators manual and, perhaps, by searching on this forum.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply