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

 

USE count of CEMT for static call

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
dudenithy

New User


Joined: 02 Mar 2012
Posts: 48
Location: India

PostPosted: Tue Nov 19, 2013 10:25 pm    Post subject: USE count of CEMT for static call
Reply with quote

Hello All,

I understand that USE counter of a CICS program that was called in Dynamic mode through main program will increase the USE counter (if we inquire that program via CEMT). May i know whether the USE counter of CICS program will also be increased when it is called in Static mode through main program.

Thanks for replying.
Back to top
View user's profile Send private message

Bill O'Boyle

CICS Moderator


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

PostPosted: Tue Nov 19, 2013 10:37 pm    Post subject: Reply to: USE count of CEMT for static call
Reply with quote

Static Calls don't require a PPT entry and therefore, you won't find it when you issue a CEMT INQ PROG(),

If for whatever reason, there is a PPT entry, because Statically Called modules are merged with the caller, suffice to say a CEMT INQ PROG will show a USECOUNT of ZERO.

As a sidenote, be sure to pass re-entrant storage from the Caller to be used in the Statically Called sub-program. Otherwise, when two or more tasks attempting to use the same storage defined in WORKING-STORAGE of the Statically Called sub-program, battle for this storage, you'll windup with some surprising results.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Nov 19, 2013 11:24 pm    Post subject:
Reply with quote

Hello,

Just FYI, but it appears that you asked the same thing twice . . . icon_confused.gif
Back to top
View user's profile Send private message
dudenithy

New User


Joined: 02 Mar 2012
Posts: 48
Location: India

PostPosted: Wed Nov 20, 2013 3:33 am    Post subject:
Reply with quote

Hi Bill, I ll put in this way,, PGM A calls PGM B, I inquire PGM B via CEMT, its USE count is always increasing when ever i initiate PGM A which in turn calls PGM B with the command CALL PGMB USING XXX. In compile option of PGM A, i could see compile option NODYNAM. Hence i confirm PGM B is a static call from PGM A. So i surprise, even for static call, PGM B USE count is increasing. Is that corrrect that even for static call, USE count is getting increased?
Back to top
View user's profile Send private message
dudenithy

New User


Joined: 02 Mar 2012
Posts: 48
Location: India

PostPosted: Wed Nov 20, 2013 3:35 am    Post subject:
Reply with quote

Hello Dick, Did I icon_confused.gif I could see only one icon_smile.gif
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


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

PostPosted: Wed Nov 20, 2013 6:56 am    Post subject: Reply to: USE count of CEMT for static call
Reply with quote

The required compiler option for CICS/COBOL is NODYNAM. So, to determine whether a program is CALLED Statically, it would be a CALL 'LITERAL', whereas, a CALL 'IDENTIFIER' (a WS field with the sub-program name) would be the CICS implementation of a Dynamic Call. The latter is where you'll see the USECOUNT of PGM B increasing as it has it's own PPT entry (CALL 'IDENTIFIER') as it's CALLED from PGM A.

HTH....
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Nov 20, 2013 8:46 am    Post subject:
Reply with quote

Hello,

Quote:
Hello Dick, Did I icon_confused.gif I could see only one icon_smile.gif
The way I read your question, I thought you were asking an OR question and both sides were the same . . .

Sorry 'bout that if I misunderstood.
Back to top
View user's profile Send private message
dudenithy

New User


Joined: 02 Mar 2012
Posts: 48
Location: India

PostPosted: Wed Nov 20, 2013 1:49 pm    Post subject:
Reply with quote

Hi Bill, yes, my PGM A calls PGM B using WS identifier, so as per you, for CICS; its a dynamic call, and thats why USE counter is increased.
My question 1:But do you also agree if PGM A calls PGM B using literal, then USE counter will not increase?

Now comes to long debate on difference between static vs dynamic, what so far i thought was, neverthless if you call PGM B with WS identifier which has value as 'PGM B', compiler option DYNAM or NODYNAM differentiates the call should be static or dynamic.

Before posting this, i have looked again many posts relates to this,

http://ibmmainframes.com/viewtopic.php?t=47347&highlight=call+static+dynamic
one of the reply from Dick in this post is:
When a CALL is made via a WS variable it is not resolved during the linkedit and will be resolved at execution - i.e. dynamically.

To have a good understanding, may i ask you further questions, this post might be helpful for others who also have concerns on this topic icon_smile.gif

2. If call using literal is always static when opion is NODYNAM ?
3. If call using literal is always dynamic when opion is DYNAM ?
4. If call using identifier (pgm name in identifier was declared in Working storage section) is always dynamic neverthless option is DYNAM/NODYNAM ?
5. If call using identifier (pgm name in identifier was populated in procedure division) is always dynamic neverthless option is DYNAM/NODYNAM ?

Thanks for answering icon_smile.gif
Back to top
View user's profile Send private message
dudenithy

New User


Joined: 02 Mar 2012
Posts: 48
Location: India

PostPosted: Mon Nov 25, 2013 4:34 pm    Post subject:
Reply with quote

Hi Bill / Dick,,
awaiting for your reply icon_rolleyes.gif
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1278
Location: Belgium

PostPosted: Mon Nov 25, 2013 6:09 pm    Post subject:
Reply with quote

1. depends on DYNAM
2,3,4,5. yes,yes,yes,yes

Cobol does not check whether an identifier is variable or constant. hence only "call literal" are candidates for static calls and are by default static calls, unless you override this default by using DYNAM as a compile option. Then these are also dynamic calls.
Code:

                   +---------+---------+
                   | NODYNAM |  DYNAM  |
+------------------+---------+---------+
| call 'literal'   |  Static | dynamic |
+------------------+---------+---------+
| call identifier  | dynamic | dynamic |
+------------------+---------+---------+
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


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

PostPosted: Mon Nov 25, 2013 6:18 pm    Post subject: Reply to: USE count of CEMT for static call
Reply with quote

GuyC,

Compiler option "NODYNAM" must be used for CICS/COBOL programs. The "DYNAM" option is for Batch and invokes z/OS services (IE: an SVC), whereas, "NODYNAM" in CICS/COBOL uses a CICS "Under the Covers" method of a Dynamic Call (using a PPT entry, a "LOAD PROGRAM" API and a VCON) and does NOT invoke z/OS services.

Regards,
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1278
Location: Belgium

PostPosted: Mon Nov 25, 2013 6:43 pm    Post subject:
Reply with quote

yes, I lost track of "CICS must use NODYNAM" while focusing on static/dynamic thing.
so the answer on 1. is also yes, because NODYNAM is the only possible option.

Thx, Bill
Back to top
View user's profile Send private message
dudenithy

New User


Joined: 02 Mar 2012
Posts: 48
Location: India

PostPosted: Tue Nov 26, 2013 1:38 pm    Post subject:
Reply with quote

Thanks everyone icon_smile.gif It is clear to me now,, hope it will be useful for other guys also who have confusion on this topic icon_smile.gif
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 abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm
No new posts Cobol EZASOKET call to SETSOCKOPT fails Andi1982 COBOL Programming 6 Thu Oct 06, 2016 7:12 pm
No new posts Strange EXEC function call in z/VM Willy Jensen CLIST & REXX 3 Wed Oct 05, 2016 2:07 pm
No new posts Get Record count in summary record fo... Atul Banke DFSORT/ICETOOL 21 Fri Sep 23, 2016 4:17 pm
No new posts COBOL DB2 - CALL statement - high CPU... TS70363 DB2 15 Sun Sep 11, 2016 6:07 am


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