IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

how to differentaite online program from batch program?


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kumar_jalluri

New User


Joined: 02 Jun 2005
Posts: 24
Location: PUNE

PostPosted: Tue Nov 14, 2006 9:46 pm
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Tue Nov 14, 2006 9:55 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Nov 15, 2006 1:15 am
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Nov 15, 2006 1:19 am
Reply with quote

of course accurate documentation and library separation would make it easier.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Nov 15, 2006 1:27 am
Reply with quote

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
View user's profile Send private message
toddnugen

New User


Joined: 01 Nov 2006
Posts: 9

PostPosted: Wed Nov 15, 2006 2:52 am
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Wed Nov 15, 2006 12:05 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts How to get a stack trace on a looping... ABENDS & Debugging 5
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
No new posts Help in Automating Batch JCL jobs mon... JCL & VSAM 3
No new posts DB2 Event passed to the Application P... DB2 1
Search our Forums:

Back to Top