IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

DFHCOMMAREA doubt !


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rohanthengal

Active User


Joined: 19 Mar 2009
Posts: 206
Location: Globe, India

PostPosted: Tue Sep 14, 2010 4:27 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Tue Sep 14, 2010 4:41 pm
Reply with quote

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
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Tue Sep 14, 2010 7:21 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Doubt about pl/1 (job offer) General Talk & Fun Stuff 5
No new posts doubt when executing a file when logg... TSO/ISPF 2
No new posts Doubt in MFS IMS DB/DC 2
No new posts Doubt on GETMAIN, FREEMAIN behaviour CICS 3
No new posts Doubt in using command code O IMS DB/DC 4
Search our Forums:

Back to Top