Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in


BATCH Programs in CICS - more

Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
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    Post subject: BATCH Programs in CICS - more
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: 7869
Location: Bellevue, IA

PostPosted: Wed May 27, 2009 5:19 pm    Post subject:
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
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    Post subject: Reply to: BATCH Programs in CICS - more
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.

Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1


Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Can sending 5 MB data between cobol p... Kevin Vaz CICS 11 Tue Oct 18, 2016 4:50 pm
No new posts Single COPY CICS TS datasets and when... Kyle Carroll CICS 2 Tue Oct 11, 2016 9:47 pm
No new posts CICS VSAM RLS READ akodakka CICS 3 Tue Oct 04, 2016 3:09 pm
No new posts How to find a CICS resource used in C... Arunkumar Chandrasekaran CICS 8 Thu Sep 29, 2016 1:45 pm
No new posts DB2 Streaming Batch Processing Problem Manshadi DB2 4 Sat Sep 24, 2016 12:14 pm

Back to Top
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us