Date formats specify the format of a date field including the individual components (year, month, day) that make up the field. These are defined internally as a list of formats in a single format table, FOP9SAPF. New formats can be added easily to the table without requiring exit coding for each individual format.
The user specifies each format by its name in a Column Map, for an individual column, on the Aging Parameters panel for a process. (Aging can be performed for Insert, Load, and Convert Processes.) Users can display a selection list of values appropriate for the specific field type by entering an asterisk in the field.
The name is qualified by the data type of the field. Thus, Optim supports a date format of MMDDYY as a character field and as a decimal field even though these are processed differently internally.
Optim provides an extensive list of date formats; however, you can augment them. For the most part, you can add formats to the list and need not write exit routines for unique data types.
Frequently, values that are not valid dates are inserted into date fields to indicate special handling or conditions.
Rather than treat these non-date values as invalid or as errors, you can direct Optim to skip them. That is, when a field contains the special value, the field is bypassed. Since there is no error, processing continues with the next date field. The user can indicate whether skipped values are noted in the Aging Report and if records with skipped dates are written to the output file.
By default, Optim automatically skips the field when it contains all spaces, hex zeros (low-values) or hex ‘FF' (high-values). If the field does not contain those values, Optim parses the field based on the specified date format. To identify the values to be skipped either by individual format or globally, you also define them in FOP9SAPF. Thus, Optim interprets both format and skip values in a single definition member.
The formats are defined by specifications in the member named FOP9SAPF distributed in the Optim install library.
These specifications are coded using a macro language to define the format information and the fields that make up the date field.
All statements and parameters must comply with S/390® Assembler standards.
There are comments included in FOP9SAPF to show where site-specific entries should be added. The format specifications are defined separately for each data type of the underlying field. A data type is also included for DB2® dates and timestamps.
You define the format using FORMAT and PCODE statements and skip values using SKIP statements. You can specify OVERRIDE statements to establish default settings.
The format source is assembled and link edited using standard assembly procedures. Sample JCL for assembling the date formats is provided in member JCLASM in the install library and discussed in Assemble and Link the Table.
The remainder of this section discusses how to customize FOP9SAPF by specifying FORMAT, PCODE, SKIP, and OVERRIDE statements.