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

Formally known as "Mercator Inside Integrator 6.7", DataStage TX enables high-volume, complex transactions without the need for additional coding.

Moderators: chulett, rschirm

Post Reply
jazzer1
Participant
Posts: 37
Joined: Mon Mar 20, 2006 10:26 am

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

Post 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.
rodneycrowe
Participant
Posts: 10
Joined: Fri Sep 23, 2005 10:27 am

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

Post 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
rodneycrowe
Participant
Posts: 10
Joined: Fri Sep 23, 2005 10:27 am

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

Post 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
rodneycrowe
Participant
Posts: 10
Joined: Fri Sep 23, 2005 10:27 am

Post 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
jazzer1
Participant
Posts: 37
Joined: Mon Mar 20, 2006 10:26 am

date/text field

Post 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.
janhess
Participant
Posts: 201
Joined: Thu Sep 18, 2003 2:18 am
Location: UK

Post by janhess »

In the Item SubClass you could try specifying None as spaces or in Type Syntax specify Empty as Literal and spaces.
jazzer1
Participant
Posts: 37
Joined: Mon Mar 20, 2006 10:26 am

Post by jazzer1 »

YES ! Thank you janhess for your suggestion of specifying spaces in the
type syntax empty parameter. That works.
Post Reply