Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Need cobol logic for the below problem

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> HomeWorks & Requests
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    Post subject: Need cobol logic for the below problem
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: 1439
Location: Bangalore,India

PostPosted: Fri Jul 13, 2007 3:31 pm    Post subject:
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    Post subject: Re: Need cobol logic for the below problem
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: 1439
Location: Bangalore,India

PostPosted: Fri Jul 13, 2007 3:38 pm    Post subject:
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    Post subject: Re: Need cobol logic for the below problem
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: 3158
Location: Tucson AZ

PostPosted: Fri Jul 13, 2007 3:55 pm    Post subject: Re: Need cobol logic for the below problem
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    Post subject: Re: Need cobol logic for the below problem
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: 3158
Location: Tucson AZ

PostPosted: Fri Jul 13, 2007 4:16 pm    Post subject:
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: 1439
Location: Bangalore,India

PostPosted: Fri Jul 13, 2007 4:41 pm    Post subject:
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

Site Director


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

PostPosted: Fri Jul 13, 2007 10:09 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> HomeWorks & Requests All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Is CICS BMS logic on z/OS different ... Andi1982 CICS 2 Fri Dec 01, 2017 1:56 pm
This topic is locked: you cannot edit posts or make replies. Cobol to fetch the content by using s... arunc55 COBOL Programming 4 Fri Nov 17, 2017 1:25 pm
No new posts VBS and VB, COBOL syntax is the same ... natt.sut COBOL Programming 3 Sun Nov 12, 2017 6:36 am
No new posts Having a problem FTP'ng to the MF pahiker All Other Mainframe Topics 2 Fri Nov 10, 2017 8:20 pm
No new posts COBOL - EXIT statement weird behavior anthony.pangestu COBOL Programming 0 Fri Oct 27, 2017 9:57 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us