Skip to main content
Hello, good afternoon,

I am working with windows 10, oracle 11 and net express 5.1. Right now when I'm debugging,
I get this error. What should you modify or add so that I don't skip. Please explain in detail all the steps to follow,
I am new to this program.

Kind Regards and thanks in advance

Hello, good afternoon,

I am working with windows 10, oracle 11 and net express 5.1. Right now when I'm debugging,
I get this error. What should you modify or add so that I don't skip. Please explain in detail all the steps to follow,
I am new to this program.

Kind Regards and thanks in advance

This question should be in the Net Express forum and not the Visual COBOL one.

SQLADR is an entry point in the Oracle run-time ORASQL11.DLL. The easiest way to fix the 173 error is to load the Oracle run-time when the program starts.

You can try adding the following to the top of your program:

working-storage section.

01 pp procedure-pointer.

procedure division.

set pp to entry "ORASQL11"

The file orasql11.dll, which is part of the Oracle installation must be within the system PATH in order for it to be loaded properly.


This question should be in the Net Express forum and not the Visual COBOL one.

SQLADR is an entry point in the Oracle run-time ORASQL11.DLL. The easiest way to fix the 173 error is to load the Oracle run-time when the program starts.

You can try adding the following to the top of your program:

working-storage section.

01 pp procedure-pointer.

procedure division.

set pp to entry "ORASQL11"

The file orasql11.dll, which is part of the Oracle installation must be within the system PATH in order for it to be loaded properly.

Hello Chris,

How i can load the Oracle run-time when the program starts? I put in my local enviroment variables the path C:\\Program Files (x86)\\Oracle\\product\\11.2.0.4_32Bit\\client_1\\bin.

The precompilador that I uses is: OBJ(%TARGETDIR\\%BASENAME.OBJ)  PREPROCESS "COBSQL" CSQLT=ORA8 END-C  PICX=VARCHAR2   CSTART CSTOP PREPROCESS"CP";

I need to change the variable CSQLT, instead of ORA8, use ORA11?

Kind regargds


Hello Chris,

How i can load the Oracle run-time when the program starts? I put in my local enviroment variables the path C:\\Program Files (x86)\\Oracle\\product\\11.2.0.4_32Bit\\client_1\\bin.

The precompilador that I uses is: OBJ(%TARGETDIR\\%BASENAME.OBJ)  PREPROCESS "COBSQL" CSQLT=ORA8 END-C  PICX=VARCHAR2   CSTART CSTOP PREPROCESS"CP";

I need to change the variable CSQLT, instead of ORA8, use ORA11?

Kind regargds

The CSQLT=ORA8 directive means Oracle 8 or higher.
Does the set procedure-pointer statement that I indicated not fix the problem?

Is your application 32-bit or 64-bit? 


The CSQLT=ORA8 directive means Oracle 8 or higher.
Does the set procedure-pointer statement that I indicated not fix the problem?

Is your application 32-bit or 64-bit? 

Hello Chris, My application es 32-bit. Kind Regards


Hello Chris, My application es 32-bit. Kind Regards

Hi Rachel, You still haven't answered my question regarding the set procedure-pointer code that I outlined above. Did adding this code to your program solve the 173 error or are you still getting the error?

An alternative to loading the ORASQL11.DLL by procedure-pointer, if you are linking your code to .exe is to add the Oracle link library to your link settings and add the LITLINK directive to your additional directives. The Link Library tab is under Project->Build Settings-->Link->Advanced

Add the full path to the orasql11.lib file which is under the precomp\\lib folder of the Oracle install.
For example on my Oracle 12 system this would be:
C:\\app\\client\\crg\\product\\12.2.0\\client_1\\precomp\\lib\\orasql12.lib


Hi Rachel, You still haven't answered my question regarding the set procedure-pointer code that I outlined above. Did adding this code to your program solve the 173 error or are you still getting the error?

An alternative to loading the ORASQL11.DLL by procedure-pointer, if you are linking your code to .exe is to add the Oracle link library to your link settings and add the LITLINK directive to your additional directives. The Link Library tab is under Project->Build Settings-->Link->Advanced

