about commarea



Support for CICS/ESA, CICS/TS & Transaction Gateway, CICS Configuration Manager and CICS Performance Analyzer

about commarea

Postby pradeepgowda » Tue Apr 06, 2010 6:35 pm

what happens if length in 01 DFHCOMMAREA is less than the length passed through commarea option

eg:
PGM A:
01 ws-comm pic x(30).

exec cics return
transid('ppre')
commarea(ws-comm)
end-exec

PGM B:
linkage section
01 DFHCOMMAREA
05 ws-lk-comm pix x(15).
pradeepgowda
 
Posts: 40
Joined: Mon Jan 04, 2010 4:17 pm
Has thanked: 0 time
Been thanked: 0 time

Re: about commarea

Postby Robert Sample » Tue Apr 06, 2010 6:48 pm

1. What do you think happens?
2. What does the manual tell you happens?
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: about commarea

Postby pradeepgowda » Wed Apr 07, 2010 11:47 am

i think data truncation will happen. please suggest. i have doubt whether it abends.
it was asked in interview
pradeepgowda
 
Posts: 40
Joined: Mon Jan 04, 2010 4:17 pm
Has thanked: 0 time
Been thanked: 0 time

Re: about commarea

Postby Robert Sample » Wed Apr 07, 2010 4:24 pm

If the length were longer, you could get an abend but if the length is shorter, there is no reason for an abend. EIBCALEN contains the length passed from the calling program, but your program is not required to access all those bytes -- if you limit the size, you just cannot access the last N bytes (15 in your example).
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: about commarea

Postby pradeepgowda » Wed Apr 07, 2010 5:15 pm

thanks Robert
pradeepgowda
 
Posts: 40
Joined: Mon Jan 04, 2010 4:17 pm
Has thanked: 0 time
Been thanked: 0 time


Return to CICS

 


  • Related topics
    Replies
    Views
    Last post