Complex Flat File-Occurs clause Issue
Moderators: chulett, rschirm, roy
Complex Flat File-Occurs clause Issue
Hi
I am loading metadata definitiion from the cobol copy to my Complex Flat File. The copbol copy book has a structure of one of the field as OCCURS ........
DEPENDING ON ..... INDEXED BY .....
My question is How to define this field? Should it be a GROUP. How to define the range in the Occurs clause. I have seen that we can give only one value in the Occurs clause of the Complex Flat file. Also how to give the Indexd by clause
Please help me in this regard
Thanks
I am loading metadata definitiion from the cobol copy to my Complex Flat File. The copbol copy book has a structure of one of the field as OCCURS ........
DEPENDING ON ..... INDEXED BY .....
My question is How to define this field? Should it be a GROUP. How to define the range in the Occurs clause. I have seen that we can give only one value in the Occurs clause of the Complex Flat file. Also how to give the Indexd by clause
Please help me in this regard
Thanks
Avishek Mukherjee
Data Integration Architect
Chicago, IL, USA.
Data Integration Architect
Chicago, IL, USA.
Re: Complex Flat File-Occurs clause Issue
Sorry that my team mate already posted this in DSXchange. Still we didnt get one answer. It would be great if somebody can suggest resolution. As Ray told "OCCURS DEPENDING ON " is not supported. Any other way we can get round this problemavi21st wrote:Hi
I am loading metadata definitiion from the cobol copy to my Complex Flat File. The copbol copy book has a structure of one of the field as OCCURS ........
DEPENDING ON ..... INDEXED BY .....
My question is How to define this field? Should it be a GROUP. How to define the range in the Occurs clause. I have seen that we can give only one value in the Occurs clause of the Complex Flat file. Also how to give the Indexd by clause
Please help me in this regard
Thanks
Avishek Mukherjee
Data Integration Architect
Chicago, IL, USA.
Data Integration Architect
Chicago, IL, USA.
I don't know where you found Ray's post stating that the COBOL "OCCURS DEPENDING ON" is not supported; but that is not the case, it is implemented and supported (albeit not well). The Parallel Job Developer's Guide has several examples.
You can also use a hybrid solution by using a server job to process your CFF and write to a sequential file which can then be read by a EE job if you prefer that - the sequential file can even be a pipe to minimize disk I/O.
You can also use a hybrid solution by using a server job to process your CFF and write to a sequential file which can then be read by a EE job if you prefer that - the sequential file can even be a pipe to minimize disk I/O.
re: solution
A column that contains an OCCURS DEPENDING ON clause may be flattened
when it is either the last column, or it is followed only by
subordinate columns and none of the following columns contain an
OCCURS DEPENDING ON clause. In all other cases, a column containing
an OCCURS DEPENDING ON clause must be passed as is
so guys this all about occurs depending on in documentation
so how can i implement this particular scenario
05 ICD-4500-PROC-RANGE-CNTR PIC 9(03).
05 ICD-4500-PROCEDURE-RANGES
OCCURS 0 TO 200 TIMES
DEPENDING ON ICD-4500-PROC-RANGE-CNTR
INDEXED BY PROC-RNG-INDEX.
10 ICD-4500-PROC-BEGIN-RANGE PIC X(05).
10 ICD-4500-PROC-END-RANGE PIC X(05).
so gurus anyone can give me solution it would be great
its not about flattening i can't see those column 200 times in the output to map
and also in this scenario which column would be occuring 200 times
procedure ranges or PROC-BEGIN-RANGE and PROC-END-RANGE
thanks
when it is either the last column, or it is followed only by
subordinate columns and none of the following columns contain an
OCCURS DEPENDING ON clause. In all other cases, a column containing
an OCCURS DEPENDING ON clause must be passed as is
so guys this all about occurs depending on in documentation
so how can i implement this particular scenario
05 ICD-4500-PROC-RANGE-CNTR PIC 9(03).
05 ICD-4500-PROCEDURE-RANGES
OCCURS 0 TO 200 TIMES
DEPENDING ON ICD-4500-PROC-RANGE-CNTR
INDEXED BY PROC-RNG-INDEX.
10 ICD-4500-PROC-BEGIN-RANGE PIC X(05).
10 ICD-4500-PROC-END-RANGE PIC X(05).
so gurus anyone can give me solution it would be great
its not about flattening i can't see those column 200 times in the output to map
and also in this scenario which column would be occuring 200 times
procedure ranges or PROC-BEGIN-RANGE and PROC-END-RANGE
thanks
re;question
I also have a question that
OCCURS DEPENDING CLAUSE could be implemented in server jobs
does it support if so
whats the approach and also
if i the file has bad data how can i capture as i am using a reject link from the transformer to capture them down to a sequential file but i could'nt
what's the best approach that i could capture them
thanks
OCCURS DEPENDING CLAUSE could be implemented in server jobs
does it support if so
whats the approach and also
if i the file has bad data how can i capture as i am using a reject link from the transformer to capture them down to a sequential file but i could'nt
what's the best approach that i could capture them
thanks
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The Complex Flat File stage supports "fixed OCCURS with no DEPENDING ON clause".
Technical Bulletin Part No. 000-6921 Ascential DataStage Complex Flat File Stage (CFFStage.pdf installed with version 7.5x2, page 2-3)
Technical Bulletin Part No. 000-6921 Ascential DataStage Complex Flat File Stage (CFFStage.pdf installed with version 7.5x2, page 2-3)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Hi,
Just went through the same pain of trying to figure out if Datastage server could handle occurs depending on(ODO)clauses - we were looking at Adabas data. We got Ascential support involved and the conclusion from Datastage support was
- Datastage server can handle ODO, however you need to create a seperate output stream from your Complex Flat file stage for each number of occurences . i.e. If your ODO repeats 1 to 3 times then you would have 3 output links from your stage, 1 with the columns defined for all non repeating fields plus the repeating group columns repeated once, the 2nd with the columns defined for all non repeating fields plus the repeating group columns repeated twice and so on. For our purposes this wasn't feasible as we had multiple(up to 24) ODO clauses in a single file and each one could occur up to 191 times. From your description I'm not sure if it would be feasible either as you would need 200 output streams
- Enterpise Edition can handle ODO quite nicely though. We did a proof of concept using EE trying to convince the client to buy EE and it worked quite well(the job, not convincing the client). Using EE basically in a sequential file stage you define each ODO as a variable vector and each column within the repeating group as a subrecord of that vector. The orch defintion looks as follows
For your ODO group
the Parallel metadata would look like
To output the columns within the ODO you would need to use a promote sub record stage
Cheers,
Lawrence
Just went through the same pain of trying to figure out if Datastage server could handle occurs depending on(ODO)clauses - we were looking at Adabas data. We got Ascential support involved and the conclusion from Datastage support was
- Datastage server can handle ODO, however you need to create a seperate output stream from your Complex Flat file stage for each number of occurences . i.e. If your ODO repeats 1 to 3 times then you would have 3 output links from your stage, 1 with the columns defined for all non repeating fields plus the repeating group columns repeated once, the 2nd with the columns defined for all non repeating fields plus the repeating group columns repeated twice and so on. For our purposes this wasn't feasible as we had multiple(up to 24) ODO clauses in a single file and each one could occur up to 191 times. From your description I'm not sure if it would be feasible either as you would need 200 output streams
- Enterpise Edition can handle ODO quite nicely though. We did a proof of concept using EE trying to convince the client to buy EE and it worked quite well(the job, not convincing the client). Using EE basically in a sequential file stage you define each ODO as a variable vector and each column within the repeating group as a subrecord of that vector. The orch defintion looks as follows
For your ODO group
Code: Select all
05 ICD-4500-PROC-RANGE-CNTR PIC 9(03).
05 ICD-4500-PROCEDURE-RANGES
OCCURS 0 TO 200 TIMES
DEPENDING ON ICD-4500-PROC-RANGE-CNTR
INDEXED BY PROC-RNG-INDEX.
10 ICD-4500-PROC-BEGIN-RANGE PIC X(05).
10 ICD-4500-PROC-END-RANGE PIC X(05).
Code: Select all
ICD_4500_PROC_RANGE_CNTR:int8 {link_keep};
ICD_4500_PROCEDURE_RANGES[]:subrec {reference='ICD_4500_PROC_RANGE_CNTR'} (
ICD_4500_PROC_BEGIN_RANGE:string[5];
ICD-4500-PROC-END_RANGE:string[5];
);
Cheers,
Lawrence