Table 1 and Table 2 list the DATFMT parameters allowed for zoned, packed, and character DDS
fields, and their equivalent ILE COBOL format that is generated from COPY DDS
when the CVTOPT(*CVTTODATE) conversion parameter is specified.
Table 1 lists the
IBM® i DDS date data types and their equivalent
ILE COBOL format.
Table 1 is for character and zoned fields; USAGE DISPLAY is assumed.
Table 1. DDS Date
Data Types and Their Equivalent ILE COBOL Format| IBM i Format |
COBOL-Generated Format |
Description |
Format |
Valid Separators |
Length |
| *MDY |
%m/%d/%y |
Month/Day/Year |
mm/dd/yy |
/-.,& |
8 |
| *DMY |
%d/%m/%y |
Day/Month/Year |
dd/mm/yy |
/-.,& |
8 |
| *YMD |
%y/%m/%d |
Year/Month/Day |
yy/mm/dd |
/-.,& |
8 |
| *JUL |
%y/%j |
Julian |
yy/ddd |
/-.,& |
6 |
| *ISO |
@Y-%m-%d |
International Standards Organization |
yyyy-mm-dd |
- |
10 |
| *USA |
%m/%d/@Y |
IBM USA Standard |
mm/dd/yyyy |
/ |
10 |
| *EUR |
%d.%m.@Y |
IBM European Standard |
dd.mm.yyyy |
. |
10 |
| *JIS |
@Y-%m-%d |
Japanese Industrial Standard Christian Era |
yyyy-mm-dd |
- |
10 |
Table 2 liststhe
IBM i DDS time data types and their equivalent
ILE COBOL format.
Table 2 is for packed fields; USAGE PACKED-DECIMAL is generated.
Table 2. DDS Time Data Types
and Their Equivalent ILE COBOL Format| IBM i Format |
COBOL-Generated Format |
Description |
Format |
Valid Separators |
Length |
| *HMS |
%H:%M:%S |
Hours:Minutes:Seconds |
hh:mm:ss |
:.,& |
8 |
| *ISO |
%H.%M.%S |
International Standards Organization |
hh.mm.ss |
. |
8 |
| *USA |
%I:%M @p |
IBM USA Standard. AM and PM can be any mix
of upper and lower case. |
hh:mm AM or hh:mm PM |
: |
8 |
| *EUR |
%H.%M.%S |
IBM European Standard |
hh.mm.ss |
. |
8 |
| *JIS |
%H:%M:%S |
Japanese Industrial Standard Christian Era |
hh:mm:ss |
: |
8 |