Page 7 of 7

Posted: Wed Nov 28, 2018 10:19 am
by FranklinE
The simple part is that DataStage does not handle OCCURS DEPENDING. I don't know the details for that, but it just doesn't.

Ernie's suggestion is to use the Server sequential file stage, because it is less restrictive than the Parallel stage.

Posted: Wed Nov 28, 2018 10:45 am
by rumu
Datastage documentation says, it supports OCCURS DEPENDING ON . In the example also it mentioned OCCURS DEPENDING ON..For other segments which uses, 0 TO 4 or 0 TO 6, I could see in the metadata.

Posted: Wed Nov 28, 2018 11:32 am
by chulett
Rumu - IMHO, it is WAY past time to involve your official support provider in all this if you haven't done so already. Especially for stuff like your OCCURS DEPENDING ON question.

Should be obvious but the reason you are "unable to read" Ernie's detailed post is because it is Premium Content. Without going into the merits of it, especially for seeing full replies from folks like Ernie or Ray, you'd need to sign up for that. And if anyone "shared the entire post" that would be a pretty big no-no that I would be forced to nuke. FYI.

Posted: Wed Nov 28, 2018 11:35 am
by rumu
I modified the copy book with occurs depending on clause and could see in the cobol layout of metadata tab.
I imported the metadata with group column but in selection tab, I did not select the group column but used the flatten array option.

In the Record option, I selected Variable length, Big endian, Unix new line delimiter, EBCDIC data format and Binary type.

While running the job, it aborts with following warning:

Code: Select all

Transformer_1: Error when checking operator: When binding input interface field "CHD_HRSK_ACS_SEGMENT" to field "CHD_HRSK_ACS_SEGMENT": A variable-length vector is bound to a fixed-length vector input field.
Error when checking operator: When binding input interface field "CHD_CLIENT_PRODUCT_SMALL_1" to field "CHD_CLIENT_PRODUCT_SMALL_1": A variable-length vector is bound to a fixed-length vector input field.
Error when checking operator: When binding input interface field "CHD_CLIENT_PRODUCT_LARGE_1" to field "CHD_CLIENT_PRODUCT_LARGE_1": A variable-length vector is bound to a fixed-length vector input field.
here the columns are mentioned which are used in OCCURS depending clause as below:

Code: Select all

06  CHD-HRSK-ACS-SEGMENT OCCURS 0 TO 2 TIMES
00287A             DEPENDING ON CHD-NO-HRSK-ACS-SEGS  PIC X(200).
I searched the forum and in one post similar error was posted but with no resolution.
Can anybody throw any light on it?

Posted: Wed Nov 28, 2018 8:20 pm
by chulett
Official. Support. Provider.

OCCURS DEPENDING ON clarification

Posted: Fri Nov 30, 2018 5:56 pm
by ray.wurlod
The deal is that DataStage supports only one OCCURS DEPENDING ON clause. It does not support multiple OCCURS DEPENDING ON clauses.

Posted: Fri Nov 30, 2018 8:32 pm
by rumu
Thanks Ray for the confirmation. I raised this issue with IBM local support.
My cobol copy book has 5 ODO clause. Could you please suggest any alternative approach like some adjustment from source side? As ODO is there in the copybook, so the record is variable length. Can Mainframe make it fixed length(using Filler for the non occurrence columns)?

Posted: Tue Dec 04, 2018 1:05 am
by ray.wurlod
That's certainly a possibility, though probably a waste of resources or bandwidth. One approach would be to convert all (or all but one of the) ODO clauses into OCCURS 20 TIMES with fillers (obviously if you need more than 20 adjust accordingly). DataStage can handle any number of OCCURS clauses, but only one OCCURS DEPENDING ON clause.

Posted: Tue Dec 04, 2018 12:48 pm
by rumu
hi Ray,

If we convert all the ODO to Fixed OCCURS then it will be issue as the next available segments takes place of the previous ODO segment if it does not appear.