View previous topic :: View next topic
|
Author |
Message |
jackal Currently Banned New User
Joined: 21 Jan 2006 Posts: 48 Location: india
|
|
|
|
Hi All,
I need one cobol logic where as two members cannot have money defined for them like :
1)mem1 10,000
2)mem2 5,0000
so mem1 can have amount defined and then mem2 could be having % defined(not amount again).Thanks in advance...... |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
jackal,
Need more explanation for your requirement. |
|
Back to top |
|
|
jackal Currently Banned New User
Joined: 21 Jan 2006 Posts: 48 Location: india
|
|
|
|
I mean to say that first mem can have an amount and second mem can have % but not amount... |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
jackal,
Quote: |
I mean to say that first mem can have an amount and second mem can have % but not amount... |
This is there in your original post.
How will you relate mem1 and mem2?
How many records are you expecting in the IP file? If more than 2 records (say mem3, mem4 ...... are also available in the file), how the comparision should be done? So need more sample data along with the expected OP. |
|
Back to top |
|
|
jackal Currently Banned New User
Joined: 21 Jan 2006 Posts: 48 Location: india
|
|
|
|
Only two recrods(mem1 and mem2)....
both are independent... |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
jackal wrote: |
so mem1 can have amount defined and then mem2 could be having % defined(not amount again). |
And what sort of calculation would you use to determine the percentage?
As a software developer, you should be able to write complete and accurate specs.....Without them how can you expect anybody to develop the logic required? |
|
Back to top |
|
|
jackal Currently Banned New User
Joined: 21 Jan 2006 Posts: 48 Location: india
|
|
|
|
Hi William,
It may be confusing for u because its a funda of obj orien cobol
but may be taken as
some where in code we have both % and amount so if we try to give amount to one mem and again to second it should thro an error..... |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
This is a spec?
Quote: |
some where in code we have both % and amount so if we try to give amount to one mem and again to second it should thro an error |
|
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Jackal,
Quote: |
some where in code we have both % and amount so if we try to give amount to one mem and again to second it should thro an error..... |
What exactly you are trying to achieve? Does your program creates OP from IP file or creates OP file directly (say by reading values from the user)?
Just wanted to know, is this for learning purpose or genuine business requirement?
As William said - you need to provide full info. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
From your last post
Quote: |
It may be confusing for u because its a funda of obj orien cobol |
It is not confusing because of "obj orien cobol". It is confusing because you have not described your requirement.
If you will post what you have in some detail (not just sketchy) and post what you want as output, we will be able to offer suggestions.
This
Quote: |
I need one cobol logic where as two members cannot have money defined for them like :
1)mem1 10,000
2)mem2 5,0000 |
provides nothing in the way of a requirements definition. |
|
Back to top |
|
|
|