I am wondering how to write on length/significant digit in "ValueLevel" sheet. (for TYPE=float)
I have a ADaM dataset, and it has a variable which type is float.
For example, the value=1.03 then maximum number of integer is 1, and maximum number of decimal digits is 2.
Therefore, length=3 (1+2) and significant digit = 2.
However, the validation reports for ADaM (based on ADaMIGv1.1) find it has longer than defined max length.
I noticed that this warning is found on only variables in "ValueLevel" sheet. On the other hands, there are so many float type variables but no warning if only write on "Variables" sheet.
Is there any solutions for resolving this problem?
I am searching about this issue in community forum, but it seems not clear.
This bug in SD1231 was fixed in 2206.0 engine which is not released yet.
Sorry for inconvenience.
Many Thanks for kindly help
As one of the developers of the Define-XML standards, I keep fighting for correct implementations!
* Required Field
Length and Significant Digit (Type=float)
There is over and over again confusion about "Length" when the datatype is "float", althought both the Define-XML 2.0 and 2.1 specifications are very clear about this:
So, for your example "1.03" a Length of 3 is surely correct.
This is even somewhat better explained in the specification of the ODM 1.3.1 standard, upon which the Define-XML standard is based:
Meaning e.g. that for Length=3, SignificantDigits=2, the highest allowed value is 9.99 (10power(N-S) = 10power(3-2)= 10power(1) = 10.
So for this case, the value must be below ("magnitude less than") 10. So e.g. 9.99 is still allowed.
Many people however believe that for "float", the "Length" attribute represents the maximal string length, as it does for "text".
It looks as P21 validation software also uses the (maximal) string length, which is wrong.
So, I would say that this is a false positive.
The Define-XML team is currently considering to make "Length" at least "optional" in future (or even drop it alltogether) as for modern systems and formats, it doesn't make sense anymore. In earlier days it was necessary for setting up some types of databases (e.g. CHAR(n), VARCHAR(n) in SQL databases). The only function it still has (my personal opinion) is to steer the generation of the SAS Transport files with their fixed-field-length format (extremely ineffcient). For use with modern formats like Dataset-JSON and Dataset-XML, "Length" does not have a function anymore.