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



Alan,

There is an implicit casting in SQL, so this is allowed.

Dan: I ran a small test with our (V5R3) system and it worked perfectly.
Unless this capability (that of implicit casting) has changed since then, it
would point out to *maybe* a missing PTF. Check your Group PTFS (especially
those regarding DB2).

Regards,

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



On Tue, Dec 21, 2010 at 1:08 PM, Alan Campin <alan0307d@xxxxxxxxx> wrote:

I don't see how this would work at all if CMCUST is a packed 9,0. I would
have converted CMCUST to a string, then done the substr and then cast the
result back to a dec 9,0. Based on substringing a packed 9,0 I would guess
the results could be anything.

On Tue, Dec 21, 2010 at 10:18 AM, Dan <dan27649@xxxxxxxxx> wrote:

The messed-up data I mentioned in my previous thread several minutes ago
was
caused by:

Update Lib1/Customer Set cmcust = '50' || substr( cmcust , 3, 7 )

cmcust is a 9.0 packed decimal. The goal is to REPLACE the first two
digits
of cmcust with 50.

In another library I used this in, the update worked as expected.
However,
for reasons unknown to me, the update in this library replaced the 3rd &
4th
digits of cmcust with 50. Any ideas?

FWIW, we just upgraded to V6R1 with cum PTF TL60215 applied. I've been
out
of the OS admin side of things for too long to know whether that is a
recent
cum PTF.

TIA,
- Dan
--
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.


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