Multiple occurs depending on clause

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
hitmanthesilentassasin
Participant
Posts: 150
Joined: Tue Mar 13, 2007 1:17 am

Multiple occurs depending on clause

Post 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.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
hitmanthesilentassasin
Participant
Posts: 150
Joined: Tue Mar 13, 2007 1:17 am

Post 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?
Post Reply