Multiple occurs depending on clause
Posted: Tue Jan 11, 2011 5:47 am
Hi,
I am having this strange issue with Datastage when I am reading a complex flat file(mainframe file) with multiple occurs depending on clause.
The file is a variable block file & it has got multiple occurs depending on clause.
here is the issue.
after each occurs value it is appending a space (I see this when I do view data). when I checked the data in the file the data Looked like "ABCDEFGH" and in the view data I get the data as [A B C D E F G H] which is causing the buffer over run error as mentioned below.
I am having this strange issue with Datastage when I am reading a complex flat file(mainframe file) with multiple occurs depending on clause.
The file is a variable block file & it has got multiple occurs depending on clause.
Code: Select all
Sample copy book.
01 Table
02 KeyFIeld PIC X(10).
02 Field1 PIC X(1).
02 FIELDA OCCURS 0 TO 30 TIMES DEPENDING ON FIELD1 PIC X(1).
02 Field2 PIC X(1).
02 FIELDB OCCURS 0 TO 30 TIMES DEPENDING ON FIELD2 PIC X(1).
02 Field3 PIC X(1).
02 FIELDC OCCURS 0 TO 30 TIMES DEPENDING ON FIELD3 PIC X(1).
here is the issue.
after each occurs value it is appending a space (I see this when I do view data). when I checked the data in the file the data Looked like "ABCDEFGH" and in the view data I get the data as [A B C D E F G H] which is causing the buffer over run error as mentioned below.
Any suggestions or help would be greatly appreciated.Input buffer overrun at field FIELDC, at offset 132