Reading timestamp in sequential file

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

Rejecting can be a two step process.

Records in your example will get rejected when the timestamp values to not match the format tag you specify, such as when a day number or month number has too many or too few characters.

When the timestamp value matches the format tag, the record will be passed to the next stage, whether or not the timestamp is valid. If it is invalid, as in month 22 or day 33, it should get set to the default value, which is an optional property you can find and set when you double click the column.

Go with your latter format tag followed by a Transformer stage where you can do further tests, like IsValid() or IsValidTimestamp(), and reject records from there also.
Choose a job you love, and you will never have to work a day in your life. - Confucius
abc123
Premium Member
Premium Member
Posts: 605
Joined: Fri Aug 25, 2006 8:24 am

Post by abc123 »

Eric, that still doesn't answer his main question which is that the format string "%(m,s)/%(d,s)/%yyyy %hh:%nn:%ss" should cause the 2nd record to fail and it doesn't.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It appears that both (d,s) and (m,s) are checking only for a one- or two-digit number, without performing any range check.

If you think this is a bug, please contact IBM, get their take on it, and let us know.

Anyone else like to test it using other versions?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

abc123: The 2nd format tag is more accepting than the first... Please read my answer a few more times, test it yourself, and compare the results you see with the documentation about the format tags.
Choose a job you love, and you will never have to work a day in your life. - Confucius
Post Reply