|
Are you sure that you're not running into any "divide by zero" scenarios? I would either do: 1) include a test for OSTKVAL *NE 0 in the QRYSLT *OR* if you needed to include such records, 2) change the MAPFLD calculation to '(OBSTKVAL/(OSTKVAL+0.000000001))*100' (The actual value you'd use would depend on how OBSTKVAL & OSTKVAL are defined to make sure it doesn't significantly change the results of "valid" values. If you have a record where OSTKVAL = 0, then the resulting OBPCT value will be 999999.999 or some such ridiculous value. I'm guessing that last part, testing is yours to determine how valid that is.) HTH, Dan --- Peter Vidal <Peter_Vidal@pall.com> wrote: > Hi list. > > Very simple question but I do not know what I am doing wrong here: > > OPNQRYF FILE((MEINVDTL)) QRYSLT('OBQTY *GT 0') > KEYFLD((*MAPFLD/OBPCT)) > MAPFLD((OBPCT '(OBSTKVAL/OSTKVAL)*100' *ZONED 9 3))) > > I want to sort by this field that I am calculating here (*ASCEND) > but is crashing when I get here. > > I have glasses and none of my four eyes are helping me here. > > Your help is greatly appreciated. > > Best regards, > Peter Vidal __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com
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.