View previous topic :: View next topic |
Author |
Message |
valeti_sashi Beginner

Joined: 11 May 2005 Posts: 12 Topics: 7 Location: Chennai, India
|
Posted: Tue Aug 29, 2006 12:36 am Post subject: SQL stored procedures |
|
|
Hi All,
i have created a COBOL stored ptrocedure in SPUFI. if i have to use the procedure in my program, what i have to do (ie shouild i complie the procedure, how to compile ?). please metion the steps in compliation of the procedure.
thanks in advance.
regards,
sashi |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12380 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
valeti_sashi Beginner

Joined: 11 May 2005 Posts: 12 Topics: 7 Location: Chennai, India
|
Posted: Wed Aug 30, 2006 1:36 am Post subject: |
|
|
Kolsu,
i know how to code these procedures, but my question is to use? i tried compiling of a simple COBOL procedure. My doubts are
1. do we have to create a Package for the procedure or only binding is enough.
2. After compilation, should we write a cobol program to use the procedure? can
we call the procedure outside mainframe, ie Java or any other open system
please anser these boubts.
thanks in advance,
rergards,
sashi. _________________ Regards,
Sashidhar |
|
Back to top |
|
 |
CZerfas Intermediate
Joined: 31 Jan 2003 Posts: 211 Topics: 8
|
Posted: Wed Aug 30, 2006 2:16 am Post subject: |
|
|
To 1.
Binding a stored procedure creates a DB2 package.
To 2.
A stored procedure can be used in an application program by issuing
"EXEC SQL CALL procedure-name;" With this, the using module itself has SQL statements embedded and is therefore a DB2 program itself.
regards
Christian |
|
Back to top |
|
 |
valeti_sashi Beginner

Joined: 11 May 2005 Posts: 12 Topics: 7 Location: Chennai, India
|
Posted: Wed Aug 30, 2006 3:17 am Post subject: |
|
|
Christian,
sorry my first is specfied wrongly, actual doubt is do we need to create a Plan or only binding is sufficient
thanks for the answers.
regards,
sashi. _________________ Regards,
Sashidhar |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12380 Topics: 75 Location: San Jose
|
Posted: Wed Aug 30, 2006 7:20 am Post subject: |
|
|
Quote: |
sorry my first is specfied wrongly, actual doubt is do we need to create a Plan or only binding is sufficient
|
How can you bind without a plan ? read the section 6.2.4.11 Preparing a stored procedure in the first link given by me and you will have a better understanding.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
|
|