Class Alphanumeric

Alphanumeric date, time, and timestamp fields are brought into your program only if you specify the CVTOPT(*DATETIME) option on the CRTCBLMOD or CRTBNDCBL command, or the DATETIME option of the PROCESS statement. If *DATETIME is not specified, date, time, and timestamp fields are ignored and are declared as FILLER fields in your ILE COBOL program.

Date, time, and timestamp fields are brought in as fixed-length character fields. Your program can perform any valid character operations on them.

The date, time, and timestamp data types each have their own format.

If a field containing date, time, or timestamp information is updated by your program, and the updated information is to be passed back to your database, the format of the field must be exactly the same as it was when the field was retrieved from the database. If you do not use the same format, an error will occur.

Also, if you try to WRITE a record before moving an appropriate value to a date, time, or timestamp field, the WRITE operation will fail with a file status of 90.

For information on valid formats for each data type, see the DB2® for i section of the Database and File Systems category in the IBM® i Information Center at this Web site - http://www.ibm.com/systems/i/infocenter/.