You need to handle the presentation of times on display files and printer files differently, depending on the way they are stored.
Your application program has responsibility for the way the value is entered, stored, and presented. The program must check for the correct format, eliminate the time separators, convert the time to another format when necessary, and edit it on the display file or printer file.
The editing can be done by specifying the edit word (EDTWRD) for the field. The TIME keyword is an output-only field. Both the edit word and TIME keyword use the information available at creation time. The time separators are integrated in the device file object.
Both ways force you to have different copies of the source and objects for different editing requirements.
The operating system allows you to specify different time formats and time separators on the database file level. The TIME keywords allow you to specify the format and editing characters for storing time fields. The time type field is shown as a character string that includes the separators.
As an SAA data type, you can specify such time fields as normal character fields on the display file or printer file. On an input operation, your program has to check entered values for the correct format and separators and move them over to the database field. On an output operation, you just move the character string from the database file field to the device file field, including the separators. Any format conversion between the input and output format and the format that the database asks for can be done by either of the following two ways: