|
On 15/10/2005, at 2:27 AM, Dave McKenzie wrote:
In the CDD documentation it says "The DDAT for operand 1 must be valid for a date duration."In the list of format codes it lists "Date duration" (x14) as separate from the "Labeled durations" (x0D - x13).Maybe that means that the only valid format code for operand 1 is x14.
We'd know more if we got to see the MCH5601 message in its entirety. I'm inclined to agree with you. CDD returns a "Date Duration". Compare that with DECD and INCD which both accept a Duration for Operand 3. "Duration" being more generic implies that labelled duration might be valid. The DECD and INCD instructions also state that the DDAT for Operand 3 must be valid for a date duration like CDD does but note the use of italics in the description for each instruction:
CDD: ... resulting <i>date duration</i> is placed in operand 1.DECD: ... is decrememted by the date <i>duration</i> specified by operand 3. INCD: ... is incremented by the date <i>duration</i> specified by operand 3.
CDD implies a a specific Date Duration (i.e., x'14'). DECD and INCD imply any kind of date duration (e.g., x'0d' to x'13). Subtle distinction but perhaps enough to explain the behaviour. Time for some experimentation I think--but, it's the weekend and the sun is shining out of a clear blue sky.
Spring has sprung The grass has riz I wonder where the boidies is
In any case, I don't know exactly what a "labeled duration" is.
A date duration is an 8-digit value interpreted as YYYYMMDD but it's not a DATE even though it looks like one. It is a duration of YYYY years, MM months, and DD days.
A "labelled duration" is just a number. It can be interpreted as years, months, days (for the DATE types) according to the format code. The format code specifies the "label" applied to the number.
Regards, Simon Coulter. -------------------------------------------------------------------- FlyByNight Software AS/400 Technical Specialists http://www.flybynight.com.au/ Phone: +61 3 9419 0175 Mobile: +61 0411 091 400 /"\ Fax: +61 3 9419 0175 \ / X ASCII Ribbon campaign against HTML E-Mail / \ --------------------------------------------------------------------
As an Amazon Associate we earn from qualifying purchases.
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.