Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

CICS - Different value of commarea in calling and called pro

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
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    Post subject: CICS - Different value of commarea in calling and called pro
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

Site Director


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

PostPosted: Mon Jun 18, 2007 6:43 am    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Mon Jun 18, 2007 7:08 pm    Post subject:
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    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Mon Jun 18, 2007 8:28 pm    Post subject:
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    Post subject: Compiler option problem.
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

Site Director


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

PostPosted: Tue Jun 19, 2007 1:45 pm    Post subject:
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    Post subject: Reply to: CICS - Different value of commarea in calling and
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    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Could we identify the called modules ... elixir1986 COBOL Programming 5 Fri Jul 14, 2017 1:53 am
No new posts How to Clear all TSQs during CICS sta... Hooman24 CICS 10 Mon Jun 26, 2017 9:46 pm
No new posts CICS Transaction attach count of supp... lind sh CICS 1 Wed Jun 21, 2017 1:33 pm
No new posts CICS Transaction Timeout Hooman24 CICS 2 Sun Apr 16, 2017 2:16 pm
No new posts COMMAREA and CHANNELS menonkiran CICS 4 Tue Apr 04, 2017 8:14 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us