Page 1 of 1

Buffer Overflow Reading Input Record Contining HEX 00 Value

Posted: Tue Jun 10, 2008 6:32 pm
by nbdbzv4
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

Posted: Tue Jun 10, 2008 6:41 pm
by ray.wurlod
Try changing APT_STRING_PADCHAR to something other than 0x00 (for example 0x20 which is a space character). This may or may not work.

Posted: Tue Jun 10, 2008 11:28 pm
by Minhajuddin
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).

Posted: Wed Jun 11, 2008 5:22 am
by OddJob
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?