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



The TRUNCNBR parameter on the CRTBNDRPG command controls this behavior - might 
have changed with the upgrade - who knows

HTH
Vern

-------------- Original message -------------- 
From: Scott Klement <rpg400-l@xxxxxxxxxxxxxxxx> 

Hello, 

C STA_DATTIM SUBDUR SV_DATTIM STA_DUR:*S 
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 


The result of this SUBDIR operation should be 204066, which is larger than 
can fit in a 5,0 packed field. 

On my system, it does not produce an error, but it chops off the leading 
digit, making it 04066 instead of 204066, and therefore anything you use 
this field for would produce invalid results. 

On your system, it appears that it's producing an error. That's a good 
thing because it protects you against major problems in your calculations. 
Though, I don't see why yours gives you this error. It doesn't on my 
system, and I'm also running V5R3. You also said that you created a dummy 
program and did the calculation there, and it didn't produce an error. So 
I don't see why you'd get an error. But it's good that you did! Make the 
field bigger! 




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

Follow-Ups:

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.