Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 8154
Location: East Dubuque, Illinois, USA

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: 2504
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 FUSE - IBM MQ - CICS integration error Kevin Vaz CICS 1 Mon Sep 18, 2017 4:31 pm
No new posts Generate public-private key in batch ... vasanthz All Other Mainframe Topics 3 Fri Sep 15, 2017 9:20 am
No new posts Working with hex values in Filemanage... Emile Straker IBM Tools 0 Tue Sep 12, 2017 1:42 am
No new posts PLI - printing from multiple programs Pedro PL/I & Assembler 8 Fri Sep 08, 2017 6:36 am
No new posts Julian Date to CICS ABSTTIME blayek CICS 3 Wed Aug 30, 2017 11:15 pm

Back to Top
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us