|
Hello Rob,
You wrote:
>A question about your code. You have two input parameters but your
>samples never pass the second parameter. Won't that cause problems - as
>coded?
Yep. Well spotted. That's a defect. The format is a required parameter
so the sample calls won't even compile. As I said, I didn't test any of
it (or even compile it) -- just verified it with the manual.
>Forgive me if that is nitpicking. I do understand your point. I do
>create many subprocedures. I just wanted to see if I missed something
>in the code.
Forgive? What's that? :) I could have made theFormat optional and used
the default format for the job but that would have taken more code to get
the current date format and I couldn't be bothered for this example.
>I assume that validDate was an indicator field for those that like to
>have a debuggable return value, and not a date field. Is my assumption
>correct?
Exactly. Given that there can be only one format, and the formats are
tested in a SELECT block (therefore only one WHEN clause will evaluate to
true), I could have coded:
RETURN NOT(%ERROR)
but I thought that might cause more confusion so I opted for the obvious.
Regards,
Simon Coulter.
--------------------------------------------------------------------
FlyByNight Software AS/400 Technical Specialists
http://www.flybynight.com.au/
Phone: +61 3 9419 0175 Mobile: +61 0411 091 400 /"\
Fax: +61 3 9419 0175 mailto: shc@flybynight.com.au \ /
X
ASCII Ribbon campaign against HTML E-Mail / \
--------------------------------------------------------------------
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.