Oracle table to cobol file output
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 37
- Joined: Wed Oct 29, 2014 10:48 pm
- Location: Ohio
Oracle table to cobol file output
Hi,
I have different oracle tables like:
-Policy info
-Vehicle info
-Driver info
-Insured info
I want to extract data from all these tables and put it in a cobol payout where data will be like
-policyinfo
-Corresponding vehicle info
-Corresponding driver info
-corresponding insured info
So my target file would not have a single format. Infact there will be corresponding records for each policy in the same file. I have a copybook as well for the target. Do I need to funnel all these seperate records from input and put it into a CFF stage. Will this take care of everything like packed decimal etc?
I have different oracle tables like:
-Policy info
-Vehicle info
-Driver info
-Insured info
I want to extract data from all these tables and put it in a cobol payout where data will be like
-policyinfo
-Corresponding vehicle info
-Corresponding driver info
-corresponding insured info
So my target file would not have a single format. Infact there will be corresponding records for each policy in the same file. I have a copybook as well for the target. Do I need to funnel all these seperate records from input and put it into a CFF stage. Will this take care of everything like packed decimal etc?
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Re: Oracle table to cobol file output
Yes. If configured correctly.udayanguha wrote:CFF stage. Will this take care of everything like packed decimal etc?
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.
-
- Premium Member
- Posts: 37
- Joined: Wed Oct 29, 2014 10:48 pm
- Location: Ohio
Hey priyadarshikunal,
If suppose I have a policy and 2 corresponding named insured for the policy. My policy record in the source is:
Pol_No, Transaction_dt
1234,20150102
Corresponding named insured records are:
Policy_no,F_Name,LName
1234,FNAME1,LNAME1
1234,FNAME2,LNAME2
What I want in my output is like
POL123420150102
INSFNAME1LNAME1
INSFNAME2LNAME2
where first 3 characters in the record tell the record type (POL for Policy, INS for named insured)
Now if you see I have 2 different record layouts in a single file. How do you suggest joining the data and in what layout should I present the data to CFF target stage?
If suppose I have a policy and 2 corresponding named insured for the policy. My policy record in the source is:
Pol_No, Transaction_dt
1234,20150102
Corresponding named insured records are:
Policy_no,F_Name,LName
1234,FNAME1,LNAME1
1234,FNAME2,LNAME2
What I want in my output is like
POL123420150102
INSFNAME1LNAME1
INSFNAME2LNAME2
where first 3 characters in the record tell the record type (POL for Policy, INS for named insured)
Now if you see I have 2 different record layouts in a single file. How do you suggest joining the data and in what layout should I present the data to CFF target stage?
-
- Premium Member
- Posts: 38
- Joined: Tue Jun 19, 2012 11:03 pm
- Location: India
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
And what have YOU tried? Is your requirement identical to udayanguha's? If not, you should really start your own thread.sharmabhavesh wrote:Any help on this? Even I am facing a same scenario with one of my code pieces.
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.
-
- Premium Member
- Posts: 38
- Joined: Tue Jun 19, 2012 11:03 pm
- Location: India
Yes, my problem is similar to UdayanGuha. I couldn't try much as I could not understand how to convert the different file records in a COBOL format. When I put the transformer between sequential file and CFF stage, I could not map the fields.
But yes, Udayanguha's scenario is quite similar to my problem.
But yes, Udayanguha's scenario is quite similar to my problem.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Premium Member
- Posts: 38
- Joined: Tue Jun 19, 2012 11:03 pm
- Location: India
Yes, quite similar is not identical. His is an insurance domain while mine is a banking domain. So the fields might be different but the transformation he is looking for is the same I am looking for.
If you still think I need to create a new thread, I will do that. But I think solution to his problem will give me sufficient input to solve my issue .
If you still think I need to create a new thread, I will do that. But I think solution to his problem will give me sufficient input to solve my issue .
-
- Premium Member
- Posts: 37
- Joined: Wed Oct 29, 2014 10:48 pm
- Location: Ohio
Uday,
You have two distinct design issues. The first should be solved in the Oracle table extract, where you link (key is policy number?) the records to be joined. Take a close look at doing this in your Oracle processes rather than in DataStage.
The second is mapping to your Cobol copybook. Your choice of stages is for the type of transformations you need, not for the Cobol formatting. Cobol copybook is going to be on your final output stage.
First step is to use the Table Definition import wizard to create your TD from the copybook text file. Next is to line up your type conversions to make sure your data is passed accurately. Finally, you need to look at your method for moving the file to the Cobol environment. All of that is technical for your platforms, not specific to DataStage.
You'll find general help on the FAQ here at viewtopic.php?t=143596 -- Using Mainframe Data. As you progress and find issues in the details, if the FAQ doesn't help post here and I (and others) might be able to help.
You have two distinct design issues. The first should be solved in the Oracle table extract, where you link (key is policy number?) the records to be joined. Take a close look at doing this in your Oracle processes rather than in DataStage.
The second is mapping to your Cobol copybook. Your choice of stages is for the type of transformations you need, not for the Cobol formatting. Cobol copybook is going to be on your final output stage.
First step is to use the Table Definition import wizard to create your TD from the copybook text file. Next is to line up your type conversions to make sure your data is passed accurately. Finally, you need to look at your method for moving the file to the Cobol environment. All of that is technical for your platforms, not specific to DataStage.
You'll find general help on the FAQ here at viewtopic.php?t=143596 -- Using Mainframe Data. As you progress and find issues in the details, if the FAQ doesn't help post here and I (and others) might be able to help.
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872