Results 1 to 11 of 11
  1. #1
    Join Date
    Feb 2009
    Posts
    27

    Unanswered: 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

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    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.

  3. #3
    Join Date
    Feb 2009
    Posts
    27
    Hi sathyaram,

    Great Thanks!!

    They are on V9 these things still valid?

    Thanks and Regards,
    MAhesh

  4. #4
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    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.

  5. #5
    Join Date
    Feb 2009
    Posts
    27
    Well certainly not !!

    Thanks anyways

  6. #6
    Join Date
    May 2009
    Posts
    508
    Provided Answers: 1
    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

  7. #7
    Join Date
    Feb 2009
    Posts
    27
    Thanks for that info.

  8. #8
    Join Date
    Jan 2009
    Location
    Zoetermeer, Holland
    Posts
    746
    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.

  9. #9
    Join Date
    Feb 2009
    Posts
    27
    Thanks to all - we have solution now

  10. #10
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    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.

  11. #11
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •