This may not belong in the RPGLE forum... so forgive me.
In my 20 years on the IBM Power System (and its predecessors) I have nearly always used dates as 8-digit numeric fields (that's just how our ERP and other software did them). However, with some of the new applications we're using it is often better (from the UI perspective) to use actual date fields.
I recently created a table using DDS (ok, shoot me) that contains several date fields (data type L). When adding/updating the file (via SQL in RPGLE) I do not populate several of these fields. In some cases, the user will update the fields (or not). This has not caused a problem in RPG application programs. However, client access will fail to download the file (SQL0181 - Value in date, time, or timestamp string not valid). Another utiility SQL2XLS also fails with CPF5035 Data Mapping Error (18 -- There is data in a date, time, or timestamp field that is not valid.)
Interactive SQL and Run SQL Scripts work fine - replacing the data with pluses (+++++++). The hex value is actually 001A4452.
So I'm not sure how to handle correct this mess. The program logic acts on values of '0001-01-01'. By default the fields are not null capable.
Any ideas would be appreciated - even if they come with a tongue lashing.
In my 20 years on the IBM Power System (and its predecessors) I have nearly always used dates as 8-digit numeric fields (that's just how our ERP and other software did them). However, with some of the new applications we're using it is often better (from the UI perspective) to use actual date fields.
I recently created a table using DDS (ok, shoot me) that contains several date fields (data type L). When adding/updating the file (via SQL in RPGLE) I do not populate several of these fields. In some cases, the user will update the fields (or not). This has not caused a problem in RPG application programs. However, client access will fail to download the file (SQL0181 - Value in date, time, or timestamp string not valid). Another utiility SQL2XLS also fails with CPF5035 Data Mapping Error (18 -- There is data in a date, time, or timestamp field that is not valid.)
Interactive SQL and Run SQL Scripts work fine - replacing the data with pluses (+++++++). The hex value is actually 001A4452.
So I'm not sure how to handle correct this mess. The program logic acts on values of '0001-01-01'. By default the fields are not null capable.
Any ideas would be appreciated - even if they come with a tongue lashing.




Comment