Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2003
    Posts
    2

    Unhappy Unanswered: Selecting Plan at runtime in client/server app

    My team is migrating a mainframe cobol system to microfocus cobol (version 4) running on windows 2000. DB2 UDB version 7 is also running on a windows 2000 server. In my mainframe experience, I am used to expilcitly specifying a plan name when I execute a program that uses DB2. My question is: When I execute a (batch) microfocus cobol program, how do i specify the associated plan? Or is it somehow done implicitly? I am connecting to DB2 with the SQL CONNECT statement, which requires that I specify a database, userid, and password. Is there some undocumented syntax that also allows me to specify a plan, or is there another way to connect to DB2 from microfocus cobol?

    Thanks!

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    In the DB2 V7 Application Building Guide, there is a chapter on "Building Applications for Windows, Micro-Focus COBOL," that should explain what you need to know.

    I know this is off-topic, but if you are starting off on a new project, starting with DB2 Version 8.1 will save a lot of upgrade work down the road.

  3. #3
    Join Date
    Sep 2003
    Posts
    2
    Originally posted by Marcus_A
    In the DB2 V7 Application Building Guide, there is a chapter on "Building Applications for Windows, Micro-Focus COBOL," that should explain what you need to know.

    I know this is off-topic, but if you are starting off on a new project, starting with DB2 Version 8.1 will save a lot of upgrade work down the road.

    I was hoping for something more than "read the manual", since I have already read the manual. BruceO

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    If you follow the directions in the manual for compile, bind, and link of the program, you wll notice that no package is selected when you run the program. If you have a problem after following the directions, let us know.

    [start quote of manual]

    There are three ways to run this embedded SQL application [the manual assumes that the program name is updat]:

    1. If accessing the sample database on the same instance, simply enter the executable name (without the extension):

    updat

    2. If accessing another database on the same instance, enter the executable name and the database name:

    updat database

    3. If accessing a database on another instance, enter the executable name, database name, and user ID and password of the database instance:

    updat database userid password

    [end quote of manual]

    Note that DB2 on Windows uses packages instead of plans, but it's basically the same concept.

Posting Permissions

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