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
 

 

What are the steps to be followed in Binding

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

New User


Joined: 11 Jun 2005
Posts: 2

PostPosted: Sat Jun 11, 2005 7:12 pm    Post subject: DBRM size
Reply with quote

Hi,

While doing a Bind in COBOL-DB2 program, what are the steps to be followed / parameters to be checked for 1.Bind Package 2.Bind Plan?

Is there anything like DBRM size, if so, please explain me about it!

Why do we go for a Bind plan directly bypassing the bind package at times?
Back to top
View user's profile Send private message

priya

Moderator


Joined: 24 Jul 2003
Posts: 568
Location: Bangalore

PostPosted: Sun Jun 12, 2005 12:56 pm    Post subject:
Reply with quote

Quote:
While doing a Bind in COBOL-DB2 program, what are the steps to be followed


Check this page: http://ibmmainframes.com/jcls.php
Back to top
View user's profile Send private message
sangiah

New User


Joined: 10 Jun 2005
Posts: 62

PostPosted: Wed Jun 15, 2005 9:14 am    Post subject: Re: What are the steps to be followed in Binding
Reply with quote

Both Application Plans and Packages perform the same function with respect to db2 programs. They provide the connectivity between your program and the db2 database. The difference is that an Application Plan provides the connectivity for a complete program (including all of the called sub-programs) while a package can provide the connectivity for a single sub-program. Each program must have an application plan but packages are an optional component that makes maintaining the application plans much easier.

In order for your program to be able to be executed without giving a -818 SQLCODE you need to bind an application plan for your entire program. If you are just using application plans then you will need to rebind the entire application plan for your program whenever the program or any of its sub-programs is changed. This can be time consuming and does not provide a backup if the bind fails. If instead you build a package for each program and sub-program and just provide pointers to these packages in the final application plan for each program then recompiling a sub-program requires only that its corresponding package be rebound and not the application plans for all of the programs that reference that sub-program. This not only saves considerable execution time while the bind is running but also your online programs will be offline for a shorter time while a package is being rebound than they would be if you rebind the application plan. Also you only need to rebind the package corresponding to the one sub-program so only the sub-program corresponding to that package would be affected and not the entire transaction.
Back to top
View user's profile Send private message
iknow

Active User


Joined: 22 Aug 2005
Posts: 413
Location: Colarado, US

PostPosted: Mon Dec 12, 2005 8:17 pm    Post subject: Re: What are the steps to be followed in Binding
Reply with quote

Hi samy,

To your notice,

After bind you can run a cobol-db2 program by using the utility IKJEFT01 in the JCL.


Correct me if I am wrong.
Back to top
View user's profile Send private message
Jag

New User


Joined: 07 Dec 2005
Posts: 30
Location: India

PostPosted: Mon Dec 12, 2005 10:34 pm    Post subject: Re: What are the steps to be followed in Binding
Reply with quote

hi Friend,

I will help you in understanding the Plan and Pacake as well.

When a cobol-db2 program is compiled the precomiliation will be done right? where the all sql will be commented and replaced by the Cobol Call statements.The sql in the programs is extracted and put in one place DBRM'S which is similar as pacake. So,The package is nothing but the extarct of the SQl statemnts in the program.But the PLAN is compiled form of the Packages..in other words executable form of the Packages which contains all the accesspaths for executing SQL's which has to be used for the packages under that Plan...So there is no ? of binding the PLAN bithout binding the Package..If you binf the package the Plan will automatically get updated..

For information you can see the following system tables

SYSIBM.SYSPLAN
SYSIBM.SYSPACKAGE
SYSIBM.PLAN_TABLE
Back to top
View user's profile Send private message
Candy

New User


Joined: 09 Dec 2005
Posts: 16

PostPosted: Tue Dec 13, 2005 11:10 am    Post subject: Re: What are the steps to be followed in Binding
Reply with quote

Hi friends,

Anyone pl explain me about rebind. When we go for rebind.

ALso, If timestamp mismatch occurs, what do we nee to do? Help me out this.

I am not very much familiar with db2.

regards,
Candy
Back to top
View user's profile Send private message
iknow

Active User


Joined: 22 Aug 2005
Posts: 413
Location: Colarado, US

PostPosted: Tue Dec 13, 2005 12:10 pm    Post subject: Re: What are the steps to be followed in Binding
Reply with quote

Hi Candy,

Timestamp mismatch problem.

SQLCODE = -818.

Reason

THE PRECOMPILER GENERATED TIMESTAMP x IN THE LOAD MODULE IS DIFFERENT FROM THE BIND TIMESTAMP y BUILT FROM THE DBRM z.

Description

The SQL precompiler places timestamp 'y' in the DBRM, and time stamp 'x' in the parameter list in the application program for each SQL statement. At BIND time, DB2 stores the DBRM timestamp for run time use. At run time, timestamp 'x', for the SQL statement being processed,is compared with timestamp 'y' derived from the DBRM 'z' at BIND time. If the two timestamps do not match, the DBRM and the application program were not the result of the same precompile. This problem can occur if you: * Precompile, compile, and link, without doing a BIND of the application, * Precompile and BIND, without doing the compile and link for the application program, or * BIND the application using a DBRM that resulted from a different precompile of the application program than that which produced the object module that is linked into the application module. The timestamps 'x' and 'y' are DB2 internal timestamps. They do not have an external interpretation.

System Action

The statement cannot be executed.

User response

BIND the application again, using the DBRM for the application program that matches the object module.


Hope this helps.
Back to top
View user's profile Send private message
Candy

New User


Joined: 09 Dec 2005
Posts: 16

PostPosted: Tue Dec 13, 2005 5:19 pm    Post subject: Re: What are the steps to be followed in Binding
Reply with quote

I got yr info. Thanks a lot.
Back to top
View user's profile Send private message
Jag

New User


Joined: 07 Dec 2005
Posts: 30
Location: India

PostPosted: Tue Dec 13, 2005 8:40 pm    Post subject: Re: What are the steps to be followed in Binding
Reply with quote

Hi candy,

For youq ? when we have to rebing..Let us suppose when you change the sql's in a program and compile the program and run the program..Than it will take the previous plan only (which contaings the access paths and stuff of the previous SQL's)..and its will through an error...So in this kind of situations you have to Bind the packages..OK..
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 -419 SQL error when binding senthamizh DB2 2 Sun Jun 12, 2016 8:20 pm
This topic is locked: you cannot edit posts or make replies. Executing JCL specific steps at speci... Shruti Takkar JCL & VSAM 6 Mon Feb 22, 2016 12:39 pm
No new posts How steps execute in Job in case of a... richiewalia JCL & VSAM 4 Tue Jan 12, 2016 12:34 pm
No new posts Count the number of JCL executable steps nartcr JCL & VSAM 5 Wed Nov 05, 2014 2:57 am
No new posts How to start two steps simantaneously... mchanapa JCL & VSAM 11 Wed Dec 04, 2013 2:39 pm


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