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.
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
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....
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
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.
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 ).
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?
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
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.
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
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".