You got that backwards Buck - having it in a DS will _honour_ the database definition. If it is not in a DS it will convert to packed.

This was what I said in my original response to this question.

The problem seen here is one reason why a lot of people recommend never using the Like keyword with an externally defined field. The issue relates to numerics and date/time fields. If you want to use LIKe it is better to use it against fields defined in a Template with the "correct" type specified. Adding CONST to the parm definition ensures that the field can be used whether in packed or zoned form.


Jon Paris

www.partner400.com
www.SystemiDeveloper.com

On Feb 14, 2018, at 5:29 PM, Buck Calabro <kc2hiz@xxxxxxxxx> wrote:

On 2/14/2018 5:24 PM, Buddy McClean wrote:
What started this was passing a parm between 2 programs. Both using the same file and field as the base of the LIKE. Both programs used I619 Like(OHINV) - one program would pass I619 as zoned and the other would read it in as packed, so the call would crash because of it.
I think of the Outline View as a work in progress. If it seems
snookered, I revert to the compiler listing.

With respect to the mis-matched parameter definition, make sure OHINV
isn't in a data structure, because that will override the Db2 definition.

--
--buck

http://wiki.midrange.com
Your updates make it better!

--
This is the Rational Developer for IBM i / Websphere Development Studio Client for System i & iSeries (WDSCI-L) mailing list
To post a message email: WDSCI-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/wdsci-l
or email: WDSCI-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/wdsci-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.