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


  • Subject: Re: Packed field mismatch
  • From: rorr@xxxxxxxxxxxxxx
  • Date: Sun, 3 Jun 2001 13:37:31 +1000

>>>>>If you can edit the QRYDFN, change the result field length to an
appropriate length any RPG programme can handle. Does the result field be
really that long?
If ypu cannot edit the QRYDFN, do a RTVQMQRY with QRYDFN(*YES) and try to
correct it with QM.
Regards, Carel Teijgeler.<<<<<<<

Carel,

The QRYDFN does have a result field length and dec places definition.
QMQRY overides this when deriving from a qrydfn. (as confirmed by ANZQRY).
It seems that qmqry always generates 31 packed when there is a divide op.
(p.s. QMQRY is only being used as a method to pass parameters to Query)

I know I could circumvent this by various means, but thats not my issue.

DDS allows Packed(31) as does QMQRY (in fact it seems to prefer it in
certain conditions) .
But RPG is limited to 30 . . . .why? This is obviously by design but I
can't find any discussion about it in the IBM documentation. Also, I
presume that RPG would have to truncate the left hand half-byte i.e. most
significant number. The algorith QMQRY uses means this position could
definitely be significant. I guess I'm saying why does the system support
this and RPG doesn't, especially as Packed Decimal is so integral to the
architecture.

I wonder too whether I'm missing something very basic, as I've never heard
discussion of this before nor in fact come across it. It was only that
QMQRY came up with it and it broke my code that I got interested.
My main concern is that this RPG program is a generic utility designed to
handle any DB file, and therefore I want to be able to handle what the DB
can handle.
If this was just an application program I would design around it.
I could also put in some special code to unpack this size field  without
needing any RPG packed support, but before I do I thought I'd try to get
some opinion from this list.
_______________________________________________________________

Regards,        Rod Orr








+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.