Good morning gurus.
In my cobol source file, I have a Sub-Record in Main-Record.Sub-Record contains 5 columns and this Sub-Record occurs for 6 times in Main-Record.I need to load this Sub-Record info into a seperate table.
My question is.....
How to load these 6 Sub-Records(containing 5 columns each) which are in a single row in source file,into my table as 6 seperate rows.(I have some other keys apart from these 5 columns to make each row unique).
thanks in advance,
Sub-Record occurs 6 times in main record....Cobol file
Moderators: chulett, rschirm, roy
Sub-Record occurs 6 times in main record....Cobol file
Thank you,
Anu
Anu
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Anu,anu123 wrote:Balaji,balajisr wrote:You can use row splitter to split your 6 concatenated subrecord rows into a 6 seperate rows.
Could you please elaborate a bit more on how to split them into 6 seperate rows...
lovejha2:
I work in that direction and let u update, thanks,
Row splitter is a stage which comes as part of plug in. It basically reads a string and splits the string into required number of columns of columns
Eg. Input String: 10x10y10z(Has three rows with two columns each concatenated into one string)
With "multiple lines" option in splitter stage
Your output will be
Key Col1
10 x
10 y
10 Z
You can view the documentation of this stage in plug in book shelf.
Anu,
If you have a copybook,just import it in DS (without the comments) and load it in a CFF stage.
The redefine columns will appear like regular ones.
You have to pay attention if the redefine is include in a occurs.
In that case the redefine column is set to the column of the first occurs.
You can fix that with the edit row command in the CFF stage.
If you have a copybook,just import it in DS (without the comments) and load it in a CFF stage.
The redefine columns will appear like regular ones.
You have to pay attention if the redefine is include in a occurs.
In that case the redefine column is set to the column of the first occurs.
You can fix that with the edit row command in the CFF stage.
thanks every one. I do not have Cobol File Definitions(.cfd). So Iam reading the source as a fixed width file from Sequential Stage.actually Sub-record is in OCCURS. I am working on to use Row-Splitter.thurmy34 wrote:Anu,
If you have a copybook,just import it in DS (without the comments) and load it in a CFF stage.
The redefine columns will appear like regular ones.
You have to pay attention if the redefine is include in a occurs.
In that case the redefine column is set to the column of the first occurs.
You can fix that with the edit row command in the CFF stage.
please guide if you have any other options...
thanks in advacne
Thank you,
Anu
Anu
Ray, can you please elaborate on this a little bit more..I use complex flat file stage for my cobol file and I''m interesting in knowing how repeating groups handling by CFF is to be done. Thanks in advance. -Vjray.wurlod wrote:If you use a Complex Flat File stage you can specify exactly how the repeating group is to be handled - in your case normalized.