Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Sequential file logic to take sum of percentage

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Sequential file logic to take sum of percentage
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: 1439
Location: Bangalore,India

PostPosted: Wed Oct 17, 2007 12:45 pm    Post subject:
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: 1105
Location: The Netherlands at Hole 19

PostPosted: Thu Oct 18, 2007 11:42 pm    Post subject:
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: 1105
Location: The Netherlands at Hole 19

PostPosted: Thu Oct 18, 2007 11:47 pm    Post subject:
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

Site Director


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

PostPosted: Fri Oct 19, 2007 12:01 am    Post subject:
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: 1105
Location: The Netherlands at Hole 19

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

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

Senior Member


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

PostPosted: Fri Oct 19, 2007 8:56 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am
No new posts Occurrence of various strings within ... TS70363 JCL & VSAM 1 Thu Apr 27, 2017 8:18 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us