View previous topic :: View next topic
|
Author |
Message |
muthukumarapandian
New User
Joined: 08 Oct 2004 Posts: 42 Location: chennai, india
|
|
|
|
Hi,
The size of the commarea is 64 kb if i want to store more than that means is it possible or not. |
|
Back to top |
|
|
rick
New User
Joined: 18 Jun 2004 Posts: 59 Location: Chennai
|
|
|
|
Hi,
It is not possible to have DFHCOMMAREA more than 64KB.
Thanks and Regards,
Rick. |
|
Back to top |
|
|
meetsrk
New User
Joined: 13 Jun 2004 Posts: 85
|
|
|
|
hi,
I suspect its not 64KB, its 32KB.
if u wanna store more than 32KB, then go for TSQ(Temporary storage queue). |
|
Back to top |
|
|
mcmillan
Site Admin
Joined: 18 May 2003 Posts: 1210 Location: India
|
|
|
|
Dear Metsrk,
You are correct. The maximum size of DFHCOMMAREA is 32,500 bytes, however it is recommended (by IBM) not to exceed 24K. |
|
Back to top |
|
|
ganmain
New User
Joined: 19 Feb 2005 Posts: 28
|
|
|
|
HI,
I want to know why we are declaring commarea in both working
storage & linkage section(dfhcommarea).
if my cics program is not calling another program
only commarea declaring in working storage section is enough
or
we have to declare both in working storage & linkage section ?
please clarify this doubt |
|
Back to top |
|
|
mcmillan
Site Admin
Joined: 18 May 2003 Posts: 1210 Location: India
|
|
|
|
Quote: |
why we are declaring commarea in both working
storage & linkage section |
The COMMAREA option of the LINK and XCTL commands specifies the name of a data area (known as a communication area) in which data is passed to the program being invoked.
Quote: |
if my cics program is not calling another program only commarea declaring in working storage section is enough |
If you are not using any LINK, XCTL or RETURN command in your program, there is no need to worryabout COMMAREA.
Quote: |
we have to declare both in working storage & linkage section |
In a receiving COBOL program, you must give the data area the name DFHCOMMAREA. In this COBOL program, if a program passes a COMMAREA as part of a LINK, XCTL, or RETURN command,
either the working-storage or the LINKAGE SECTION can contain the data area. A program receiving a COMMAREA should specify the data in the LINKAGE SECTION. |
|
Back to top |
|
|
ganmain
New User
Joined: 19 Feb 2005 Posts: 28
|
|
|
|
thanks for your reply
but still iam having doubt in that
if my program is of psudo conversation ie return(transid) but it is not
calling another program then declaring dfhcommarea in linkage section is necessary or not necessary?
please clarify this |
|
Back to top |
|
|
mainframemouli
New User
Joined: 01 Mar 2005 Posts: 52 Location: Mysore
|
|
|
|
Even if you are not including the DFHCOMMAREA the system will automatically include it in the program.
If your program uses a Psued0-conversational then You also include the COMMAREA option to name the area of working storage that will be stored in the CICS communication area between program executions. When the RETURN command is issued in this form, the program associated with the trans-id will be started the next time the user presses an attention key |
|
Back to top |
|
|
manoj_madhavan Warnings : 1 New User
Joined: 07 Mar 2005 Posts: 12
|
|
|
|
but sir ....it is necessary for a commarea declaration only when u pass some value through the commarea...
else is it necessary for a separate definition both in the workin storage as well as linkage section? |
|
Back to top |
|
|
mcmillan
Site Admin
Joined: 18 May 2003 Posts: 1210 Location: India
|
|
|
|
Quote: |
Is it necessary for a separate definition both in the workin storage as well as linkage section |
Yes. if you want to pass X from Program A to B, then
X should be declared in Working Storage Section of Program A and it can be received to a varialbe named DFHCOMMAREA which is declared in the Linkage section of Porgram B.
Code: |
? ?
? Invoking program ?
? IDENTIFICATION DIVISION. ?
? PROGRAM ID. 'PROG1'. ?
? . ?
? . ?
? . ?
? WORKING-STORAGE SECTION. ?
? 01 COM-REGION. ?
? 02 FIELD PICTURE X(3). ?
? . ?
? . ?
? . ?
? PROCEDURE DIVISION. ?
? MOVE 'ABC' TO FIELD. ?
? EXEC CICS LINK PROGRAM('PROG2') ?
? COMMAREA(COM-REGION) ?
? LENGTH(3) END-EXEC. ?
? . ?
? . ?
? . ?
? Invoked program ?
? IDENTIFICATION DIVISION. ?
? PROGRAM-ID. 'PROG2'. ?
? . ?
? . ?
? . ?
? LINKAGE SECTION. ?
? 01 DFHCOMMAREA. ?
? 02 FIELD PICTURE X(3). ?
? ?
? . ?
? . ?
? . ?
? PROCEDURE DIVISION. ?
? IF EIBCALEN GREATER ZERO ?
? THEN ?
? IF FIELD EQUALS 'ABC' ... ? |
|
|
Back to top |
|
|
manoj_madhavan Warnings : 1 New User
Joined: 07 Mar 2005 Posts: 12
|
|
|
|
i was asking the declaration situation when u dont pass in any parameters.......ie, u dont use commrea for passing values but simply return with a transaction id without any parameters.....
in such a situation is it necessary to have declararion for commarea and dfhcommarea?? |
|
Back to top |
|
|
mcmillan
Site Admin
Joined: 18 May 2003 Posts: 1210 Location: India
|
|
|
|
Quote: |
in such a situation is it necessary to have declararion for commarea and dfhcommarea?? |
No. |
|
Back to top |
|
|
sarma Kappagantu
New User
Joined: 17 Mar 2005 Posts: 22 Location: Bangalore
|
|
|
|
Commarea passed with XCTL & LINK can be 32,673 bytes at the max. (4 bytes less than 32K - 1. However, it is 24K on RETURN command.
CICS Application Programming Guide specifies that "The length of a COMMAREA on a RETURN command can vary from transaction to transaction, up to a theoretical upper limit of 32,763 bytes. However to be safe, you should not exceed 24KB ?, because of a number of factors that can reduce the limit from the theoretical maximum.?
If you wish to pass more than 24 KB, you may use BTS container, if the version of CICS is CICS TS1.3 or higher. |
|
Back to top |
|
|
kavi
New User
Joined: 03 Mar 2005 Posts: 2
|
|
|
|
You can use getmain to get the maximum address and by pointer reference you can acess the data.
The size of the DHFCOMMAREA is 64kb and it is not 32 kb reply to me if i am wrong. |
|
Back to top |
|
|
raguibmm
New User
Joined: 16 Mar 2005 Posts: 4
|
|
|
|
Commarea passed with XCTL & LINK can be 32,673 bytes at the max. (4 bytes less than 32K - 1. However, it is 24K on RETURN command.
CICS Application Programming Guide specifies that "The length of a COMMAREA on a RETURN command can vary from transaction to transaction, up to a theoretical upper limit of 32,763 bytes. However to be safe, you should not exceed 24KB ?, because of a number of factors that can reduce the limit from the theoretical maximum.?
If you wish to pass more than 24 KB, you may use BTS container, if the version of CICS is CICS TS1.3 or higher.
what is bts container? |
|
Back to top |
|
|
sarma Kappagantu
New User
Joined: 17 Mar 2005 Posts: 22 Location: Bangalore
|
|
|
|
Lentgth of commarea is not 64K, because the variable used is S9(04) COMP, which can not hold a value higher than 32,677.
Coming to the other issue of using GETMAIN and passing the pointer to pass a larger than 24KB, data - It is OK as long as the two programs communicating are in the same CICS region. However, it fails the moment the other program happens to be in a different CICS region. |
|
Back to top |
|
|
UNIVERSE
New User
Joined: 15 Mar 2005 Posts: 11 Location: Mumbai
|
|
|
|
If ur cics Program is not calling any program/ Invoking any Transaction, there is no need to go for the concept DFHCOMMAREA & LINKAGE SECTION. It becomes the normal CICs pgm.
Regards
UNIVERSE
[quote="ganmain"]HI,
I want to know why we are declaring commarea in both working
storage & linkage section(dfhcommarea).
if my cics program is not calling another program
only commarea declaring in working storage section is enough
or
we have to declare both in working storage & linkage section ?
please clarify this doubt[/quote] |
|
Back to top |
|
|
sarma Kappagantu
New User
Joined: 17 Mar 2005 Posts: 22 Location: Bangalore
|
|
|
|
1. If ur cics Program is not calling any program/ Invoking any Transaction, there is no need to go for the concept DFHCOMMAREA & LINKAGE SECTION. It becomes the normal CICs pgm.
Ans: I believe, generally one will encounter only pesudo-conversational programs and not conversational programs. In a pesudo-conversational program, one should terminate a transaction after sending a screen and specify the next tran to be invoked. Hence, if you wish to write any reasonable program, even with a single screen, you will have to use COMMAREA and DFHCOMMAREA.
2. I want to know why we are declaring commarea in both working
storage & linkage section(dfhcommarea).
Ans: There are a few points to remember here.
(a) In CICS we can pass only one variable to the other program / transaction.
(b) The receiving variable (that receives data from other program / transaction is a variable called DFHCOMMAREA in LINKAGE section. (So, if your program is going to receive some data from other programs / transactions, you shold define DFHCOMMAREA in linkage section.)
(c) generally we do not manipulate DFHCOMMAREA. Another variable is created in WORKING-STORAGE section with the same size as DFHCOMMAREA and data is moved into that variable, before the program uses it and manipulates it.
(d)To pass data from your program to another program, you should have one variable in your program that can hold data that can be used in the XCTL / LINK / RETURN command's COMMAREA option, to pass data. Name of this variable can be any thing, as long as it is an acceptable variable in the host language.
Hence, you are using DFHCOMMAREA variable in LINKAGE section and COMMAREA option in the program. You can use any variable to hold the data that needs to be passed to the other program. |
|
Back to top |
|
|
chaitanyav
New User
Joined: 13 May 2008 Posts: 3 Location: Hyderabad
|
|
|
|
mainframemouli wrote: |
Even if you are not including the DFHCOMMAREA the system will automatically include it in the program.
|
Mouli,
1)
You mean to say even if we include DFHCOMMAREA in the program or not, system will automatically include this in the program linkage section right ?
In case if we include the DFHCOMMAREA in the program does the system will include it again or first the system will check whether the DFHCOMMAREA is included in the program or not and if not then only it will include right ? |
|
Back to top |
|
|
Earl Haigh
Active User
Joined: 25 Jul 2006 Posts: 475
|
|
|
|
There seems to be some confusion on this. Let me try to set the record
straight.
The maximum size of a commarea is 32767, same as maximum size of TSQ or TDQ record.
It is a common practice to limit the size to 32500, but 32767 will work
if needed.
If your CICS program issues:
EXEC CICS RETURN TRANSID('XXXX') commarea(WS-AREA)
EXEC CICS LINK commarea (WS-AREA)
EXEC CICS XCTL commarea (WS-AREA)
you do not need need to specifically define DFHCOMMAREA in linkage section. UNLESS the same program is the recipient of a commarea
This is all basic CICS stuff and explained in many manuals.
as for the original posting on this topic
[/quote]The size of the commarea is 64 kb if i want to store more than that means is it possible or not.
|
|
Back to top |
|
|
Earl Haigh
Active User
Joined: 25 Jul 2006 Posts: 475
|
|
|
|
Quote: |
generally we do not manipulate DFHCOMMAREA. Another variable is created in WORKING-STORAGE section with the same size as DFHCOMMAREA and data is moved into that variable, before the program uses it and manipulates it |
FYI: AREAS in a COBOL WORKING STORAGE are known as fields,
and are fixed length. They are not the same as variables found in languages such as JAVA and XMScript. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
muthukumarapandian wrote: |
Hi,
The size of the commarea is 64 kb if i want to store more than that means is it possible or not. |
The maximum size of a commarea is 32,763 (CICS owns the last 4-Bytes of EIBCALEN), even though EIBCALEN is a signed Binary halfword.
If you view it as an unsigned Binary halfword, then yes, it can have a maximum of X'FFFF' (decimal 65,535). However, it is signed and therefore, has a maximum of X'7FFF', minus 4.
Carefully review the following LINK as it discusses the COMMAREA alternative, which is ===> CONTAINERS -
ibmmainframes.com/viewtopic.php?p=164265&highlight=#164265
Regards,
Bill |
|
Back to top |
|
|
Earl Haigh
Active User
Joined: 25 Jul 2006 Posts: 475
|
|
|
|
Quote: |
The maximum size of a commarea is 32,763 (CICS owns the last 4-Bytes of EIBCALEN), even though EIBCALEN is a signed Binary halfword. |
Bill, I stand corrected.
Thanks,
Earl |
|
Back to top |
|
|
|