View previous topic :: View next topic
|
Author |
Message |
rohanthengal
Active User
Joined: 19 Mar 2009 Posts: 206 Location: Globe, India
|
|
|
|
i have written this code but when i run the CEDF mode and see the content of COMMAREA, it shows EEEEE on it
MOVE DFHCOMMAREA TO WS-COMMAREA
Code: |
IF EIBCALEN = 0
MOVE LOW-VALUES TO ADDMAPO
MOVE -1 TO NUM1L
MOVE 'ENTER THE NUMBERS' TO MSGO
PERFORM B0000-SEND-PARA
MOVE 'EEEEE' TO WS-COMMAREA
PERFORM B0001-RETURN-PARA
ELSE
----- recieve para..............
END-IF |
contents of RETURN PARA are:
EXEC CICS RETURN
TRNSID[TRNID]
COMMAREA(WS-COMMAREA)
END-EXEC
I have few doubts in this:
1. Though i dont move anything to DFHCOMMAREA & moving 'EEEEE' to WS-COMMAREA, how length component of EIBCALEN is changing to 5 ?
2. Also, what is the significance of moving DFHCOMMAREA to WS-COMMAREA in the first statement of PROCEDURE DIVISION
3. Does COMMAREA changes with the change in WS-COMMAREA ?
4. What is the use of RETURNING transaction with COMMAREA ?
Regards,
ROHAN |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
1. EIBCALEN reflects the length of the DFHCOMMAREA when the program (transaction) starts.
2. Some shops have standards that require the move. There is no reason in COBOL to do so as COBOL can work with the data in LINKAGE SECTION or WORKING-STORAGE SECTION just fine.
3. No, DFHCOMMAREA and WS-COMMAREA are two different areas of memory and are not linked.
4. RETURN TRANSID tells CICS to start this transaction when an attention key (enter, PF key, PA key, clear key, etc) is hit on the attached terminal. The COMMAREA option provides the DFHCOMMAREA for this started transaction, which allows the program to be aware this is the not the first time through the code, and hence to receive the map sent the first time around. |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
Does this program ALWAYS receive a COMMAREA? If not, then EIBCALEN is zero so how does the
Code: |
MOVE DFHCOMMAREA TO WS-COMMAREA |
work?
Garry. |
|
Back to top |
|
|
|