Help on 4GL forms please!
Posted in 1993
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL, Jobs, Consulting & Announcements
INTERGRAPH (UK) LTD, SWINDON VALUE ADDED SERVICES ------------------------------------------------------------------- INTEROFFICE ELECTRONIC MAIL Date: 13th January 1993 To: Informix World-Wide User Group From: John Skinner Subject: Help with 4GL forms Dear clever Informix persons, I don't know whether this is the right forum for raising questions like what follows. The group was suggested to me as a possible contact by my very last in-house hope of solving it. We have a nasty problem with floating-point numbers in an Informix 4GL application we are writing for in-house use. The 4GL's use standard infx screen forms for their user interface as the sw must be useable from alpha terminals. Since floating point numbers float, the form has to be told how to display them, eg f003 = table.column, format="-----&.&", ... which says 6 places before the decimal point and one after. All was well until our Munich office tried the software and found that their database became corrupt: floating point numbers started multiplying themselves by powers of 10. After some thought and effort, we discovered that the cause is the DBMONEY variable: the Germans use it to define a comma ',' as the separator between the integer part and the fractional part of an f-p number, ie 4 / 3 = 1,333333333. When this is restored (when DBMONEY is not defined), all is OK. Skinner's Motto: In an ideal world, software would let users do what they are used to doing. We want to take notice of DBMONEY and accept whatever character the users wish to have as their decimal point. We do NOT want to have to recompile every form a dozen times for the dozen different ways of indicating the parts of a number, we want one single solution which accepts whatever is the current DBMONEY separator. The documentation talks about DBMONEY but makes no mention of its implications for software or forms. The problem appears to lie with our 4GL software, as the normal SPERFORM screenforms are able to translate the DBMONEY separator without any problems at all. It's only when our executables are running as a front end that DBMONEY causes dbs corruption. I guess something is wrong in, or missing from, our code. SO ... here, ladies and gentlemen, is where you come in. The problem must have come up before in all the software that has been written world-wide. Has anyone seen this? or better, solved it? if so, how?? *is* it solveable??? Thanks in advance for any replies. I don't subscribe to this user group, so please copy all postings to me directly. Regards John Skinner Systems Consultant mailpath: skinnej@pandora.swindon.ingr.COM (Intergraph)