Page 1 of 1

Optional field not present but TX doesn't go to nect field

Posted: Fri Mar 31, 2006 7:50 am
by jazzer1
I have a date field marked as optional. In the trace TX sees at offset 383
that the field failed the item presentation and that's OK. However,
the next TX validation starts at the SAME offset 383 and fails.
Somehow TX has to move 8 bytes forward to offset 391 doesn't it ?

I'm new at this, what am I doing wrong ?
Thanks.

Re: Optional field not present but TX doesn't go to nect fie

Posted: Fri Mar 31, 2006 2:30 pm
by rodneycrowe
jazzer1 wrote:I have a date field marked as optional. In the trace TX sees at offset 383
that the field failed the item presentation and that's OK. However,
the next TX validation starts at the SAME offset 383 and fails.
Somehow TX has to move 8 bytes forward to offset 391 doesn't it ?

I'm new at this, what am I doing wrong ?
Thanks.
Sorry, but invalid data and ABSENCE/PRESENCE of data are not the same thing. For example, in a type tree for a fixed length record (i.e..copybook...etc) , a text field can be padded with spaces, the range can be 1:1 and as long as the field at least has spaces (Pad Character) then it resolves the requirement for the field but is still ABSENT().

For Date fields, any data that does not conform with FORMAT will not pass validation. During input validation, for a fixed length record, data will only be validated to the point of the first failure. In other words even though the field starting at pos 383 is is optional, since there is data there it has to be of the correct format in order to validation to continue past that point.

My $.02

Re: Optional field not present but TX doesn't go to nect fie

Posted: Fri Mar 31, 2006 2:31 pm
by rodneycrowe
jazzer1 wrote:I have a date field marked as optional. In the trace TX sees at offset 383
that the field failed the item presentation and that's OK. However,
the next TX validation starts at the SAME offset 383 and fails.
Somehow TX has to move 8 bytes forward to offset 391 doesn't it ?

I'm new at this, what am I doing wrong ?
Thanks.
Sorry, but invalid data and ABSENCE/PRESENCE of data are not the same thing. For example, in a type tree for a fixed length record (i.e..copybook...etc) , a text field can be padded with spaces, the range can be 1:1 and as long as the field at least has spaces (Pad Character) then it resolves the requirement for the field but is still ABSENT().

For Date fields, any data that does not conform with FORMAT will not pass validation. During input validation, for a fixed length record, data will only be validated to the point of the first failure. In other words even though the field starting at pos 383 is is optional, since there is data there it has to be of the correct format in order to validation to continue past that point.

My $.02

Posted: Fri Mar 31, 2006 2:33 pm
by rodneycrowe
Sorry, but invalid data and ABSENCE/PRESENCE of data are not the same thing. For example, in a type tree for a fixed length record (i.e..copybook...etc) , a text field can be padded with spaces, the range can be 1:1 and as long as the field at least has spaces (Pad Character) then it resolves the requirement for the field but is still ABSENT().

For Date fields, any data that does not conform with FORMAT will not pass validation. During input validation, for a fixed length record, data will only be validated to the point of the first failure. In other words even though the field starting at pos 383 is is optional, since there is data there it has to be of the correct format in order to validation to continue past that point.

My $.02

date/text field

Posted: Fri Mar 31, 2006 3:15 pm
by jazzer1
What I'm trying to say is...How do I define a date field in the type tree
that is valid either as a date or spaces....20060331(is valid) or ' '(also valid).
Thank you.

Posted: Tue Apr 04, 2006 2:09 am
by janhess
In the Item SubClass you could try specifying None as spaces or in Type Syntax specify Empty as Literal and spaces.

Posted: Wed Apr 05, 2006 2:42 pm
by jazzer1
YES ! Thank you janhess for your suggestion of specifying spaces in the
type syntax empty parameter. That works.