Page 1 of 1

Date Conversion in MVS

Posted: Fri Jul 21, 2006 8:15 am
by ashwin141
Hi

Can somebody please guide me that what will be the simplest way of converting a Date from ccyy-mm-dd format to dd-mon-yy format.
For example

2006-02-12 as 12-feb-06.
It can be done in transformer, using some stage variables and if-else loop, I wish to know if there is any function or combination of functions which can make this task simple.

Thanks a lot

Regards
Ashwin

Posted: Fri Jul 21, 2006 9:34 am
by Mike
The easiest way is to let DataStage do it for you:

1) Define your input column as Character 10. Choose a date format of CCYY-MM-DD.
2) Define your output column as Character 9. Choose a date format of DD-MON-YY.
3) Move input column to output column. DataStage will do the conversion for you.

Mike

Posted: Fri Jul 21, 2006 10:20 am
by kris007
Thanks Mike, I dint know that I was gonna say no other way other than substring and if then else.
Will this solution work in other jobs like server/parallel also?

Posted: Fri Jul 21, 2006 11:07 am
by Mike
It's a mainframe job feature. Server/parallel jobs provide a much richer set of transform functionality.

Mike

Date conversion MVS

Posted: Tue Jul 25, 2006 4:16 am
by ashwin141
Mike wrote:The easiest way is to let DataStage do it for you:

1) Define your input column as Character 10. Choose a date format of CCYY-MM-DD.
2) Define your output column as Character 9. Choose a date format of DD-MON-YY.
3) Move input column to output column. DataStage will do the conversion for you.

Mike
Hi Mike

Thanks a lot for the reply, even I thought about using this approach.
But I guess we don't have DD-MON-YY format in MVS, or is it there?

Please let me know.

Regards
Ashwin

Date Conversion in MVS

Posted: Tue Jul 25, 2006 4:20 am
by ashwin141
Thanks

I got it. I hadn't changed the datatype to Character :oops:

Regards
Ashwin