View previous topic :: View next topic
|
Author |
Message |
alireza_big
New User
Joined: 16 Jun 2005 Posts: 4
|
|
|
|
Hi there
How can I convert a batch program to online?
I want to know what major changes should be done in the batch program to be online.
Generally what's difference between a batch program and online?
It would be so appreciated to answer me asap. |
|
Back to top |
|
|
sangiah
New User
Joined: 10 Jun 2005 Posts: 62
|
|
|
|
BATCH programs runs in TSO environment which does not require user interaction. Normaly a sequential processing where there will a be start and end point without any interaction/break.
Example of Batch processing :: Printing of Credit card statement
Where as the Online programs are mainly OLTPs(OnLine Transaction Processing) which mainly runs in CICS (Customer Information Communication System).
Online programs are mostly written in psuedo programming method where information will be thrown to the screen and the resources will be released immediately.
Example for online program is : Getting/Updating Customer Name and Address for a credit card system |
|
Back to top |
|
|
alireza_big
New User
Joined: 16 Jun 2005 Posts: 4
|
|
|
|
Dear sangiah
If I want to write a batch program (for example printCreditCard) What changes should be done?
Thanks again |
|
Back to top |
|
|
sangiah
New User
Joined: 10 Jun 2005 Posts: 62
|
|
|
|
I did not get your question.
In this case (print credit card statement).
There will be 1 input file (credit card master file ) 1 output print file.
The program reads input file 1 by 1 and based on some conditions (like whether this card needs to be statmented) it format the report and output to the print file |
|
Back to top |
|
|
Sahban I.setioko
New User
Joined: 14 Oct 2005 Posts: 1
|
|
|
|
Hi folk,
I got JCL which will execute a COBOL program to update online files.
Before execute the program, I insert WTOR to ask operator closing some online files.
But some time they ignore the WTOR, program will abend if files have not been closed.
Could I create a program to close online files or execute online trans-id initiated by batch program ? How it will be done ?
Thanks in advance,
Sahban |
|
Back to top |
|
|
dneufarth
Active User
Joined: 27 Apr 2005 Posts: 419 Location: Inside the SPEW (Southwest Ohio, USA)
|
|
|
|
in the average environment batch and online vary mostly in handling of input/output. Batch file definitions are in your program. Online programs usually interact with CICS which manges file i/o. Obviously interactive communications should be non-existent in batch.
Dave |
|
Back to top |
|
|
asawari
New User
Joined: 04 Oct 2005 Posts: 2
|
|
|
|
Hi!
Don't know whether this is related to the same topic or not.
I have three batch programs. Pgm A: main program. Pgm A should initiate program B and Pgm C (these are also batch programs) as two independant tasks. And also it should be able to simulataneously monitor these two programs. If any of them abends, A should restart it.
Is this possible with Batch programming? If not, is there any other way of handling this situation? |
|
Back to top |
|
|
Sridevi_C
Active User
Joined: 22 Sep 2005 Posts: 104 Location: Concord, New Hampshire, USA.
|
|
|
|
Hi Asawari,
The CALL statement in COBOL , can call only one subprogram at one time.So calling 2 subprograms simultaneously is NOT possible.
Regards,
Sridevi. |
|
Back to top |
|
|
asawari
New User
Joined: 04 Oct 2005 Posts: 2
|
|
|
|
Well Thanks Sridevi!
But can anyone suggest me a solution to handle this? I'll explain the required functionality...
I need to write 3 programs - A, B and C.
Pgm A is main controller program. Its functions are:
1. Invoke B and C as two independent tasks
2. Monitor B and C to be up and running. If any of them has abended restart them
3. Write logs whenever required.
Program B and C are batch programs doing some I/O.
Is it possible to have multiple DC batch programs running in same address space?
Is it possible for an online COBOL program to call batch COBOL programs and to monitor them?
Regards,
Asawari |
|
Back to top |
|
|
paulstephen
New User
Joined: 20 Oct 2005 Posts: 20 Location: Chennai
|
|
|
|
Sridevi,
I think he is speaking of online programs.
In this case its possible to invoke 2 tasks using start staement.
In case of any abends u can handle it and again make it initiate that task.
But this would be very dangerous, coz will sometime end in endless looping |
|
Back to top |
|
|
Sridevi_C
Active User
Joined: 22 Sep 2005 Posts: 104 Location: Concord, New Hampshire, USA.
|
|
|
|
Hi,
Paul stephen,
Asawari's previous post talks specifically ONLY about BATCH pgm and hence my reply.
Asawari,
Your question:Is it possible for an online COBOL program to call batch COBOL programs and to monitor them?
Answer:Yes you can call batch pgms from online pgms.
Regards,
Sridevi. |
|
Back to top |
|
|
|