reg. trim function in modify and type 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

Post Reply
panchusrao2656
Charter Member
Charter Member
Posts: 64
Joined: Sat Sep 17, 2005 10:42 am

reg. trim function in modify and type conversion

Post by panchusrao2656 »

can i use trim function in modify stage?

1.I need to trim a string(Varchar) of length 50 to string(Varchar) of ength 12. i am using modify stage for other conversions. So I cannot use another stage for that.Is there any way i can trim it and escape from the warnings.

And the other one is:

2.I am getting an int64 from Oracle and i am mapping it to integer(dataset),its giving an error message saying that i am mapping int64 to int32 and the job is executing properly(when i execute it individually).
But when i use the same job in a sequencer with a trigger condition OK, my sequencer is getting terminated after that perticular job with the status OK.Its not throwing any fatal warnings. The process is getting terminated without moving to the next Job.

But in the Log it is showing that the sequencer finished with the status OK.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

There is no Trim() function in a Modify stage, but there is substring. However your assertion that you can not use any other stage type is simply incorrect - you could follow your Modify stage with any other stage type, such as a Transformer stage, and effect the Trim() function there. However, Trim() alone will not not suppress the warnings.

In the second question, the job finishes with warnings. An OK trigger prevents further execution. You will need either the change the trigger to a custom trigger (OK or Warning) or to create two triggers (one OK, the other Warning) through an Any sequencer and then along to the next job. Better yet would be to handle the int64 to int32 conversion yourself so that no warnings are generated, perhaps using int32_from_decimal in a Modify stage.
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