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

Need cobol logic for the below problem


IBM Mainframe Forums -> HomeWorks & Requests
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jackal
Currently Banned

New User


Joined: 21 Jan 2006
Posts: 48
Location: india

PostPosted: Fri Jul 13, 2007 3:11 pm
Reply with quote

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
View user's profile Send private message
murmohk1

Senior Member


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

PostPosted: Fri Jul 13, 2007 3:31 pm
Reply with quote

jackal,

Need more explanation for your requirement.
Back to top
View user's profile Send private message
jackal
Currently Banned

New User


Joined: 21 Jan 2006
Posts: 48
Location: india

PostPosted: Fri Jul 13, 2007 3:32 pm
Reply with quote

I mean to say that first mem can have an amount and second mem can have % but not amount...
Back to top
View user's profile Send private message
murmohk1

Senior Member


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

PostPosted: Fri Jul 13, 2007 3:38 pm
Reply with quote

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
View user's profile Send private message
jackal
Currently Banned

New User


Joined: 21 Jan 2006
Posts: 48
Location: india

PostPosted: Fri Jul 13, 2007 3:44 pm
Reply with quote

Only two recrods(mem1 and mem2)....
both are independent...
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Fri Jul 13, 2007 3:55 pm
Reply with quote

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
View user's profile Send private message
jackal
Currently Banned

New User


Joined: 21 Jan 2006
Posts: 48
Location: india

PostPosted: Fri Jul 13, 2007 4:06 pm
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Fri Jul 13, 2007 4:16 pm
Reply with quote

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
View user's profile Send private message
murmohk1

Senior Member


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

PostPosted: Fri Jul 13, 2007 4:41 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Fri Jul 13, 2007 10:09 pm
Reply with quote

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
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 -> HomeWorks & Requests

 


Similar Topics
Topic Forum Replies
No new posts IDCAMS listcat service using cobol JCL & VSAM 1
No new posts Make cobol variable value a variable COBOL Programming 3
No new posts how to convert and use 1 bit hex-numb... COBOL Programming 10
No new posts VB file copy COBOL program gives erro... COBOL Programming 3
No new posts Problem while sending special charact... JCL & VSAM 4
Search our Forums:

Back to Top