× 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.



On Wed, Aug 3, 2011 at 9:55 AM, Timothy Adair <tadair@xxxxxxxxxxxxxxxx> wrote:
here is the quote from the v6r1 ILE RPG Language Reference
manual (chapter 10, page 228):

"The Y edit code is normally used to edit a 3- to 9-digit
date field. It suppresses the leftmost zeros of date fields,
up to but not including the digit preceding the first separator.
Slashes are inserted to separate the day, month, and year."

Either the manual is wrong or the compiler is.

Tim, I agree that the manual could have been more clear. However, if
you read the context, you will understand that it really is just for
numeric fields.

The name of the chapter is "Editing Numeric Fields".

The section you quote from is named "Simple Edit Codes" and the very
first sentence in that section is

"You can use simple edit codes to edit numeric fields without having
to specify any punctuation."

I cannot stress enough that the date type is NOT a numeric type on the
i. Since what you are calling "date fields" either didn't exist (for
early enough versions of RPG) or were not numeric (for all other
versions of RPG), it is understood that "date field" in the context of
*numeric edit codes* refers to numeric fields holding values *used as*
dates.

I agree that the manual should have been updated once the date type
was introduced. However, that is such a minor point in the manual,
especially with all the other context, that it's understandable to
have let it slip.

John

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-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.