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

BATCH Programs in CICS - more


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

New User


Joined: 31 Jan 2008
Posts: 21
Location: Malaysia

PostPosted: Wed May 27, 2009 4:43 pm
Reply with quote

Sorry but more questions on Batch CICS programs

1. If I am calling BATCH programs from CICS Programs (and I have read the IBM RED BOOKS safe thread document and still trying to read all 378 pages of it) where does CICS get the storage for working storage for the CALLed or BATCH program as CICS will definately not do a GETMAIN for the working storage. What does CICS do when the CALLed program CALLs another BAtch program .

2. Do I have to initialise every field in working storage at the top of the CALLed program to be safe?

3. Is the CALLed program enq'd so that only one txn task goes through the pgm at once or is it allowing multiple tasks to execute the same CALLed module at the same time hence potenitlaly causing data integrity problems?

4. IS the working storage after the CALL clean or as it was hence availab le for the next task to use and the working storage values are left as the CALLed program exited I assume they are not released as the .

5. the BATCH programs are linked as REUSE but no RENT but the CICS programs are LINK as NOT RENT and NOT REUSE. I have checked the objects using IEHLIST and expanded the BIT MAP.

6. All the programs reside in ESDSA. I cannot see why the CICS program is not in ERDSA except for the fact it is not RENT and REUSE in the LINK and REUSE in the compile option.

7. how many LEVELS of CALL can I go down before I have problems?

We also do not use RENTPGM=PROTECT in CICS
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed May 27, 2009 5:19 pm
Reply with quote

I've read your post several times and I'm confused. What, exactly, are you attempting to do? How does threadsafe figure into that? For example, you say
Quote:
If I am calling BATCH programs from CICS Programs
and this doesn't make sense -- if a program is called from CICS it is a CICS program, whether or not there are any CICS API calls in the program. Batch programs use facilities (such as FD statements, OPEN, READ, WRITE, CLOSE in COBOL) that cause abends in CICS when invoked.

Threadsafety is nothing more or less than a method of ensuring that CICS transactions can run on multiple processors without causing race conditions, lockouts, or other bad things. It has nothing to do with batch programs.

And why would you be concerned about where CICS stores things in memory? Let CICS do its thing, you do the application programming, and let the world be happy.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Wed May 27, 2009 6:47 pm
Reply with quote

If you're concerned about WS being initialized each time the sub-program is invoked, code "PGMNAME" IS INITIAL.

Note that INITIAL only works against VALUE clauses. If there are fields without a VALUE clause, then these would need to be initialized manually.

The only issue you will have with a Threadsafe program calling your sub-program is a STATIC call, which I wouldn't recommend. Even though the NODYNAM option is required in CICS, a Dynamic Call in CICS is by virtue of a CALL "VARIABLE". A CALL "LITERAL" will be STATIC.

However (ambivalence aside), STATIC CALLS can work in Threadsafe environments, providing that you pass reusable WS from the Caller or use EXTERNAL WS, known throughout the run-unit. Passed WS and EXTERNAL WS must be manually initialized, regardless whether the call is DYNAMIC or STATIC.

Regards,
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 Calling an Open C library function in... CICS 1
No new posts How to 'Ping' a CICS region in JCL CICS 2
Search our Forums:

Back to Top