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

LINKing DB2 Module


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

New User


Joined: 25 Jan 2008
Posts: 24
Location: india

PostPosted: Tue Oct 04, 2011 7:50 am
Reply with quote

Hi all,

I have a question regarding LINKing a DB2 - program from a Non-DB2 program

Scenario :-
I have a screen which takes input from the user, Transaction XXYY Program XXYYP00.This input has to be validated against the DB2 tables.

I have a separate LINK routine named LINKP00 for validation. My main program XXYYP00 does not have any SQL statements.

There will be several NON-DB2 transaction/programs that are going to call this LINKed program for the input validation.

If i have a transaction say LIT1, defined for the LINK routine, with an RCT Entry,do i need to have an RCT entry for transaction XXYY as well if i am going to use the following statement ?


Code:
EXEC CICS LINK
     PROGRAM ( LINKP00)
     TRANSID ( LIT1 )
     COMMAREA ( WS-COMMAREA )
     LENGTH ( LENGTH OF WS-COMMAREA )
END-EXEC.


I have never used the LINK statement with the TRANSID option. Can anyone pls help me with some useful info on this?

Is there any other way to avoid multiple RCT entries
Back to top
View user's profile Send private message
Eshwar CICS

New User


Joined: 18 May 2011
Posts: 47
Location: India

PostPosted: Tue Oct 04, 2011 10:19 am
Reply with quote

Is there a requirement to execute LINKP00 in another CICS region?
If yes,see below explanation from IBM manual:

"TRANSID(name)
Specifies the name of the mirror transaction that the remote region is to attach, and under which it is to run the server program. If you omit the TRANSID option, the CICS server region attaches CSMI. Note:
The TRANSID option specified on the LINK command overrides any TRANSID option specified on the program resource definition installed in the CICS server region.
While you can specify your own name for the mirror transaction initiated by DPL requests, the transaction must be defined in the server region, and the transaction definition must specify the mirror program, DFHMIRS. Defining your own transaction to invoke the mirror program gives you the freedom to specify appropriate values for some other options on the transaction resource definition."
Back to top
View user's profile Send private message
AneeshMani

New User


Joined: 25 Jan 2008
Posts: 24
Location: india

PostPosted: Tue Oct 04, 2011 10:54 am
Reply with quote

Hi Eswar,

Thanks for the reply.

No, the LINK Module runs in the same region. I am looking for a possibility to avoid having several RCT Entries..
Back to top
View user's profile Send private message
Eshwar CICS

New User


Joined: 18 May 2011
Posts: 47
Location: India

PostPosted: Tue Oct 04, 2011 10:58 am
Reply with quote

Below may be one of the possible way to avoid multiple RCT entries:

Excerpt from IBM's CICS DB2 guide:

"A transaction, or a group of transactions, can be associated with the DB2ENTRY".

"A DB2TRAN defines a transaction, or a group of transactions, associated with a
DB2ENTRY".

This can be accomplished with the help of "Wildcard characters for transaction IDs".
Back to top
View user's profile Send private message
AneeshMani

New User


Joined: 25 Jan 2008
Posts: 24
Location: india

PostPosted: Tue Oct 04, 2011 11:05 am
Reply with quote

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

Global Moderator


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

PostPosted: Tue Oct 04, 2011 11:32 am
Reply with quote

are there any cics api calls in the db2 program?

if not, why not simply issue a COBOL CALL to the db2 program?
Back to top
View user's profile Send private message
Eshwar CICS

New User


Joined: 18 May 2011
Posts: 47
Location: India

PostPosted: Tue Oct 04, 2011 2:34 pm
Reply with quote

Hi Dick,

If we use COBOL CALL to DB2 program (assuming there are no CICS API in the DB2 program), Is checking the authorization of transaction to access the DB2 tables not required?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Tue Oct 04, 2011 3:29 pm
Reply with quote

Quote:
Is checking the authorization of transaction to access the DB2 tables not required

and how would you accomplish that?
Back to top
View user's profile Send private message
Eshwar CICS

New User


Joined: 18 May 2011
Posts: 47
Location: India

PostPosted: Tue Oct 04, 2011 3:40 pm
Reply with quote

In Db2 program with CICS API, DB2TRAN & DB2ENTRY for the transaction will accomplish it. Not sure how it happens in COBOL CALL TO DB2 program(with no CICS API) executing in CICS environment.
Back to top
View user's profile Send private message
Eshwar CICS

New User


Joined: 18 May 2011
Posts: 47
Location: India

PostPosted: Tue Oct 04, 2011 3:42 pm
Reply with quote

Basically we will face AD2U abends if the DB2T & DB2E entries are missing for transaction invoking DB2 program with CICS API.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Tue Oct 04, 2011 3:50 pm
Reply with quote

our cics/db2 is set-up differently than yours.
I do not know the answer to your problem.
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 SXP Tool for PL1 or Module library ma... PL/I & Assembler 0
No new posts linking an ALC program to a Relationa... PL/I & Assembler 1
No new posts How to list BMS MAP screens in BMS Ph... CICS 2
No new posts unable to compile module PL/I & Assembler 6
No new posts I need help with analysis of a COBOL ... All Other Mainframe Topics 14
Search our Forums:

Back to Top