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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combining Batch and Interactive programs

Status
Not open for further replies.

cindysue35

Technical User
Oct 24, 2006
2
US
Hello -
I am just beginning with Cobol programming and have a question. I have done both batch type programs and interactive programs but now I need to combine the two - can this be done? I have been researching it and not able to find any help? Thanks!
 
Can you explain what you mean by "combine the two?"

While you are replying, please specify what computing platform and what compiler you are using. That will direct us to a better answer.

Tom Morrison
 
Thanks for your response. I am using MicroFocus NetExpress 4.0.
I'm sorry for the confusion - here is what I would like to do. Write an interactive program that will allow me to key in and display some information - for example, a customer number, quantity of items purchased, the price of the item and the total cost of all the items purchased. (I am going to be starting an at home business and am trying to get comfortable with programming) I know how to create this piece of the program. Where I run into issues is when I want to output to a file (that is located on my c: for instance) just the customer number and the total cost of all of the items purchased?
Since I am so new at this, please let me know if I need to clarify any further.
 
Yes, we need clarification. Specifically, what is the nature of this output file, and what will be done with it later?
 

A simple solution would be to set up and open an indexed file for input output (I-O). You could then maintain records interactively on the file as well as carrying out batch processing

 
The answer to you question is: modules.
Create separate modules for:
- file I/O
- screen I/O
- business-logic (calculate-order-point / create-invoice / etc etc)

Your main online/batch/webservice program is just a driver for your modules.

A businessrip to legoland might be usefull ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top