In the XML-Schema, the type of “Length” on ItemDef is set to “positiveInteger”, which means “1 or higher”. Otherwise it would have been “nonNegativeInteger”.
There are at least 2 reasons for this:
- the original idea for the Length attribute in the ODM (define.xml is an extension on ODM), is to make it possible to automatically create a relational database from the define.xml (e.g. through “CREATE TABLE” statements). For a relational database, a table column cannot have a length of 0 (VARCHAR(0) or CHAR(0)).
- In SAS Transport 5, a variable cannot have a length of 0 (Lex, please correct me if I am wrong).
I understand your reasoning to set Length=0, maybe it is to avoid the error message that the length is too long for the data. However, that is i.m.o. a stupid rule, which has to do with the fact that FDA reviewers use the files “as is” (on a memory stick?) instead of immediately loading them into a central database upon receipt, and due to the fact that SAS Transport 5 is a very inefficient file format.