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



Chuck,

Thanks for the info. That one I didn't know. That said, "old habits die
hard" and I think I'll stick to the idea of being explicit in the scale
declaration :-)

Thanks again,


Luis Rodriguez
IBM Certified Systems Expert — eServer i5 iSeries
--



On Wed, Jun 1, 2011 at 4:44 PM, CRPence <CRPbottle@xxxxxxxxx> wrote:

On 01-Jun-2011 12:50 , Luis Rodriguez wrote:
Also, Shouldn't it be (i_date NUMERIC(8, 0) ?

On Wed, Jun 1, 2011 at 2:58 PM, James Lampert wrote:

<<SNIP>>
create function @@@@@@@@@@/DISPLAYDAT(i_date NUMERIC(8))

NUMERIC(8) and NUMERIC(8, 0) are the same for a routine parameter
declaration.

AFaIK the syntax diagram for the Packed and Zoned Binary Coded
Decimal data types across all SQL statements for the IBM i DB2 is
consistently defined such that a second argument for scale after a
specified precision is optional; the scale assumed by the SQL to be zero
when not specified:

<code>

.-(5,0)------------------------.
+-+-+-DECIMAL-+-+--+------------------------------+--+
| '-DEC-----' | | .-,0--------. |
'-+-NUMERIC-+-' '-(--integer--+-----------+--)-'
'-NUM-----' '-, integer-'

</code>

Note that both precision and scale are optional, as are the
parentheses to denote them, whereby the SQL assumes precision of five
and scale of zero.

Regards, Chuck
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



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.