We are encountering a 'Buffer Overflow' condition when reading a sequential file created by an IBM mainframe system. When a HEX 00 value is encountered, DataStage seems not to recognize it but treats it as end without using an end of file mark. The next record is then shifted over to begin at that position. How can we identify this HEX 00 character and replace it during the sequential file input stage?
Thanks
Buffer Overflow Reading Input Record Contining HEX 00 Value
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 467
- Joined: Tue Mar 20, 2007 6:36 am
- Location: Chennai
- Contact:
Write a small script which deletes the '0x00' character or replaces it with '0x20' as Ray pointed. Then use this script as a pre-processing step for the job (You can call it from the before job routine).
Minhajuddin
<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
I would be asking why you're getting 0x00 in your data to start with.
Is the value found in a character field? If so, are you receiving EBCDIC data that should be flagged as such?
If the value is found in a 'binary' field such as an intger type, are you defining the field correctly in the columns section? You may have to sepcify the number of bytes you're expecting in the input file for these fields.
How did you derive your columns, from a PL1/Cobol Copybook file?
Is the value found in a character field? If so, are you receiving EBCDIC data that should be flagged as such?
If the value is found in a 'binary' field such as an intger type, are you defining the field correctly in the columns section? You may have to sepcify the number of bytes you're expecting in the input file for these fields.
How did you derive your columns, from a PL1/Cobol Copybook file?