Do you have DATFMT(*ISO) specified?
"When initializing Date or Time data type fields or named constants with
Date or Time values, the format of the literal must be consistent with the
default format as derived from the Control specification, regardless of the
actual format of the date or time field.

Date literals take the form D'xx-xx-xx' where:
D indicates that the literal is of type date
xx-xx-xx is a valid date in the format specified on the control
specification (separator included)
xx-xx-xx is enclosed by apostrophes

Charles

On Wed, Jan 7, 2026 at 1:35 PM James H. H. Lampert via RPG400-L <
rpg400-l@xxxxxxxxxxxxxxxxxx> wrote:

On 1/7/26 12:29 PM, Rick Rauterkus wrote:
Are you putting a value into JAN31? If not, you are just positioning to
the beginning of the file and reading the previous record which won't
find
anything.

Yes. It's got a value (my apologies for not saying so earlier). The
INZ(D'2017-01-31') clause on the declaration would have wrapped in the
email.

And it has three friends, all of them INZ'd to different dates.

This excerpt is from a test program, after the real program exhibited
the symptom; it uses a date value constructed from month, day, and year
values read from a file.

--
JHHL

--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2026 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.