View previous topic :: View next topic |
Author |
Message |
mangsk Beginner
Joined: 05 Jun 2004 Posts: 46 Topics: 18
|
Posted: Thu Feb 21, 2008 6:36 pm Post subject: CICS LINK operation: COmmarea problem |
|
|
I have a commarea defined with following structure
02 XXX-CA.
05 A-VAR1 PIC X(500).
05 B-VAR1 OCCURS 10 TIMES.
10 B-VAR-ELM PIC X(10).
Now say prpg A LINK's to prog B; but for processing after this LINK prog A needs its original commarea back. I do populate values in array B-VAR1 in the called program B.
So what I do is this -
MOVE XXX-CA TO XXX-CA-TEMP
MOVE 'XRSRSBSHJNJ' TO A-VAR1
EXEC CICS
LINK(PROG-B)
COMMAREA(XXX-CA)
END-EXEC
MOVE XXX-CA-TEMP(1:500) TO XXX-CA-TEMP(1:500)
Even then I see that B-VAR1 is wiped out (initialized). A-VAR1 is untouched and as desired it contains values before LINK operation.
What am i missing here? Why is this happening? _________________ Regards,
Mangsk |
|
Back to top |
|
|
mangsk Beginner
Joined: 05 Jun 2004 Posts: 46 Topics: 18
|
Posted: Fri Feb 22, 2008 9:46 am Post subject: |
|
|
Correction: Please read
MOVE XXX-CA-TEMP(1:500) TO XXX-CA-TEMP(1:500)
as
MOVE XXX-CA-TEMP(1:500) TO XXX-CA(1:500)
and XXX-CA-TEMP is defined in working storage of Prog A as -
05 XXX-CA-TEMP PIC x(600). _________________ Regards,
Mangsk |
|
Back to top |
|
|
nileshpalve Beginner
Joined: 06 Nov 2006 Posts: 10 Topics: 4
|
Posted: Mon Mar 10, 2008 1:56 pm Post subject: |
|
|
I am not sure if u understand but your XXX-CA which u are trying to preserve even after LINK is longer than 500 bytes. And you are restoring only 500 bytes in essence u are restoring only A-VAR1 and nothing else.
XXX-CA size = A-VAR1 PLUS B-VAR1 PLUS B-VAR-ELM
Create a temp variable which can hold the entire XXX-CA variable and use it as Hold variable. |
|
Back to top |
|
|
|
|