Solved

Does DB2 (exec sql) change any EIB fields in CICS?

Posted on 2010-11-26
12
1,072 Views
Last Modified: 2012-05-10
I have a program that runs CICS applications under TSO on IBM's Z/OS operating system. My program is called KICKS ( http://home.gci.net/~mike-noel/KICKS ).
I'm doing a demonstration of DB2 support under KICKS and have gotten a question I can't answer.
In 'real' CICS, does an EXEC SQL ever modify any EIB field (eibresp, eibresp2, eibfn, ...)? I think the answer is 'NO', but have been unable to find a definitive answer. Does anyone (a) know of a statement in any IBM publication where it says EIB fields are (or are not) modified? or (b) have an example showing some EIB field that is modified?
0
Comment
Question by:mikenoel
  • 3
  • 3
  • 2
  • +2
12 Comments
 
LVL 45

Expert Comment

by:Kdo
ID: 34219162
Hi Mike,

Items in an EIB may change, but not because of anything that DB2 does.  An EIB is a CICS buffer and contains information about the CICS session.  An SQLCA is a DB2 buffer and contains information about the DB2 session.

Here are a couple of descriptions of the EIB, from other articles:

An EIB is a CICS area that contains information related to the current task, which can be used for debugging the program. The most widely used variables are EIBDATE, EIBTIME, EIBAID, EIBCALEN, EIBCPOSN, EIBRESP, EIBRSRCE (resource), EIBFN (recent CICS command code), EIBTRMID and EIBTRNID.

The EXEC Interface Block (EIB) is the main means of communication between an application program and CICS. It includes fields that identify the transaction code, terminal and number of the current task. The EIB also has fields containing the results of the execution of CICS commands.


If something in the EIB changes, it's because the CICS session changed it.

Good Luck,
Kent
0
 

Author Comment

by:mikenoel
ID: 34219719
Thanks Kent. I think you are right "If something in the EIB changes, it's because the CICS session changed it" - ie - not an exec sql. However I'm seeking an authorative answer. Can you site an IBM reference? Best, Mike
0
 
LVL 45

Expert Comment

by:Kdo
ID: 34219746
Hi Mike,

I don't know of a document that draws that line in the sand.  However, DB2 communicates via the SQLCA (SQL Communications Area).  I'm unaware of any mechanism to use the EIB for DB2 communications.


Kent
0
 
LVL 57

Expert Comment

by:giltjr
ID: 34223247
You can read http://examples.oreilly.com/cics/CDROM/pdfs/cicsts/dfhg300.pdf

This is just one place you can read what EIB is and used for.

I am fairly sure that the EIB field is not for use by the program that is executed when you do an EXEC xxxx.  It is for use by CICS to show you the results of EXEC xxxx.  If the program xxxx wants to return a code, it needs have an work area that it uses to pass information back and forth to the calling program.
0
 

Author Comment

by:mikenoel
ID: 34223595
Thanks giltjr. I'd accept the Oreilly book as authorative (I think it's actually written by IBM) but I don't think it addresses my question. Actually, it scarcely mentions DB2. Best, Mike
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 57

Expert Comment

by:giltjr
ID: 34223749
Um, I guess it depends on how you look at it.  The lack of mentioning DB2 (or any other program) should tell you that they can't modify EIBRESP/EIBRESP2.  

Look at the codes for EIBRESP/EIBRESP2, they are all defined because CICS knows what they can be.  Is there any mention of "user" codes?

Since you seem to know your way around CICS, could you write a program that modifies EIBRESP/EIBRESP2?  I not really a CICS person, but have worked with it a little and I always thought EIBRESP/EIBRESP2 were read only from an application point of view.
0
 
LVL 45

Expert Comment

by:Kdo
ID: 34223885
Hi Mike,

Think about how these buffers are used.  When the program issues a DB2 call, the SQLCA block is passed to DB2.  The EIB is not.  DB2 doesn't know anything about it.

CICS may check the results of the call to DB2 and update the EIB, (I don't know about that), but since DB2 doesn't know the address of the EIB, it's not possible for DB2 to modify it.


Kent
0
 

Author Comment

by:mikenoel
ID: 34224306
Thanks Kent, giltjr; I think it's risky to infer something from silence. And you can see there is SOME coupling between cics and db2 from the fact that cedf traps exec sql's. So while I accept that db2 itself wouldn't modify the eib, it certainly would be possible for cics to do so thru the interface. That said, I have it from a former hersley guy (outside ee) that in fact cics does not, so I guess I should close this question. Thanks for your replies. Best, Mike
0
 
LVL 27

Expert Comment

by:tliotta
ID: 34296217
You can't expect that documentation would list processes that 'do not' affect some element. The lists would overwhelm all other documentation.

Tom
0
 

Accepted Solution

by:
ee_auto earned 0 total points
ID: 35913485
Question PAQ'd and stored in the solution database.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Recursive SQL in UDB/LUW (you can use 'recursive' and 'SQL' in the same sentence) A growing number of database queries lend themselves to recursive solutions.  It's not always easy to spot when recursion is called for, especially for people una…
Recursive SQL in UDB/LUW (it really isn't that hard to do) Recursive SQL is most often used to convert columns to rows or rows to columns.  A previous article described the process of converting rows to columns.  This article will build off of th…
This video discusses moving either the default database or any database to a new volume.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now