Joined: 06 Jun 2008 Posts: 8319 Location: Dubuque, Iowa, USA
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.
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).
03 APPL-1-PTR USAGE IS POINTER.
Set up addressability to the CWA
EXEC CICS ADDRESS
CWA(ADDRESS OF COMMON-WORK-AREA)