Expected output for date and time routines

The date and time routines return different output depending on the format of the input value.

Begin program-specific programming interface information.

If the function code is 4, the input value is in local format, in the area pointed to by DTXPLOC. Your routine must change it to ISO, and put the result in the area pointed to by DTXPISO.

If the function code is 8, the input value is in ISO, in the area pointed to by DTXPISO. Your routine must change it to your local format, and put the result in the area pointed to by DTXPLOC.

Your routine must also leave a return code in EXPLRC1, a 4-byte integer and the third word of the EXPL area. The return code can have the following meanings:
Table 1. Required return code in EXPLRC1
Value Meaning
0 No errors; conversion was completed.
4 Invalid date or time value.
8 Input value not in valid format; if the function is insertion, and LOCAL is the default, Db2 next tries to interpret the data as a date or time in one of the recognized formats (EUR, ISO, JIS, or USA).
12 Error in exit routine.
End program-specific programming interface information.