Author Topic: How to get decimal precision of criteria  (Read 3470 times)

TTP4RFGrL3Ki

  • Guest
How to get decimal precision of criteria
« on: October 12, 2015, 02:31:03 PM »
Does anybody know how to query the decimalPrecision value mentioned on this page?
http://www-01.ibm.com/support/knowledgecenter/?lang=en#!/ssw_ibm_i_72/com.ibm.ondemand.administeringi5os.doc/dodob006.htm

Neither in ODCriteria nor ODApplicationGroupField I found any function that returns the decimal precision value.
I can't believe that value isn't accessible with OD/WEK

Thanks a lot for any answer!

Alessandro Perucchi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1002
    • View Profile
Re: How to get decimal precision of criteria
« Reply #1 on: October 13, 2015, 06:33:33 AM »
Hello,

You cannot.

The only you could have this information is by doing the following:

  • Create a XML for the folder definition you are interested (ARSXML format)
  • Use the method ODServer.xmlParse(...) to export the folder definition defined in the step 1)
  • Parse the XML output, and search for the field you want/need the precisionDecimal information
  • Do whatever you want with that information

That will work, and yes this is not sexy :-) but with that method, you could basically have all the CMOD definition, and settings.

Hope that helps a little bit :-)

if you would like to have such information, in a more standard API, then you might need to open a PMR, or most probably ask the help of your IBM representative in order to request an enhancement of ODWEK.
You can also put this request in our "Enhancement Request" forum.

--
Alessandro
Alessandro Perucchi

#Install #Migrations #Conversion #Educate #Repair #Upgrade #Migrate #Enhance #Optimize #AIX #Linux #Multiplatforms #DB2 #Windows #Oracle #TSM #Tivoli #Performance #Audits #Customizing #Availability #HA #DR #JavaApi #ContentNavigator #ICN #WEBi #ODWEK #Services #PDF #AFP #XML

TTP4RFGrL3Ki

  • Guest
Re: How to get decimal precision of criteria
« Reply #2 on: October 13, 2015, 08:29:21 AM »
Thanks a lot, Alessandro!

Since I developed somewhen in the past Lotus Notes databases I don't hesitate to follow even this XML approach ;)

This simple XML file gives me all I need:
<?xml version="1.0" encoding="UTF-8"?>
<onDemand xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ondemand.xsd">
    <folder name="AFP Folder 2"/>
</onDemand>


Best Regards,
Andreas

Alessandro Perucchi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1002
    • View Profile
Re: How to get decimal precision of criteria
« Reply #3 on: October 13, 2015, 10:12:13 AM »
Great  :D

I didn't know that Lotus Database are so ... ODWEK like  ;D

Maybe I should try that kind of programming!!   ::)
Alessandro Perucchi

#Install #Migrations #Conversion #Educate #Repair #Upgrade #Migrate #Enhance #Optimize #AIX #Linux #Multiplatforms #DB2 #Windows #Oracle #TSM #Tivoli #Performance #Audits #Customizing #Availability #HA #DR #JavaApi #ContentNavigator #ICN #WEBi #ODWEK #Services #PDF #AFP #XML

TTP4RFGrL3Ki

  • Guest
Re: How to get decimal precision of criteria
« Reply #4 on: November 03, 2015, 05:56:18 AM »
Seems I have a bonus question:
OnDemand delivers numbers with a comma as decimal separator.
So far I didn't see any method in OD/WEK or attribute in ondemand.xsd that tells me how to parse decimal numbers.

??? Should parsing of decimal numbers be controlled by some locale? And yes - where to get it? ???

Any help is highly appreciated!

Andreas

P.S.: Notes databases are great for certain purposes however seem not to be a perfect fit for things like repeating appointments in a calendar. Probably Notes programming has changed a lot in the past years, I just remembered the good old @ language...

Justin Derrick

  • IBM Content Manager OnDemand Consultant
  • Administrator
  • Hero Member
  • *****
  • Posts: 2231
  • CMOD Guru for hire...
    • View Profile
    • Tenacious Consulting
Re: How to get decimal precision of criteria
« Reply #5 on: November 03, 2015, 01:37:58 PM »
OnDemand delivers numbers with a comma as decimal separator.

This seems like it would be set by your system's language parameters.  I'm not sure exactly where this 'Locale' setting would present the stored value as being formatted for a specific region.  In UNIX/Linux, it's the LANG and/or LOCALE environment variable.  In the database, it could be determined by your codepage.  I have no idea where exactly the substitution happens.

-JD.
IBM CMOD Professional Services: http://TenaciousConsulting.com
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Education & Webinars:  https://CMOD.Training/

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SP #Performance #Security #Audits #Customizing #Availability #HA #DR

TTP4RFGrL3Ki

  • Guest
Re: How to get decimal precision of criteria
« Reply #6 on: November 03, 2015, 10:12:15 PM »
Thank you for the quick response!

At least I know now that I didn't miss an obvious method/attribute.
I'll do some more investigation...

Andreas