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
 

 

why an invalid eibresp in B when A didn't pass dfheiblk?

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

Active User


Joined: 04 Nov 2006
Posts: 109

PostPosted: Fri May 21, 2010 3:19 am    Post subject: why an invalid eibresp in B when A didn't pass dfheiblk?
Reply with quote

Hi,

I know there are a lot of questions involving DFHEIBLK, but I just want to make sure I understand what happened in this situation.

We had a Cobol Cics subprogram B that was called by program A in the following way:

Program A:
Code:

77 SUBPROGR             PIC X(08) VALUE ‘B’.
77 WS-CICS-AREA      PIC X(85) VALUE SPACES.
01 WS-PARAMETER.
     03 ….   PIC X(123).
     03 …    PIC S9(09) COMP-3.
CALL SUBPROGR USING WS-CICS-AREA WS-PARAMETERS


SubProgram B:
Code:

LINKAGE SECTION.
 01 DFHCOMMAREA.
    03 LINK-PARAMETER.
       05 ….   PIC X(123).
       05 …    PIC S9(09) COMP-3.

PROCEDURE DIVIDION USING DFHCOMMAREA.

EXEC CICS
START BROWSE
FILE(…)
RESP(…)
END EXEC


Because of that, when trying to start a browse on a Vsam file under Cics, B was receiving an invalid EIBRESP.

The Cics guy told us to do the following:

Program A:
Code:

77 SUBPROGR             PIC X(08) VALUE ‘B’.
01 WS-PARAMETER.
     03 ….
     03 …
CALL SUBPROGR USING DFHEIBLK WS-PARAMETERS

It solved the problem.

He explained that the use of WS-CICS-AREA in program A was messing with EIBRESP in subprogram B when it attempted to execute a Cics API.

Can someone explain why?

My understanding is that that EIBRESP doesn't belong to B because it's defined in the Linkage Section.

Because A called B without the DFHEIBLK variable, is it true that NO EIBRESP was available to B when it needed it?

Thanks.
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: Fri May 21, 2010 5:39 am    Post subject: Reply to: why an invalid eibresp in B when A didn't pass dfh
Reply with quote

Any program that is passed through the CICS translator, automatically suffixed to the PROCEDURE DIVISION statement is DFHEIBLK DFHCOMMAREA.

If a program is intended to be CALLED, then the source code will look something like this -

Code:

       PROCEDURE DIVISION USING LS-PARM-REC.

In LINKAGE SECTION, you'll find -

Code:

       01  LS-PARM-REC PIC X(xxxx).

After passing through the translator and compiler, you'll find -

Code:

       PROCEDURE DIVISION USING DFHEIBLK DFHCOMMAREA LS-PARM-REC.

If a DFHCOMMAREA is not defined to LINKAGE, then the translator will insert a 01-Byte DFHCOMMAREA automatically. The DFHEIBLK will always be inserted by the translator. These insertions are based upon the translator options PROLOGUE and EPILOGUE being active, which is usually the case.

Regardless whether this is CICS or Batch, when program 'A' calls program 'B' and parms are passed from 'A' to 'B', the parameters are 'positional'. So, if 'A' calls 'B', using WS-YELLOW and 'B' is coded with PROCEDURE DIVISION USING LS-PURPLE, this is perfectly fine, although confusing.

If DFHEIBLK is not passed, then issue -

Code:

           EXEC CICS ADDRESS EIB(ADDRESS OF DFHEIBLK) END-EXEC.

HTH....

Bill
Back to top
View user's profile Send private message
jctgf
Currently Banned

Active User


Joined: 04 Nov 2006
Posts: 109

PostPosted: Fri May 21, 2010 6:34 am    Post subject:
Reply with quote

hey Bill,
program A didn't pass dfheiblk to B, but it passed a "pic x(85) value space" field instead.
isn't it the same as that yellow-purple thing you mentioned?
thanks?
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: Fri May 21, 2010 6:50 am    Post subject: Reply to: why an invalid eibresp in B when A didn't pass dfh
Reply with quote

Hello,

If the PIC X(85) field had the contents of DFHEIBLK moved to it before the CALL, then yes, that would have worked and would have acted as a positional parameter.

But, using DFHEIBLK and DFHCOMMAREA consistently, should be the method used.

Bill
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 INVALID FIELD OR CONSTANT IN SORTOF ?? Ron Klop DFSORT/ICETOOL 8 Wed Jan 11, 2017 3:44 pm
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts IEF645I INVALID REFERBACK IN THE RC ... abdulrafi JCL & VSAM 2 Mon Aug 29, 2016 10:57 am
No new posts Is it possible to pass variables of s... Csongor CLIST & REXX 2 Fri Jun 10, 2016 7:33 pm


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