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

CICS - Different value of commarea in calling and called pro


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

New User


Joined: 21 Dec 2006
Posts: 20
Location: London

PostPosted: Fri Jun 15, 2007 4:18 pm
Reply with quote

Hi,

I had seen a situation where the calling program (A) is having a commarea of 9K and called program (B) of commarea of 30K.

When the call return from called program (B) having a commarea of 30K we will pass DFHCOMMAREA back to called program (A) having commarea of 9K,since there is a mismatch in commarea so ideally program should fail but to my surprise program is working fine.

Can anybody help me out in this why this programs are working fine?

Regards,

Shirish Shukla
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Jun 18, 2007 6:43 am
Reply with quote

Hello,

Please remove your email address from your signature. I've removed it from the original post, but not your profile.

Is the commarea the same in both modules for the first 9k? Does the called module use all 30k or only the first 9 sometimes?
Back to top
View user's profile Send private message
shuklas

New User


Joined: 21 Dec 2006
Posts: 20
Location: London

PostPosted: Mon Jun 18, 2007 6:39 pm
Reply with quote

Hi,
The email and contact number removed.

The commarea is same in both the modules for the first 9K.
Called module uses anything from 105 to 30K,this is a router program that will call different program depending on the calling modules so we had kept the commarea as 30105.
First 105 is common for all modules called.remaining is variable for different programs.

Hope this help.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Jun 18, 2007 7:08 pm
Reply with quote

Hello,

I believe that as long as the called module uses only up to the length of the calling module, there will not be an error as no foul has been committed.

If the called module tries to use more than the 9k, beware. It may work or it may abend.
Back to top
View user's profile Send private message
shuklas

New User


Joined: 21 Dec 2006
Posts: 20
Location: London

PostPosted: Mon Jun 18, 2007 8:15 pm
Reply with quote

I think there is some confusion in the way we both had interpreted the problem.

Actually Program A is passing commarea as 9K using DFHCOMMAREA and call Program B which accept this commarea in 30105 variable.

Structure of this commarea of Program B is:

DHFCOMMAREA.
15 COPY BOOKC. Length of 105
15 Variablec PIC X(30000).

and we also have WS-COMMAREA.

WS-COMMAREA.
15 COPY BOOKC. Length of 105
15 WS-Variablec PIC X(30000).

When the call is sent back from Program B to Program A we will pass

WS-COMMAREA to DFHCOMMAREA this mean
We are trying to move length 30105 to length 9000 variable.

This will work fine untill the 9000 is allocated and the memory can take 30105 of data.
and it will fail when the 9000 of DFHCOMMAREA is allocated and the 30105 is beyond the valid boundary of the data.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon Jun 18, 2007 8:28 pm
Reply with quote

Returning from a call, nothing gets sent back.
Back to top
View user's profile Send private message
Johnson_Jiang

New User


Joined: 05 Apr 2007
Posts: 11
Location: China,ShenZhen

PostPosted: Tue Jun 19, 2007 8:57 am
Reply with quote

Hi, all,

I think maybe the problem is the compiling option problem. Pls make sure that you have used the compile option TRUNC:
//XXXXX EXEC ... PARM='TRUNC(OPT)'

If you didn't use this option, when you trace the program, you can find that the commarea length is truncated and less than 9K. The result is unsure. I'm not sure about the exact number on when to use this option(maybe it is 10K?), but just try it and you will get the proper result.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Jun 19, 2007 1:45 pm
Reply with quote

Hello,

The code already gives the proper result. . . .
Quote:
Can anybody help me out in this why this programs are working fine?
Back to top
View user's profile Send private message
rahuindo

New User


Joined: 09 Apr 2008
Posts: 83
Location: Chennai

PostPosted: Wed Oct 20, 2010 2:25 am
Reply with quote

I wanted to thank Johnson_Jiang. I was facing this issue of truncated WS-COMMAREA (though the length was >10000, it was always returning the COMMAREA upto 2500 bytes) and was clueless about the problem. But when I implemented the solution provided, I was able to correct it. Thanks a lot
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 Using API Gateway from CICS program CICS 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
No new posts Calling an Open C library function in... CICS 1
No new posts How to 'Ping' a CICS region in JCL CICS 2
Search our Forums:

Back to Top