If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > ZOS DB2 - Stored proceedure with both language SQL and Cobol

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-02-11, 08:14
mahesh_terdal mahesh_terdal is offline
Registered User
 
Join Date: Feb 2009
Posts: 27
ZOS DB2 - Stored proceedure with both language SQL and Cobol

Hi ALL,

One of our client is unable to execute the standard SQL scripts on their ZOS DB2, it is because our scripts make use of stored procedure and uses "lang=SQL"

in their environment they have lang=COBOL.

See the note from them.

>>As a standard we use external STORED PROCEDURES (SP) with language COBOL.
>>To create SPs with lang=SQL we need to set up the environment accordingly

We cannot test this as we don't have ZOS.

Can you guys please help us what tweaking measures should be takes in such scenario's.

Any help will be highly appreciated.

Thanks and Regards,
MAhesh
Reply With Quote
  #2 (permalink)  
Old 02-02-11, 09:10
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
What version of zos db2 are you on?
Read the part of sql stored proc requirements for that version.

in v8 for example, you need C compiler to create sql procs ... not sure how it is in recent versions

DB2 V8 - Application programming and SQL - Preparing an SQL procedure

hth

sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #3 (permalink)  
Old 02-02-11, 09:21
mahesh_terdal mahesh_terdal is offline
Registered User
 
Join Date: Feb 2009
Posts: 27
Hi sathyaram,

Great Thanks!!

They are on V9 these things still valid?

Thanks and Regards,
MAhesh
Reply With Quote
  #4 (permalink)  
Old 02-02-11, 09:42
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
As I mentioned before, I am not sure about recent versions. Do you expect me to find the information for you?

report back if you find the answer please.
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #5 (permalink)  
Old 02-02-11, 09:44
mahesh_terdal mahesh_terdal is offline
Registered User
 
Join Date: Feb 2009
Posts: 27
Well certainly not !!

Thanks anyways
Reply With Quote
  #6 (permalink)  
Old 02-02-11, 13:07
Stealth_DBA Stealth_DBA is offline
Registered User
 
Join Date: May 2009
Posts: 472
With V9 z/OS, you do not need a C compiler. You can create Native SQL stored procedures or you can create external Stored procedures.
DB2 9 - Administration - Creating stored procedures
Reply With Quote
  #7 (permalink)  
Old 02-03-11, 04:40
mahesh_terdal mahesh_terdal is offline
Registered User
 
Join Date: Feb 2009
Posts: 27
Thanks for that info.
Reply With Quote
  #8 (permalink)  
Old 02-03-11, 06:49
dr_te_z dr_te_z is offline
Registered User
 
Join Date: Jan 2009
Location: Zoetermeer, Holland
Posts: 555
Quote:
Originally Posted by mahesh_terdal View Post
We cannot test this as we don't have ZOS.
As long as you are in the phase of developing & unittesting you do not need a mainframe. Just install db2-express-c and open-cobol on a linux machine and start coding your COBOL with inline SQL source. You can db2-precompile/compile and bind like you are used to and test you modules by just calling them. (a cobol SP has exactly the same syntax as a "normal" cobol sub-program). This approach forces you to code in standard cobol-85 syntax... I would not call that a disadvantage

When you reach the system-test phase you'll need the mainframe...But your work as a programmer is done.
Reply With Quote
  #9 (permalink)  
Old 02-04-11, 02:20
mahesh_terdal mahesh_terdal is offline
Registered User
 
Join Date: Feb 2009
Posts: 27
Thanks to all - we have solution now
Reply With Quote
  #10 (permalink)  
Old 02-04-11, 07:20
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Quote:
Originally Posted by mahesh_terdal View Post
Thanks to all - we have solution now
would you mind sharing ?
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #11 (permalink)  
Old 02-04-11, 07:22
mahesh_terdal mahesh_terdal is offline
Registered User
 
Join Date: Feb 2009
Posts: 27
Not at all Satyaram - We problem was with stored procedures we are planning to re write scripts such that they do not make use of stored procedures
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On