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 and LENGTH of DFHCOMMAREA

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
Succor

New User


Joined: 20 Feb 2009
Posts: 96
Location: Bangalore :)

PostPosted: Wed Apr 01, 2009 11:48 pm    Post subject: EIBCALEN and LENGTH of DFHCOMMAREA
Reply with quote

Quote:
Verify the length and content of COMMAREAs. Many programmers check for the presence of a COMMAREA by simply checking to see if EIBCALEN is greater than zero and, if true, moving the LINKAGE SECTION item DFHCOMMAREA into a WORKING STORAGE area. This technique may seem proper on the surface, but it is not. CICS has no knowledge of the length of the LINKAGE SECTION item DFHCOMMAREA. The length and layout of this item are set at compile time. At execution time, the actual length passed from the invoking program is provided in the EIB item EIBCALEN. It is the called program's responsibility to insure that EIBCALEN matches the compile time length of DFHCOMMAREA. Failure to verify that EIBCALEN matches the length of the DFHCOMMAREA passed can lead to ASRA 0C4 ABENDs, storage overlays, or invalid data being moved into the working storage area of a program.

Can we go by the above statement.
Back to top
View user's profile Send private message

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Wed Apr 01, 2009 11:51 pm    Post subject:
Reply with quote

Quote:
Failure to verify that EIBCALEN matches the length of the DFHCOMMAREA passed can lead to ASRA 0C4 ABENDs, storage overlays, or invalid data being moved into the working storage area of a program.
Yes.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7997
Location: Bellevue, IA

PostPosted: Wed Apr 01, 2009 11:55 pm    Post subject:
Reply with quote

Yes -- it is incumbent upon the programmer to check that the expected length of DFHCOMMAREA is what was received per EIBCALEN. I have seen an error occur, from a copybook change not propagated to all programs, where the DFHCOMMAREA length was 6 bytes longer than expected -- a storage violation eventually occurred.
Back to top
View user's profile Send private message
Succor

New User


Joined: 20 Feb 2009
Posts: 96
Location: Bangalore :)

PostPosted: Thu Apr 02, 2009 12:08 am    Post subject: Reply to: EIBCALEN and LENGTH of DFHCOMMAREA
Reply with quote

Thanks ,i was expecting to hear from both of you.
To conclude
Quote:
The length of DFHCOMMAREA is set at compile time which should be checked against the execution time EIBCALEN value ...before going for a move.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Thu Apr 02, 2009 12:17 am    Post subject:
Reply with quote

Quote:
The length of DFHCOMMAREA is set at compile time....
It could be, but it doesn't need to be. It is usually set at execution time.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Thu Apr 02, 2009 1:55 am    Post subject: Reply to: EIBCALEN and LENGTH of DFHCOMMAREA
Reply with quote

If you define a WS area as PIC X(32763), which is the maximum length of a commarea, then (providing EIBCALEN > ZERO), move SPACES to the WS area and then use reference modification to move DFHCOMMAREA (1:EIBCALEN) to WS-COMMAREA (1:EIBCALEN). As a fail-safe, save EIBCALEN in a WS variable.

Storage (for the most part) is no longer an issue and 32K-4 in WS is nothing to worry about.

Regards,
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 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
No new posts Joinkeys operation when key1 and key2... Susanta DFSORT/ICETOOL 5 Wed Nov 02, 2016 5:35 pm
No new posts Format to pipe delimited with variabl... pshongal SYNCSORT 6 Wed Sep 14, 2016 2:48 pm


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