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
 

 

DB2 plan for DSNTEP2 / DSNTEP4

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

New User


Joined: 05 May 2010
Posts: 19
Location: USA

PostPosted: Thu Jan 21, 2016 1:08 am    Post subject: DB2 plan for DSNTEP2 / DSNTEP4
Reply with quote

I am trying to understand how the batch Spufi programs DSNTEP2 / 4 can process any sql statement against any database schema in a DB2 subsystem. These are PL/I programs bound to DB2 plan DSNTEP2 (or any other name) to process SQL dynamically, when invoked through TSO batch program IKJEFT01 in a JCL.

Now, when a DB2 plan is created, it has a qualifier in Bind Plan command and the plan or any package bound to the plan can execute sql against the the objects within that schema / qualifier only.
But through DSNTEP program we can execute sql against any schema dynamically. I am not sure how the plan access is working here. Can someone please help understand the process here?

Thanks in advance
Back to top
View user's profile Send private message

Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Thu Jan 21, 2016 1:23 am    Post subject:
Reply with quote

Binding indicates which of the FOO tables on the system the program should operate on; the subsystem and schema are specified at (package) bind time. If you do triple qualification of table names in the dynamic SQL, you can operate on any table (assuming, of course, that you have the appropriate privileges on it).
Back to top
View user's profile Send private message
Mainak_Dalal

New User


Joined: 05 May 2010
Posts: 19
Location: USA

PostPosted: Thu Jan 21, 2016 1:35 am    Post subject:
Reply with quote

Akatsukami, thanks for reply. What are FOO tables? Also what does qualifier signifies in BIND PLAN statement? Will the plan be able to access tables outside the schema / qualifier?

Also by triple qualification, do you mean DB.Schema.Table?
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Thu Jan 21, 2016 1:46 am    Post subject:
Reply with quote

I was an avid reader of Ed Yourdon; he used FOO and BAR as examples for pretty much.

A package is bound to a given subsystem and schema. Since a plan can have more than one package in it, it can access many subsystems and schemata, although a given routine can only access a certain subsystem/schema combination at a time (accessing a different combination requires a rebind).

Triple qualification would be subsystem.schema.table. I use dynamic SQL in Rexx frequently; the tables are always specified that way.
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 -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Program and its corresponding plan vickey_dw DB2 4 Thu Apr 07, 2016 9:27 pm
No new posts Should we Rebind Plan if no SQL changes sappy_mf DB2 2 Thu Mar 03, 2016 2:13 pm
No new posts What's plan, package, bind ? jackzhang75 DB2 2 Sun Feb 28, 2016 7:29 pm
No new posts Multiple COBOL-DB2 pragrams calling b... deepak_shrivastava DB2 1 Wed Jan 06, 2016 3:45 pm
No new posts Java interaction with CICS-Db2. direc... Harsha1525 DB2 0 Mon Aug 17, 2015 2:16 pm


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