IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Sequential file logic to take sum of percentage


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
krishnasaikiah

New User


Joined: 14 Mar 2007
Posts: 24
Location: gurgaon

PostPosted: Wed Oct 17, 2007 12:41 pm
Reply with quote

I have a input file of four columns

region cc LOB Percentage
x1 y1 l1 0.5
x1 y1 l1 0.25
x1 y1 l1 0.2
x2 y2 l2 1

need a cobol program which takes region and cc as key.
it has to take sum of percentage of key (region and cc) for each combination.
if percentage is 1 copy all rows as it is in output file.
if sum is less than 1 then add a new row with same region and cc and lob
with the diffrence percentage so as to make it 1.

Please reply as soon as possible
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Wed Oct 17, 2007 12:45 pm
Reply with quote

Krishna,

Quote:
need a cobol program which takes region and cc as key.

Put your effort. If you are held at some point because of some reason.... we are always here.
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Thu Oct 18, 2007 11:42 pm
Reply with quote

Quote:
Put your effort. If you are held at some point because of some reason.... we are always here.


Murali, please explain your response. I'm lost icon_redface.gif
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Thu Oct 18, 2007 11:47 pm
Reply with quote

Krishna Saikiah,

This one looks like homework...... If you need a cobol program to solve it why don't you just write one? And when you do, don't forget your key-combination is not unique icon_idea.gif
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Oct 19, 2007 12:01 am
Reply with quote

Hello,

Quote:
If you need a cobol program to solve it why don't you just write one
When you have some code put together, post a reply here if there is something that does not work or you have questions about.

Quote:
And when you do, don't forget your key-combination is not unique
which is how you'll control summing.
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Fri Oct 19, 2007 12:03 am
Reply with quote

icon_wink.gif
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Fri Oct 19, 2007 8:56 am
Reply with quote

George,

Quote:
Murali, please explain your response. I'm lost


Quote:
If you need a cobol program to solve it why don't you just write one?

I believe icon_wink.gif, your post has the answer. icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top