Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
CALL WS-PGM USING... IN CICS Program

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

Active User


Joined: 15 Dec 2005
Posts: 237

PostPosted: Thu Nov 12, 2009 10:52 am    Post subject: CALL WS-PGM USING... IN CICS Program
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: 2504
Location: Atlanta, Georgia, USA

PostPosted: Fri Nov 13, 2009 3:57 am    Post subject: Reply to: CALL WS-PGM USING... IN CICS Program
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: 2504
Location: Atlanta, Georgia, USA

PostPosted: Fri Nov 13, 2009 5:02 am    Post subject: Reply to: CALL WS-PGM USING... IN CICS Program
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: 237

PostPosted: Fri Nov 13, 2009 11:26 am    Post subject:
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: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Fri Nov 13, 2009 5:43 pm    Post subject:
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: 2504
Location: Atlanta, Georgia, USA

PostPosted: Fri Nov 13, 2009 7:14 pm    Post subject: Reply to: CALL WS-PGM USING... IN CICS Program
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: 237

PostPosted: Tue Nov 17, 2009 12:41 pm    Post subject:
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    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 ASP3 ABEND IN CICS Vedant CICS 0 Fri Oct 20, 2017 3:18 pm
No new posts Identifying Interfaces in CICS/mainframe Ashishpanpaliya CICS 5 Fri Oct 13, 2017 3:21 pm
No new posts IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Accessing CICS tran with map from JCL... navdeepaggarwal CICS 5 Tue Oct 03, 2017 6:15 pm

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