Page 1 of 1

Multiple occurs depending on clause

Posted: Tue Jan 11, 2011 5:47 am
by hitmanthesilentassasin
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.

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.
Input buffer overrun at field FIELDC, at offset 132
Any suggestions or help would be greatly appreciated.

Posted: Tue Jan 11, 2011 3:11 pm
by ray.wurlod
The CFF stage is documented as not handling more than one OCCURS DEPENDING ON clause. (I have not checked whether this limitation is removed in version 8.5.)

Posted: Tue Jan 11, 2011 3:18 pm
by hitmanthesilentassasin
Thanks Ray. I have already read this in the previous threads but couldn't find the right pdf. can you please point me the place to look for?