Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

General Question about obtaining information

Status
Not open for further replies.

bebbo

Programmer
Dec 5, 2000
621
GB
I've got many events and many payment-methods. Each event has many event payment methods, with a key of event and payement method. What's the easiest way to get a list of payment methods that are used on all events?

01 EVENT PIC 9(9).

01METHOD PIC XX.

01 EVPAYMTH .
03 EVP-EVENT PIC 9(9).
03 EVP-METHOD PIC XX.

 
Hi bebbo,

I know you say it's a general question, but a few more specifics would help.

WHERE have you got this information? In a File? In a Database? In a Table somewhere else in your program? And WHERE do want the list? In your program? On paper?

Enjoy,
Tony

------------------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading FAQ222-2244 before you ask a question.
 
Sorry, I'm asking this question on behalf of a colleague.

Basically its a question of the most efficient way of doing this.

These are keyed files Event key of Event, Payment Method key of Method and Eventpayment key of Event and Method (ie both foreign keys) in that order.

Given an infinite list of events, I want to generate an infinite list of payment methods only for Payment methods that occur on every eventpayment.
 
Hi bebbo,

I think I understand your data structure. What I don't see is where you want this list - in a program for further processing, or on a report for people to look at.

If you just want a report, Cobol is not necessarily the tool of choice. What environment is your colleague working in (mainframe, unix, pc)? And what file system/database type are your files held in?

And if you want this in a program, how many 'infinite' events and payment methods are we really talking about? 100? 1,000,000? 100,000,000?

Enjoy,
Tony

------------------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading FAQ222-2244 before you ask a question.
 
Hi

It's a UNIX environment. However my colleague was just rying to work out a logical way of doing this function. Eventually it will be held in some sort of file but that wasn't the issue.

Thanks for your assistants anyway. Sorry if I've been vague
 
Hi bebbo,

Unix isn't my strongest area, but my point was really that the most efficient way of doing it depends on the data structure amongst other things. You might do it one way with Oracle, a different way with a flat file, and you would likely only use Cobol if you wanted the data in a Cobol program (and even then it might be more efficient to do it outside the program). If the volumes are very large you might have to resort to some complex techniques which wouldn't be required for smaller volumes.

There really isn't a general answer to the question. Sorry not to be more help.

Enjoy,
Tony

------------------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading FAQ222-2244 before you ask a question.
 
Thanks anyway. To be honest I'm not too sure what my colleague is exactly after. Thanks
 
Hi bebbo,

Your colleague can find answers better and quicker if/she can find the time to ask questions directly on this forum. Tell your colleague we don't bite.[angel]

Dimandja
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top