Page 1 of 1

NLS Locale

Posted: Mon Sep 08, 2003 12:42 pm
by datastagedummy
How do I set the NLS Locale at runtime I am running DS6 on Sun system.

Posted: Mon Sep 08, 2003 5:04 pm
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

Posted: Tue Sep 09, 2003 12:14 pm
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.