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
 

 

EIBCALEN < length of DFHCOMMAREA

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
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    Post subject: EIBCALEN < length of DFHCOMMAREA
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: 6967
Location: porcelain throne

PostPosted: Wed May 18, 2011 3:16 pm    Post subject:
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    Post subject: Reply to: EIBCALEN < length of DFHCOMMAREA
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    Post subject: Re: EIBCALEN < length of DFHCOMMAREA
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    Post subject:
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: 8054
Location: East Dubuque, Illinois, USA

PostPosted: Wed May 18, 2011 6:28 pm    Post subject:
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: 6967
Location: porcelain throne

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

as a side issue (concerning this technology)
here is an informative link: http://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    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 Length of Tape file Mohan Kothakota JCL & VSAM 9 Thu Apr 20, 2017 10:24 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm
No new posts SQZ pipe delimited file with 1 column... Rick Silvers DFSORT/ICETOOL 6 Sun Nov 06, 2016 8:11 pm


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