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


loading the CWA

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

New User

Joined: 26 Aug 2005
Posts: 8

PostPosted: Tue Jul 16, 2013 8:38 pm    Post subject: loading the CWA
Reply with quote

Hello All,

I need a sample code to load and use the CWA in a cobol program. I researched about the use of CWA but not understand.

anyone can help me?
Back to top
View user's profile Send private message

Robert Sample

Global Moderator

Joined: 06 Jun 2008
Posts: 7870
Location: Bellevue, IA

PostPosted: Tue Jul 16, 2013 8:52 pm    Post subject:
Reply with quote

The manual tells you where to start: by contacting your site support group and working with the person(s) supporting CICS:
Using the common work area (CWA)

The common work area (CWA) is a single control block that is allocated at system startup time and exists for the duration of that CICSĀ® session. The size is fixed, as specified in the system initialization parameter, WRKAREA. The CWA has the following characteristics:

There is almost no overhead in storing or retrieving data from the CWA. Command-level programs must issue one ADDRESS command to get the address of the area but, after that, they can access it directly.
Data in the CWA is not recovered if a transaction or the system fails.
It is not subject to resource security.
CICS does not regulate use of the CWA. All programs in all applications that use the CWA must follow the same rules for shared use. These are usually set down by the system programmers, in cooperation with application developers, and require all programs to use the same "copy" module to describe the layout of the area.

You must not exceed the length of the CWA, because this causes a storage violation. Furthermore, you must ensure that the data used in one transaction does not overlay data used in another. One way to protect CWA data is to use the storage protection facility that protects the CWA from being written to by user-key applications. See Protecting the CWA for more information.
The CWA is especially suitable for small amounts of data, such as status information, that are read or updated frequently by multiple programs in an application.
The CWA is not suitable for large-volume or short-lived data because it is always allocated.
Back to top
View user's profile Send private message

New User

Joined: 06 Jun 2013
Posts: 19
Location: Singapore

PostPosted: Thu Jul 18, 2013 3:34 pm    Post subject:
Reply with quote

The Common Work Area as Robert has extracted for you is a global work area available within the CICS Address space. It is available to any program that has the address of it. It is not intended for large amounts of data, as it is only a small area, which can be defined in the SIT at CICS startup

Normally we dont put any data there as in a true CICSPlex the transaction could run in any CICS AOR and so if it is reliant on any data that is in the CWA, this data would not be available in every CICS AOR.

This would cause this transaction to have affinity with the region that contains this CWA data. These affinities we try to remove, allowing the transaction to run anywhere.

However, if you want a COBOL's view of addressing this area, then the following can be used.

03 APPL-1-ID PIC X(4).
Set up addressability to the CWA

I hope this helps

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 Loading assembler table in COBOL Batc... guy jax COBOL Programming 7 Mon Mar 16, 2015 4:58 am
No new posts loading a partitioned table sushanth bobby DB2 5 Sat Oct 18, 2014 6:20 am
No new posts COBOL Table loading Musab Ahmed DB2 2 Tue Nov 26, 2013 3:17 pm
No new posts Problem Loading jobs sysout from SAR ... thesumitk CA Products 3 Mon Aug 12, 2013 11:38 pm
No new posts Error while loading the amounts with ... Kunal Surpurkar DB2 3 Mon Apr 22, 2013 2:25 pm

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