Skip to main content

[Migrated content. Thread originally posted on 25 June 2004]

I am trying to use the IBM Sample DB2 programs.
I have succesfully pre-compiled one (static) and am running it under windows2000.
The Accucorp compile is successfull, but every time i run the program, I get the following error -

sqlgstrt: Program missing or inaccessible
COBOL error at 000035 in static

the run statment is "crun32 static".

The api specified is available, in the sqllib/lib directory, and I have
added the path to the api in the project setting, runtime,object file library.

Could some-one please tell me what I am doing that is incorrect or missing.

Ta muchly

[Migrated content. Thread originally posted on 25 June 2004]

I am trying to use the IBM Sample DB2 programs.
I have succesfully pre-compiled one (static) and am running it under windows2000.
The Accucorp compile is successfull, but every time i run the program, I get the following error -

sqlgstrt: Program missing or inaccessible
COBOL error at 000035 in static

the run statment is "crun32 static".

The api specified is available, in the sqllib/lib directory, and I have
added the path to the api in the project setting, runtime,object file library.

Could some-one please tell me what I am doing that is incorrect or missing.

Ta muchly
Hi

if the api-library is a windows-dll than you must insert a call of the dll to load it.

example: if you want to call a api-function of kernel32.dll you must do the following in your program:

call 'kernel32.dll'.

....

call 'api' using ...

[Migrated content. Thread originally posted on 25 June 2004]

I am trying to use the IBM Sample DB2 programs.
I have succesfully pre-compiled one (static) and am running it under windows2000.
The Accucorp compile is successfull, but every time i run the program, I get the following error -

sqlgstrt: Program missing or inaccessible
COBOL error at 000035 in static

the run statment is "crun32 static".

The api specified is available, in the sqllib/lib directory, and I have
added the path to the api in the project setting, runtime,object file library.

Could some-one please tell me what I am doing that is incorrect or missing.

Ta muchly
I already do a
call "sqlgstrt" using ......
and this a part of the module "dp2api.lib".
It does not seem to load the "db2api.lib" at run time.

Any suggestions etc...


Ta muchly

[Migrated content. Thread originally posted on 25 June 2004]

I am trying to use the IBM Sample DB2 programs.
I have succesfully pre-compiled one (static) and am running it under windows2000.
The Accucorp compile is successfull, but every time i run the program, I get the following error -

sqlgstrt: Program missing or inaccessible
COBOL error at 000035 in static

the run statment is "crun32 static".

The api specified is available, in the sqllib/lib directory, and I have
added the path to the api in the project setting, runtime,object file library.

Could some-one please tell me what I am doing that is incorrect or missing.

Ta muchly
You cannot load a .lib file. Those are intended for linking. Look around to see if you can find a similar file with the extension .dll instead, and then load that one.

If there is no .dll, you will have to relink the runtime with the db2 sql libraries, not a big deal, but you'd be better of with some guidance, which I recommend you contact tech support to get.

[Migrated content. Thread originally posted on 25 June 2004]

I am trying to use the IBM Sample DB2 programs.
I have succesfully pre-compiled one (static) and am running it under windows2000.
The Accucorp compile is successfull, but every time i run the program, I get the following error -

sqlgstrt: Program missing or inaccessible
COBOL error at 000035 in static

the run statment is "crun32 static".

The api specified is available, in the sqllib/lib directory, and I have
added the path to the api in the project setting, runtime,object file library.

Could some-one please tell me what I am doing that is incorrect or missing.

Ta muchly
OK, this then leads on -

I found the .dll file and called it in the program to load it into memory. Now, when I try to call the first subroutine, I get a memory access violation. Is this to do with the way the parametrs are passed?


On another note, how do I do a re-link ?


Ta muchly.

[Migrated content. Thread originally posted on 25 June 2004]

I am trying to use the IBM Sample DB2 programs.
I have succesfully pre-compiled one (static) and am running it under windows2000.
The Accucorp compile is successfull, but every time i run the program, I get the following error -

sqlgstrt: Program missing or inaccessible
COBOL error at 000035 in static

the run statment is "crun32 static".

The api specified is available, in the sqllib/lib directory, and I have
added the path to the api in the project setting, runtime,object file library.

Could some-one please tell me what I am doing that is incorrect or missing.

Ta muchly
Hi g2paul,

It may be possible to set the environment varaible

DLL-CONVENTION to 0 for calling the dll with C-Convention

or

DLL-CONVENTION to 1 for calling the dll with Pascal/WINAPI-Convention

Normaly under Windows the PASCAL/WINAPI-Convnetion is used.
You must set this variable before the inital call of the dll.
Take a look into the AcuCorp-Documentation " ACUCOBOL-GT Appendices Version 6.1" in "Appendix H: Configuration File Entries" for more information about this feature

[Migrated content. Thread originally posted on 25 June 2004]

I am trying to use the IBM Sample DB2 programs.
I have succesfully pre-compiled one (static) and am running it under windows2000.
The Accucorp compile is successfull, but every time i run the program, I get the following error -

sqlgstrt: Program missing or inaccessible
COBOL error at 000035 in static

the run statment is "crun32 static".

The api specified is available, in the sqllib/lib directory, and I have
added the path to the api in the project setting, runtime,object file library.

Could some-one please tell me what I am doing that is incorrect or missing.

Ta muchly
That got it working.......


Thanks.