View previous topic :: View next topic
|
Author |
Message |
Pradeepshan
New User
Joined: 20 Jan 2006 Posts: 6 Location: bangalore
|
|
|
|
Here is a sinario please help me out :
1>
I have a sequential file : inputfile
Contains :
Cust ID
Invoice no
Date
Quantity occurs 5 times
Items occurs 5 time
2>
I have a DB2 table 1 : Cust_table
Contains :
Cust ID
Cust name
3>
I have another DB2 table: Price_table
Contains :
Item name
Price (Unit price)
Now I need to generate a report in the following format
------------------------------------------------------------------------------------
Cust ID Name Invoice No item quantity price total
12333 ssssss 11111 pen 2 10 20
book 1 20 20
Grand total : 40
------------------------------------------------------------------------------------
plpease send me the program for this with clear exlanation.
cn also send it to my mail ID :<<E-Mail ID Removed>> Read Forum Rules.Thank you |
|
Back to top |
|
|
anamikak
New User
Joined: 10 May 2006 Posts: 64 Location: Singapore
|
|
|
|
Just wondering, if you have given it a try? |
|
Back to top |
|
|
cramakrishnan
New User
Joined: 30 Jul 2006 Posts: 3
|
|
|
|
I am not clear with the output...
Here is my doubt on this...
The input file has a occurs clause on the quantity and the price, But the output report doesnt contain the 5 occurs of the input...
The output report must be like...
Cust ID Name Invoice No item q1 q2 a3 a4 a5 p1 p2 p3 p4 p5 total
If there is no occurs, the below solution might work...
Using DSNTIAUL download the cust table and price table to a dataset...
Use the splice operator of the sort to merge the records of the input file to the cust table and price table datasets to get the desired output...
Before using splice operator move the cust id and item fields appropriately to match the columns in the input file...
Hope this helps...
On the other hand you could take this file to the cobol program. Move it to a temporary table. Join with the cust table and price table to get the desired output... |
|
Back to top |
|
|
|