I am in Unidata and I have been following this and ran into a confusing result when trying to apply the EVAL/OCONV to a field that has an "MD2," format in DICT. Is there an easy way to clear the existing format so that the EVAL/OCONV format will process as intended? The EVAL/OCONV gives different results when the value of "70.00" comes from a field with a CONV of "MD2," than it gives when the value of "70.00" is hard code in the EVAL/OCONV statement.
LIST AR.PAYMENT.ITEMS ID.SUPP SAMPLE 1 ARPI.AMT EVAL "OCONV(ARPI.AMT*100/3, 'MD12')" EVAL "OCONV(ARPI.AMT*100/3, 'MD22')" EVAL "OCONV(ARPI.AMT*100/3, 'MD32')" EVAL "70.00 * 100/3" EVAL "OCONV(70.00 * 100/3,'MD12')" EVAL "OCONV(70.00 * 100/3,'MD22')" EVAL "OCONV(70.00 * 100/3,'MD32')" Amount 70.00 OCONV(ARPI.AMT*100/3, 'MD12') 23.33 OCONV(ARPI.AMT*100/3, 'MD22') 23.33 OCONV(ARPI.AMT*100/3, 'MD32') 23.33 70.00 * 100/3 2333.3333 OCONV(70.00 * 100/3, 'MD12') 23.3 OCONV(70.00 * 100/3, 'MD22') 23.33 OCONV(70.00 * 100/3, 'MD32') 23.333 1 record listed David Morelli, UIS/Datatel Team -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of James B. Mitchell Sent: Monday, August 16, 2004 3:05 PM To: [EMAIL PROTECTED] Subject: RE: [U2] EVAL formatting Are you in Universe or Unidata? Shouldn't you just be able to include an OCONV in the EVAL? Maybe I'm missing something obvious, but that seems the simple solution. For example, I just did a little snippet in Universe 10.0.6 as: LIST VOC SAMPLE 1 EVAL "OCONV((3.45 / 1.2),'MD2P')" and got a response back of 2.88. I suppose it depends on what's in H.HCG.AWARDED.ALL and H.TOTAL.AWARD, but you might try the above as a test to prove the concept. Hope that helps. -- James > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:owner-u2- > [EMAIL PROTECTED] On Behalf Of Kevin Michaelsen > Sent: Monday, August 16, 2004 2:02 PM > To: [EMAIL PROTECTED] > Subject: [U2] EVAL formatting > > I had one of my IT folks look at this one and I don't want to belive > them. They said you cannot display a decimal when using the EVAL > command. I think there is got to be a way. That's why I put this out. > The current EVAL statement displays 1 or 0. Any ideas?? > > LIST CS.2004 H.HCG.AWARDED.ALL H.TOTAL.AWARD EVAL > "H.HCG.AWARDED.ALL/H.TOTAL.AWARD" > > > kevin > ------- > u2-users mailing list > [EMAIL PROTECTED] > To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list [EMAIL PROTECTED] To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list [EMAIL PROTECTED] To unsubscribe please visit http://listserver.u2ug.org/
