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

CALL WS-PGM USING... IN CICS Program


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

Active User


Joined: 15 Dec 2005
Posts: 271

PostPosted: Thu Nov 12, 2009 10:52 am
Reply with quote

Hi all,

One of my friend coded CALL statement(Dynamic Call) in CICS using around 1MB of data from main program to sub program, The reason he said why he used CALL statement brought some discrepancies in my mind..

Reason:

Link/XCTL statement can't be used since the maximum storage of DFHCOMMAREA is 32K (correct)

Conflict:

CALL statement is used when the size of the program is small.(which i read some where)

In such case we can use VSAM file, or Channels/containers / MQ 's to do a data transfer. Please let me know your views.

Thanks,
Murali.[/img]
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: Fri Nov 13, 2009 3:57 am
Reply with quote

A "CALL" does not pass data. Instead, it passes the address of each parm in the calling program. In the sub-program, addressability to each passed-parm is performed for you by COBOL in the Prologue code. However, this not is true in Assembler, but that's a different story.

When addressing the data in a given "01" LINKAGE SECTION definition in the sub-program, you're actually addressing the data from the calling program. Sometimes, you'll hear "01" areas in LINKAGE referred to as DSECT's (Assembler Dummy Section) and to a certain extent, that's what they are.

In CICS, Dynamic Calls are serially reusable and would probably pass the test for Threadsafe, because WS is allocated for the sub-program upon each CALL. If you code "IS INITIAL" after the Program-Id, then any WS that contains a VALUE clause will be initialized to this value.

But, CICS Static Calls can cause you grief, especially in a Threadsafe environment.

If the WS in the Statically-Called sub-program is part of the load module, then the WS is not reusable as this is similar to having an Assembler program, which defines program storage to the CSECT. This would not be considered serially reusable, let alone Threadsafe.

To get around this, pass dynamic WS from the Caller as a parameter to the Statically-Called sub-program, which will then make the sub-program serially reusable and possibly Threadsafe.

Note that CALL's must be local to the given region. There isn't any feature which would allow a Remote CALL, although some folks can be rather clever.

CICS does NOT use MVS services to perform a CALL, either Dynamic or Static.

One other point; the maximum commarea-length is 32763. Actually, 32K is 32768.

If your CICS/TS version/release is (at a minimum) 3.1, then yes, CONTAINERS and CHANNELS are an option.

Threadsafe/OpenAPI are IBM long term strategies and all shops should plan accordingly....

Bill
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: Fri Nov 13, 2009 5:02 am
Reply with quote

Quote:
In CICS, Dynamic Calls are serially reusable and would probably pass the test for Threadsafe, because WS is allocated for the sub-program upon each CALL.


A correction to this statement. WS is allocated once and if a given sub-program is called more than once from the same caller, then the Dynamic WS is reused each time.

When a sub-program is accessed via a LINK-API, its WS is freed upon the XC RETURN API back to the LINKING program. However, Dynamically Called sub-program's WS is not freed until task termination and if it is a large chunk, then access to this program should be via a LINK-API, to avoid potentially raising SOS Above-the-Line/ExDSA.

Bill
Back to top
View user's profile Send private message
pkmurali
Warnings : 1

Active User


Joined: 15 Dec 2005
Posts: 271

PostPosted: Fri Nov 13, 2009 11:26 am
Reply with quote

The CICS version used is CICS/TS version/release 3.1 it's efficient to use the CALL statement or using Channels & Containers. Please suggest.

I came to know that maximum size of linkage section is 64MB(approx icon_biggrin.gif ).

Quote:

A "CALL" does not pass data. Instead, it passes the address of each parm in the calling program. In the sub-program, addressability to each passed-parm is performed for you by COBOL in the Prologue code.


Using 1MB for address reference won't impact the performance?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Fri Nov 13, 2009 5:43 pm
Reply with quote

Quote:
I came to know that maximum size of linkage section is 64MB(approx icon_biggrin.gif ).
Where did you run across this? The COBOL Language Reference manual says in Appendix 1.2 on Compiler Limits that Linkage Section can be up to 134,213,631 bytes -- which is a lot more than 64M.
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: Fri Nov 13, 2009 7:14 pm
Reply with quote

Quote:
The CICS version used is CICS/TS version/release 3.1 it's efficient to use the CALL statement or using Channels & Containers. Please suggest.


It really depends on what future strategy your shop will undertake and only you and your colleagues can make that decision.

Channels and Containers were introduced with TS 3.1 and (in TS 3.2 and greater) reside in 64-Bit storage, the only facet of CICS (AFAIK) which is above the bar.

It's doubtful that CICS itself will ever be totally above the bar, only "pieces/parts".

Good luck with your research....

Bill
Back to top
View user's profile Send private message
pkmurali
Warnings : 1

Active User


Joined: 15 Dec 2005
Posts: 271

PostPosted: Tue Nov 17, 2009 12:41 pm
Reply with quote

Thanks Bill & Robert for your crisp information regarding appliying the thoughts and for size of Linkage section...
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 Calling an Open C library function in... CICS 1
No new posts How to 'Ping' a CICS region in JCL CICS 2
No new posts Parallelization in CICS to reduce res... CICS 4
No new posts DB2 Event passed to the Application P... DB2 1
Search our Forums:

Back to Top