View previous topic :: View next topic
|
Author |
Message |
kumar_jalluri
New User
Joined: 02 Jun 2005 Posts: 24 Location: PUNE
|
|
|
|
Hi can any one tell me, how can we differentiate online program from batch program?
I know we can write a batch program without any files ( no file section)
we can write a CICS sub prgram without any CICS commands in it?
So is there any way that we can distinguish these 2 programs by looking at the proagram?
Thanks in advance
regards |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
There is no way to differentiate by looking in the source code only.
One method is to check CICS libraries and locate the desired program in it. However, I've already seen shops where batch libraries were concatenated after the CICS libraries, because some shared routines were required.
Please remember that CICS program mustn't include EXEC CICS statements. You might, however, look for other characteristics of CICS, like pointers to DFHCOMMARE, TWA etc.
How do you define a program that is called by both CICS and batch?
O. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
A CICS program is invoked either by a start tranid, XCTL, or LINK. For a program properly return to CICS it must have a EXEC CICS Return.
A CICS module must be entered into the PCT.
A Batch module will not have any EXEC CICS ... instructions.
a module without EXEC CICS .... that is used on-line is invoked by a COBOL CALL; the return is effected by a GOBACK; the module is not in the PCT; the module can be used in batch.
CICS modules have EXEC CICS ... commands and go thru a CICS precompiler.
Batch modules have NO EXEC CICS commands.
You can not tell by looking at the source if a batch module is invoked by a CICS module using a COBOL CALL.
Scanning sources for EXEC CICS ... will not always return positive, because all the EXEC CICS command could be in copybooks. Products like Panvalet with the ++include allow copybooks to be expanded before the pre-compile step, in addition, the copybooks could be precompiled as a copybook, and then included with a copy compiler directive.
based on the above stated variations, you can create a matrix for your shop and start your searches. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
of course accurate documentation and library separation would make it easier. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Quote: |
Please remember that CICS program mustn't include EXEC CICS statements. You might, however, look for other characteristics of CICS, like pointers to DFHCOMMARE, TWA etc. |
not true. A CICS program has EXEC CICS commands.
Quote: |
How do you define a program that is called by both CICS and batch? |
batch |
|
Back to top |
|
|
toddnugen
New User
Joined: 01 Nov 2006 Posts: 9
|
|
|
|
Telling difference by having different names or libraries
Yes for batch program w/o files, and sub program w/o CICS commands. |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Quote: |
not true. A CICS program has EXEC CICS commands. |
We have an online application, contains about 500 modules. In this application, only 6 modules contain EXEC CICS commands. The rest of the programs has no EXEC CICS in them.
This was achieved through seperation of layers: Data access layer, Presentation layer and business layer. The EXEC CICS commands can be found in the following modules only:
1. RECIEVER - Recieves all maps
2. SENDER - Sends all maps
3. STRORAGE MANAGER - Manages queues
4. DATABASE MANAGER - Manages database access
5. PRESENTATION MANAGER - manages all presentation aspects.
6. NAVIGATOR - Navigates through all components.
A call for each of the above 6 modules is done by a service request, written in pure COBOL, with no EXEC CICS commands.
O. |
|
Back to top |
|
|
|