date language

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
ivannavi
Premium Member
Premium Member
Posts: 120
Joined: Mon Mar 07, 2005 9:49 am
Location: Croatia

date language

Post by ivannavi »

I need to write a date to a sequential file with a three letter abbreviation for month. My locale is set to Croatian, but I still get the English abbreviation.

The help says:
The locales define the local formats for dates, times, sorting order, and so on that the project can use (for Parallel jobs, locale only specifies sorting order).
So I guess this is why. I have tried a server job, but in the server job there is no option for "format string" in the sequential file stage.

Is there any decent way to accomplish this?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Investigate lookup_string_from_int16() function in Modify stage to generate the month names in Croatian.

Or build a Lookup File Set that you can use with a Lookup stage to return the month name and/or abbreviation corresponding to each month number. Use Entire partitioning; it's easiest with only 12 rows.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ivannavi
Premium Member
Premium Member
Posts: 120
Joined: Mon Mar 07, 2005 9:49 am
Location: Croatia

Post by ivannavi »

Thanks Ray,

It took me some time to get this "lookup_string_from_int16()" working. Never used it before (neither this, nor the Modify stage).

This solution actually requires me to extract the information about the month from date and then perform a replacement of the month (using the lookup_string_from_int16) with the abbreviation string, and then assemble all those pieces together to form the desired string.

I will call that a workaround. Resolved it will be in some future version of DataStage, I hope. Maybe version 8 already has this working out of the box...
Post Reply