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



From what I can see, you are asking to calculate the difference in
timestamps, with the result in seconds.

Well the number of seconds in one day is 60 * 60 * 24 = 86,400
Looking at your data, you are calculating the time stamp difference at more
than 2 days, so the answer would be greater than 172,800, which would
require the field STA_DUR to be changed to PACKED(6,0) at least.



Alan Shore

NBTY, Inc
(631) 244-2000 ext. 5019
AShore@xxxxxxxx

rpg400-l-bounces@xxxxxxxxxxxx wrote on 11/06/2006 10:44:52 AM:

All,
  Hope someone can give some thought for this problem. The below
code fails in production with Error MCH1210 - The target for a
numeric operation is too small to hold the result.

  C     STA_DATTIM    SUBDUR    SV_DATTIM       STA_DUR:*S

  Here STA_DATTIM and SV_DATTIM are time stamp variables. And
STA_DUR is 5,0 packed decimal. When the error occurs last week, I
answered the message with 'D' and the values in the dump shows as below:

  STA_DATTIM            TIMESTAMP(26)        '2006-10-31-09.55.21.
000000'
                      VALUE IN HEX
'F2F0F0F660F1F060F3F160F0F94BF5F54
  SV_DATTIM             TIMESTAMP(26)        '2006-10-29-01.14.15.
000000'
                      VALUE IN HEX
'F2F0F0F660F1F060F2F960F0F14BF1F44
  STA_DUR            PACKED(5,0)          00007.           '00007F'X

  Is anything wrong with the code?. I never saw any message aslike
this till we recently moved to V5R3. I created a dummy program with
these timestamp values in my V5R3 test enviornmnet and it worked
good. Is any PTF missing?. Any help in this greatly appreciated.
  Thanks!
  Sivakumar





---------------------------------
Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates.
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-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.