Page 1 of 1

Hash File Date Format

Posted: Wed May 10, 2006 11:50 am
by kwwilliams
I am using a server job to create a hash file used as a lookup in many other server jobs. One of the lookup fields is date which has to be in the format DD-MON-YYYY. The problem is that after I write the data in that format the hash file changes the format to DD-MON-YY.

I have turned off all NLS settings in the job.

I have written the same data to a sequential file, and have no issues with the format there, this is the most confusing part. If I write to a hsh file and sequential file at the same time the sequential file is in the YYYY format and the hash file is in the YY format.

I have changed the data type to VARCHAR and it is still changing the format.

Thanks for any information that you can provide,

Posted: Wed May 10, 2006 12:10 pm
by satish_valavala
Hi Williams,
The incoming date is in Julian format and length is 11.
Is the data type and length is same in both the Input/output tabs of Hashed file?

VS

Posted: Wed May 10, 2006 12:27 pm
by kwwilliams
It is.

Posted: Wed May 10, 2006 3:05 pm
by ray.wurlod
When the hashed file was created for whatever reason the default date format was set to a two-digit year. You can either re-create the hashed file or adapt its file dictionary. Change the conversion field from D2... to D4... for example.