× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I have a field in a file defined as a date data type, *ISO. I display the date on the screen in *USA format. The problem comes when trying to retrieve the record via a subfile built thru SQL. I get no record due to the date being invalid because the date is 2099-12-01. According to the RPG & DDS books, date in either USA or ISO formats can go to 9999 in the year. If I change the date to 2039, the record is retrieved perfectly.

Additional Message Information

Message ID . . . . . . : CPF5035
Date sent . . . . . . : 03/03/15 Time sent . . . . . . : 14:37:14

Message . . . . : Data mapping error on member SMKCOMIT.

Cause . . . . . : A data mapping error occurred on field SMKCOMIT_1.CEXPDT
in record number 0, record format *FIRST, member number 1, in member
SMKCOMIT file SMKCOMIT in library HOLLIB, because of error code 18. The
error code meanings follow:
1 -- There is data in a decimal field that is not valid.
2 -- A significant digit was truncated.
3 -- A floating point value exceeded the maximum representable value.
4 -- A floating point value was less than the minimum representable value.
5 -- A binary floating point value could not be used for the attempted
operation because it is not a number, or is not valid.
6 -- A floating point value could not be mapped to packed decimal, zoned
decimal, or binary.
8 -- A binary floating point value that is not a number is not allowed as
a key value.
9 -- Division by zero.
10 -- A partial binary key field could not be mapped. The length of the
key did not include the entire binary field.
11 -- A partial key field could not be mapped. The length of the key did
not include the entire binary, floating point, date, or timestamp field.
12 -- There is data in a DBCS field that is not valid.
13 -- Group by results could not be determined because no records were
selected.
14 -- The length of a variable length field is not valid or the data in a
substring variable is not valid.
15 -- A date value is greater than the maximum allowed value.
16 -- A date value is less than the minimum allowed value.
17 -- The format of the data in a date, time, or timestamp field is not
valid.
18 -- There is data in a date, time, or timestamp field that is not valid.
19 -- An unexpected null field was found.
20 -- A field that is not null capable could not be set to null.
21 -- The data has been converted from one CCSID to another. However,
substitution characters were used for characters which could not be
converted.
22 -- A shift-out character was found while converting to a single or
mixed byte CCSID or a substitution character was found. The data could not
be converted.



As defined in the display file:
A #2EXPDT L O 9115DATFMT(*USA)


As defined in the physical file:
A CEXPDT L TEXT('Expiration Date')
A DATFMT(*ISO)

What am I missing ? RTM links appreciated.

TIA,
Cyndi B.
Boise, ID

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.