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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


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