Add the full path to the orasql11.lib file which is under the precomp\\lib folder of the Oracle install.
For example on my Oracle 12 system this would be:
C:\\app\\client\\crg\\product\\12.2.0\\client_1\\precomp\\lib\\orasql12.lib

Hello Chris,

Sorry for my lateness. Yes, the first solution you told me works. The problem is that they would be modifying many programs, which implies having to make new executables and so on... That's why I was asking about the second option. Because, how you say, I should not modify the code and it is only at the project configuration level. A question about the LITLINK directive, how is it introduced? Something special must be added or it goes directly into the precompiler regardless of its position. 

Kind Regards and thank you in advance.


Hello Chris,

Sorry for my lateness. Yes, the first solution you told me works. The problem is that they would be modifying many programs, which implies having to make new executables and so on... That's why I was asking about the second option. Because, how you say, I should not modify the code and it is only at the project configuration level. A question about the LITLINK directive, how is it introduced? Something special must be added or it goes directly into the precompiler regardless of its position. 

Kind Regards and thank you in advance.

Hi Rachel,

The 'set pp to entry "ORASQL11" that Chris mentioned only needs to be done at the start of the main program. Once loaded it is available to that program and any subprograms it calls. It would not be necessary to change all of your programs.

If however you have multiple separate executables and don't want to change the existing source code there are a couple of possibilities.

If you use the LITLINK directive it will need to be set when the program is compiled. If it is being built from a Net Express project select the Project menu, then 'Properties...' and add LITLINK to the Project Properties. Or if you just want to set if for a specific program eg the main program you can right-click on the file in the project, select Build settings...' and add it to the Directives in the Compile tab. 

Alternatively, you can use the 'set pp..' solution without changing any existing source code by creating a separate program containing it and call it by adding the INITCALL'yournewprogram' compiler directive as you would for LITLINK above. 

Gael


Hello Chris,

Sorry for my lateness. Yes, the first solution you told me works. The problem is that they would be modifying many programs, which implies having to make new executables and so on... That's why I was asking about the second option. Because, how you say, I should not modify the code and it is only at the project configuration level. A question about the LITLINK directive, how is it introduced? Something special must be added or it goes directly into the precompiler regardless of its position. 

Kind Regards and thank you in advance.

May I suggest this,

The problem is the file %ORACLE_HOME%/bin/orasqlN.dll where N=your oracle client version locally for instance orasql11.dll and the fact that Net Express is looking for orasql8.dll.

The simplest solution, to avoid entry points is to make a copy of orasqlN.dll i the bin directory and name it orasql8.dll

Hope this helps,

Robert


May I suggest this,

The problem is the file %ORACLE_HOME%/bin/orasqlN.dll where N=your oracle client version locally for instance orasql11.dll and the fact that Net Express is looking for orasql8.dll.

The simplest solution, to avoid entry points is to make a copy of orasqlN.dll i the bin directory and name it orasql8.dll

Hope this helps,

Robert

Hello again,

Thank you all very much for your help. In the end I have chosen Robert's option, it implies not having to modify each of the projects that I have, which are quite a few. And with the solution that I have given Robert it works perfectly!!! I thank you all for the help you have offered me and that in the end has helped me to get out of this problem. Thank you again, best regards


May I suggest this,

The problem is the file %ORACLE_HOME%/bin/orasqlN.dll where N=your oracle client version locally for instance orasql11.dll and the fact that Net Express is looking for orasql8.dll.

The simplest solution, to avoid entry points is to make a copy of orasqlN.dll i the bin directory and name it orasql8.dll

Hope this helps,

Robert

Hello again,

Thank you all very much for your help. In the end I have chosen Robert's option, it implies not having to modify each of the projects that I have, which are quite a few. And with the solution that I have given Robert it works perfectly!!! I thank you all for the help you have offered me and that in the end has helped me to get out of this problem. Thank you again, best regards