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 ?
Joined: 06 Jun 2008 Posts: 8218 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.