NLS Locale

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
datastagedummy
Participant
Posts: 56
Joined: Thu Feb 13, 2003 6:08 pm
Location: USA

NLS Locale

Post by datastagedummy »

How do I set the NLS Locale at runtime I am running DS6 on Sun system.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Assuming you have installed DataStage with NLS enabled (because you are asking this question):

You set project-wide defaults on the NLS button of the Administrator client, once you have selected the project.

You set job-wide defaults on the NLS tab of the Job Properties window. These override the project-wide defaults.

If necessary, you can have an active stage, such as a transformer stage, run in a separate locale from the remainder of the job. I do this sometimes when most of the job uses dates in DMY format, but one stream has dates in MDY format. Use the before-stage subroutine capability to execute the command to change locale, and the after-stage subroutine capability to reset to the previous locale. Invoke ExecTCL in each case. For example:

Before: SET.LOCALE TIME US-ENGLISH
After: RESTORE.LOCALE

(If you want to write your own before/after subroutines, you can employ the GETLOCALE() and SETLOCALE() functions and the LOCALEINFO statement.)

Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518
datastagedummy
Participant
Posts: 56
Joined: Thu Feb 13, 2003 6:08 pm
Location: USA

Post by datastagedummy »

Yes I do have NLS enabled and thats exactly what I want to do determine the Locale based on the Job Parameter value. I think I should be able to use your suggestion.

Thanks once again Ray.
Post Reply