MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CICS LINK operation: COmmarea problem

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> CICS and Middleware
View previous topic :: View next topic  
Author Message
mangsk
Beginner


Joined: 05 Jun 2004
Posts: 46
Topics: 18

PostPosted: Thu Feb 21, 2008 6:36 pm    Post subject: CICS LINK operation: COmmarea problem Reply with quote

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
View user's profile Send private message Yahoo Messenger MSN Messenger
mangsk
Beginner


Joined: 05 Jun 2004
Posts: 46
Topics: 18

PostPosted: Fri Feb 22, 2008 9:46 am    Post subject: Reply with quote

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
View user's profile Send private message Yahoo Messenger MSN Messenger
nileshpalve
Beginner


Joined: 06 Nov 2006
Posts: 10
Topics: 4

PostPosted: Mon Mar 10, 2008 1:56 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> CICS and Middleware All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group