Forums: Define.xml
Hi Nitin,
You are correct, the length attribute should not be present for date/time variables. How did you generate your define.xml, was it through The Pinnacle 21 Community Define.xml tool or some other process? Let me know and we can sort this out.
Thanks,
Gerard
Hi Gerard, I used SAS to create Define and was trying to validate using P2.1
Ok, would you be able to look in the define.xml file you validated and confirm that the 'DataType' attribute for the RFSTDTC variable is actually set to datetime? I have a suspicion that the datatype may be incorect. It could be set to the general 'text' datatype. You can also import your define.xml into our Define.xml Tool and look inside the generated Excel specification to see what the datatype is for RFSTDTC.
For some I have used 'partialDatetime' but others with 'date' are also cauing this warning eg DM.DTHDTC
OK, that is good. And just to make sure there are no length attributes on the elements with 'partialDatetime' or 'date' DataTypes? Even an empty Length attribute with can cause this issue.
For example:
<ItemDef OID="IT.DM.DTHDTC" DataType="partialDatetime" Length=" " SASFieldName="DTHDTC">
or
<ItemDef OID="IT.DM.DTHDTC" DataType="date" Length="" SASFieldName="DTHDTC">
Yes, that is highly probably the reason...
People should really start learning XML basics - my undergraduate students learn all this in 2 x 1,5 hours ...
In XML, there is a big difference between the absence of an attribute, the presence of an attribute with empty value, and the presence of an attribute with one or more blanks as the value.
Also be aware that XML is case sensitive:
Length="8" and length="8" are 2 completely different things.
Here is a good link to start learning the basics of XML: http://www.w3schools.com/xml/default.asp
Use it !!!
That would be the problem. If you remove the empty length attributes you will not see the messages anymore. Let me know if you have any more issues!
Regards,
Gerard
We are getting error for all float type even after assigning correct decimal, please share your thoughts on how this can be rectified.
Hi Snehal,
"6.3" in not integer number. Use a value "10" instead.
Kind Regards,
Sergiy
P.S. Please note that there are special dedicated support resources for Enterprise users
Always think carefully what your data is or will be when creating your define.xml. For example, if you may have unplanned visits, always assign "float", e.g. with "SignificantDigits" being equal to 1 (if you do not expect to go e.g. beyond x.9). --DOSE is a typical case where you will have floating point numbers. The same applies to vital signs--STRESN where you may have a mix of integers and floats. It is not because the outdated SAS-XPT format only knows the "numeric" format, that these will all be inrtegers. All your definitions say "integer".
So again, know what data to expect before you start crrating your define.xml. You can of course always adapt when at the end of the ride ...
Hi Snehal,
It looks like you incorrectly used variable format (6.3) instead of variable length (10).
Kind Regards,
Sergiy
Actually, in case you have a SAS format 6.3, for floats that have a pattern of xx.xxx, the length is 5.
From the Define-XML 2.1 specification:
In the case of DataType="float", if DataType=float, Length=N and SignificantDigits=S is a requirement that the receiving system be able to process and store all numeric values of magnitude less than 10N-S that are multiples of 10-S." For example, if the value has a pattern xxx.xx, then Length=5 and S=2.
The Define-XML specification is based on ODM. The ODM specification states:
I am getting this error for date/time variables like RFSTDTC etc in P2.1. I believe length is suppose to be missing