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

EIBCALEN < length of DFHCOMMAREA


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

New User


Joined: 26 Oct 2010
Posts: 12
Location: USA

PostPosted: Wed May 18, 2011 3:07 pm
Reply with quote

Hi

I am writing a CICS program that recieves input buffer =100 bytes from java front end via DFHCOMMAREA and passes back the reply buffer = 1000 bytes via DFHCOMMAREA using RETURN command. I have defined length of DFHCOMMAREA in my program as 1000 bytes.

When my program is invoked EIBCALEN = 100 bytes as expected. If the prog does INITIALIZE DFHCOMMAREA, after reading the input, it gives ASRA - Storage Violation. I believe this is because prog is trying to access bytes 200-1000 of DFHCOMMAREA whereas EIBCALEN is 100.

But if I make the length of DFHCOMMAREA as 100 bytes then I won't be able to write back the 1000 byte response in DFHCOMMAREA. Can you please advice on how to get over this situation?

Thanks
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed May 18, 2011 3:16 pm
Reply with quote

If you only receive 100
you can only return 100.

the java front end has to change and pass you 1000.

that's how to get over this situation..........
Back to top
View user's profile Send private message
paramoberoi

New User


Joined: 26 Oct 2010
Posts: 12
Location: USA

PostPosted: Wed May 18, 2011 3:22 pm
Reply with quote

Thanks. Will make that change.
Back to top
View user's profile Send private message
Stefan

Active User


Joined: 12 Jan 2006
Posts: 110
Location: Germany

PostPosted: Wed May 18, 2011 4:33 pm
Reply with quote

I'm not quite sure about using a JAVA program as trigger, but in a traditional CICS environment it's very easy to overcome these difficulties.
You have mixed up the receiving and the sending part of a common area.
Your program receives a common area. Thus it is defined in the Linkage Section and made addressable by the USING clause on the Procedure Division. But when your program changes its habit and becomes the sending part, i.e. when issuing the RETURN COMMAREA(group-item), it cannot use data from its Linkage Section. On this command you have to use data defined in your Working Storage Section.

This makes it possible to treat both incoming and outgoing common areas completely separate, for example by using different data lengths.

Summarized: Receive into your Linkage Section, send from your Working Storage Section.

Give it a try.
Back to top
View user's profile Send private message
paramoberoi

New User


Joined: 26 Oct 2010
Posts: 12
Location: USA

PostPosted: Wed May 18, 2011 6:14 pm
Reply with quote

Hi Stefan , Thanks for your response.

I believe that EIBCALEN (if < DFHCOMMAREA length) sets the "usable" length of the DFHCOMMAREA in program.

When using RETURN command (without COMMAREA option), data has to be passed via the DFHCOMMAREA.

Therefore I agree with Dick Brenholtz's solution that input and output length need to be same.

Cheers
Param
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed May 18, 2011 6:28 pm
Reply with quote

Stefan:
Quote:
But when your program changes its habit and becomes the sending part, i.e. when issuing the RETURN COMMAREA(group-item), it cannot use data from its Linkage Section
This does NOT agree with the Application Programming Guide manual, section 7.3.2.1, which states
Quote:
In this COBOL program, if a program passes a COMMAREA as part of a LINK, XCTL, or RETURN command, either the working-storage or the LINKAGE SECTION can contain the data area.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu May 19, 2011 2:33 pm
Reply with quote

as a side issue (concerning this technology)
here is an informative link: www.ibm.com/developerworks/websphere/techjournal/0408_wakelin/0408_wakelin.html
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 Store the data for fixed length COBOL Programming 1
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts parsing variable length/position data... DFSORT/ICETOOL 5
Search our Forums:

Back to Top