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?
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):
2. If accessing another database on the same instance, enter the executable name and the database name:
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.