MLOAD

Tools
Enthusiast

MLOAD

I have a date field in mainframe where the data, at times, is of the format '0096-12-01' where 0096 is actually 1996. When loading this into a table in TD, I have to convert this '0096' into 1996 and load it. How do i do that? I have to write an MLOAD script in mainframe and do this. But I am unable to find out a way to do it.

Please help.

Regards
Mike
2 REPLIES
Enthusiast

Re: MLOAD

You may load the data to a staging table the way it comes ('0096-12-01') and then load to the base table using string manipulation. Otherwise, you may extract mainframe data to a flat file and load that file to the base table using string manipulation.

It would be interesting to know if that can be accomplished without string manipulation!!
Enthusiast

Re: MLOAD

Try using CASE in your INSERT statement

CASE
WHEN (SUBSTR(:Field_date,1,2) EQ 00)
THEN 19 || SUBSTR(:Field_date,3,6)
ELSE :Filed_date
END

You can manipulate the CASE based on your requirement.