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
 

 

LINKing DB2 Module

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
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    Post subject: LINKing DB2 Module
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    Post subject:
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    Post subject: Reply to: LINKing DB2 Module
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    Post subject:
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    Post subject: Reply to: LINKing DB2 Module
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    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 Copybook structure in Load module Vai123 COBOL Programming 7 Fri Sep 16, 2016 8:29 pm
No new posts How to get the program name of callin... pkmurali COBOL Programming 8 Mon Aug 01, 2016 3:36 am
No new posts Search a Load Module sreekanth1984 TSO/ISPF 8 Tue Jun 07, 2016 8:45 pm
No new posts user abend 4038 occurred in module CE... Musab Ahmed PL/I & Assembler 1 Wed Mar 30, 2016 10:49 am
No new posts CEE3501S The module DSNHADDR was not ... Sayan Bhattacharyya ABENDS & Debugging 11 Tue Oct 20, 2015 3:53 pm


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