× 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 right value for "DDAT_Size"  should be

(2*DDAT lng) + (4 + 2 + 10 + 4 + 4) = 256

But it seems to work with any value.

DDAT2 and DDAT3 are the same and should be 116

----- Original Message ----- 
From: "Njål Fisketjøn" <njal.fisketjon@xxxxxxxxxxxx>
To: "MI Programming on the AS400 / iSeries" <mi400@xxxxxxxxxxxx>
Sent: Monday, October 17, 2005 1:28 PM
Subject: RE: [MI400] Compute Date Duration


> Beppe Costa wrote:
>
> > For those who are interested to explore the MI builtin _CDD, the code
> > follows.
> >
> > It returns a duration in the format 8,0 Pack. In this case the returned
> > value is 00501130 (that is 50 years + 11 month + 30 days).
> >
> > Than, how can I convert this figure to a number of days ?
> >
> > I've also tried to use CVTD but always unsuccesfully.
> >
>
> The MI reference specifies that the Data Definitional Attribute Template
is 112-N bytes long,
> but if I add the lengths of all fields I get 100 bytes as a minimum
length. If I specify
> 100 bytes for dat 1 _CDD fails because the format of dat 2 is wrong.
>
> How have you defined the template when trying to use a labelled duration?
>
>
>
>
>
> _______________________________________________
> This is the MI Programming on the AS400 / iSeries (MI400) mailing list
> To post a message email: MI400@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/mi400
> or email: MI400-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/mi400.
>


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.