Home > Archive > Cobol > April 2004 > Server Express 64bit and Oracle 9i problem (114) on AIX 5.2
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Server Express 64bit and Oracle 9i problem (114) on AIX 5.2
|
|
| Panos Zotos 2004-03-31, 2:30 am |
| Hi all,
I hope someone has come accross the issue of using 64bit Oracle 9i (r2)
along with Micro Focus Server Express 64bit succesfully so he can give some
advice.
The problem I have started when trying to create a simple Cobol program that
uses embeded SQL statements in order to access a 64bit oracle server on AIX
5.2. Following the documentation instructions I first created a new runtime
including Oracle's libraries using the
make LOC_RTSORA=newrts -f ins_precomp.mk newrts
statement. The link file pointed to 32bit libraries, so the cobol linker
gave me a number of errors ("bad magic errors") in the first place. I think
I got over that by making a small alteration in the ins_precomp.mk file by
having it pointing to the 64bit Oracle libraries. The case is that I created
the "newrts" file which I copied on top of rts64 (I also used the cobfile
command and verified that it is a valid 64bit Cobol application).
I also managed to compile my program cleanly against the Oracle database.
Although the specific program I tested is a very simple one (it only
executes a connect and a disconnect statement with valid credentials), I
always get a 114 runtime error (signal 11). I simply cannot understand where
is the problem (especially since 114 is not easy to locate),
so if anyone has managed to have Server Express 64bit and Oracle 9i 64 bit
up and running together I would appreciate if he could help.
(Since I am not 100% sure that the new rts I created after changing the
oracle's makefile is valid - does anybody have any official instructions
from Oracle on how to rebuild a 64bit Cobol rts with Oracle support?)
thanks in advance
Panos
| |
| Simon Tobias 2004-03-31, 8:30 am |
| Hi Panos.
Which version of Server Express are you using? Also, are you using Cobsql
during your compilation process? If you are, Micro Focus only supports using
it for precompiling 64-bit COBOL/Oracle apps from Server Express 2.2 SP1
onwards. Before that release, Cobsql would potentially invoke the 32-bit
version of Pro*COBOL, rather than the 64-bit version (which would lead to an
RTS114 at execution time).
As I don't believe I can attach files to this newsgroup (?), I will email
you a script which you can use to create a COBOL run-time which you can use
to execute Oracle applications. We have been using this internally for some
time for testing Cobsql in both 32-bit and 64-bit modes. The script assumes
that the makefiles under $ORACLE_HOME/precomp/lib are in the state as
provided by Oracle.
SimonT.
| |
| Panos Zotos 2004-03-31, 9:30 am |
| Thank you Simon,
I also responded to your email with the attachement, but for the record: I'm
using SE 4.0 and one mistake for sure is that I replaced rts64 and not
rts64_t. I also don't know if the rts I built is a multithreaded one or not
since I didn't use any -t switch.
I hope your script will help.
thanks
panos
"Simon Tobias" <Simon.Tobias@nospam.microfocus.com> wrote in message
news:c4eebn$acp$1@hyperion.microfocus.com...
> Hi Panos.
>
> Which version of Server Express are you using? Also, are you using Cobsql
> during your compilation process? If you are, Micro Focus only supports
using
> it for precompiling 64-bit COBOL/Oracle apps from Server Express 2.2 SP1
> onwards. Before that release, Cobsql would potentially invoke the 32-bit
> version of Pro*COBOL, rather than the 64-bit version (which would lead to
an
> RTS114 at execution time).
>
> As I don't believe I can attach files to this newsgroup (?), I will email
> you a script which you can use to create a COBOL run-time which you can
use
> to execute Oracle applications. We have been using this internally for
some
> time for testing Cobsql in both 32-bit and 64-bit modes. The script
assumes
> that the makefiles under $ORACLE_HOME/precomp/lib are in the state as
> provided by Oracle.
>
> SimonT.
>
>
| |
| Panos Zotos 2004-03-31, 10:30 am |
| Hi Simon,
I tried to run the script and I get an error "no rule to make rtsora64". is
there something missing?
thanks in advance
Panos
"Simon Tobias" <Simon.Tobias@nospam.microfocus.com> wrote in message
news:c4eebn$acp$1@hyperion.microfocus.com...
> Hi Panos.
>
> Which version of Server Express are you using? Also, are you using Cobsql
> during your compilation process? If you are, Micro Focus only supports
using
> it for precompiling 64-bit COBOL/Oracle apps from Server Express 2.2 SP1
> onwards. Before that release, Cobsql would potentially invoke the 32-bit
> version of Pro*COBOL, rather than the 64-bit version (which would lead to
an
> RTS114 at execution time).
>
> As I don't believe I can attach files to this newsgroup (?), I will email
> you a script which you can use to create a COBOL run-time which you can
use
> to execute Oracle applications. We have been using this internally for
some
> time for testing Cobsql in both 32-bit and 64-bit modes. The script
assumes
> that the makefiles under $ORACLE_HOME/precomp/lib are in the state as
> provided by Oracle.
>
> SimonT.
>
>
| |
| Simon Tobias 2004-04-01, 5:30 am |
| Hi Panos,
the script I provided is running fine for me using SX 4.0, and Oracle
9.2.0.5.
If you invoke the makefiles directly, while logged in under your Oracle user
ID thus :
cd $ORACLE_HOME/precomp/lib
make -f ins_precomp.mk rtsora
It will relink rtsora -- a 64-bit COBOL Run-Time -- which will end up in
your $ORACLE_HOME/bin directory.
I just tried that on my installation here, along with the command you're
attempting -- make LOC_RTSORA=newrts -f ins_precomp.mk newrts -- and both
are working ok for me, picking up libraries and objects from under
$ORACLE_HOME/lib (rather than lib32).
Which files are you seeing being reported as 32-bit files?
SimonT.
| |
| Panos Zotos 2004-04-02, 5:30 am |
| Hi Simon,
I just don't get it, there must be I keep doing wrong but I don't know what.
I installed the 32bit version of Server Express 4.0, followed all the
instructions in the documentation and ended up with a rts that works fine!
The 64bit one keeps sending back a 114 error which I cannot resolve.
panos
"Simon Tobias" <Simon.Tobias@nospam.microfocus.com> wrote in message
news:c4gobl$i8s$1@hyperion.microfocus.com...
> Hi Panos,
>
> the script I provided is running fine for me using SX 4.0, and Oracle
> 9.2.0.5.
>
> If you invoke the makefiles directly, while logged in under your Oracle
user
> ID thus :
>
> cd $ORACLE_HOME/precomp/lib
> make -f ins_precomp.mk rtsora
>
> It will relink rtsora -- a 64-bit COBOL Run-Time -- which will end up in
> your $ORACLE_HOME/bin directory.
>
> I just tried that on my installation here, along with the command you're
> attempting -- make LOC_RTSORA=newrts -f ins_precomp.mk newrts -- and both
> are working ok for me, picking up libraries and objects from under
> $ORACLE_HOME/lib (rather than lib32).
>
> Which files are you seeing being reported as 32-bit files?
>
> SimonT.
>
>
| |
| Simon Tobias 2004-04-02, 6:30 am |
| Hi Panos.
Assuming that the commands I suggested below for building the 64-bit RTS are
working correctly, how are you precompiling and compiling the COBOL
application?
SimonT.
"Panos Zotos" <pzotos@syntax.gr> wrote in message
news:86abc.106821$FJ6.3917960@twister1.libero.it...
> Hi Simon,
>
> I just don't get it, there must be I keep doing wrong but I don't know
what.
>
> I installed the 32bit version of Server Express 4.0, followed all the
> instructions in the documentation and ended up with a rts that works fine!
> The 64bit one keeps sending back a 114 error which I cannot resolve.
>
> panos
>
>
> "Simon Tobias" <Simon.Tobias@nospam.microfocus.com> wrote in message
> news:c4gobl$i8s$1@hyperion.microfocus.com...
> user
both[color=darkred]
>
>
| |
| Panos Zotos 2004-04-02, 9:30 am |
| I use :
cob -t -g prog.cbl
to create a multi-threaded program. My cobol.dir file includes
confirm
p(cobsql) csqlt=oracle8 sqldebug display verbose trace deb end-c mode=ansi
endp
I then run the program using
cobrun_t prog.int
having first copied the rts I build on top of rts64_t
The same scenario worked from the first time using the 32bit product.
One thing I noticed today, is that the procob precompiler cannot be relinked
succesfully. When I try to run "relink precomp" to link all precompilers
according to Oracle instructions, I get an error when procob is reached,
mentioning a bad magic number. The strange part is that procob exists and
works, although it does not vaildate as a 64bit application using cobfile
(but anyway does it matter if procob is 32bit or 64bit since all it does is
to create cobol code with expanded sql statements...)
Panos
"Simon Tobias" <Simon.Tobias@nospam.microfocus.com> wrote in message
news:c4jdvg$rvf$1@hyperion.microfocus.com...
> Hi Panos.
>
> Assuming that the commands I suggested below for building the 64-bit RTS
are
> working correctly, how are you precompiling and compiling the COBOL
> application?
>
> SimonT.
>
>
> "Panos Zotos" <pzotos@syntax.gr> wrote in message
> news:86abc.106821$FJ6.3917960@twister1.libero.it...
> what.
fine![color=darkred]
Oracle[color=darkred]
in[color=darkred]
you're[color=darkred]
> both
>
>
| |
| Simon Tobias 2004-04-02, 9:30 am |
| Hi Panos.
I think we'd be better discussing this on the Micro Focus forum, accessible
from http://www.cobolportal.com . :-)
It sounds like the operating mode of COBOL -- i.e. 32-bit or 64-bit --
doesn't match your Oracle environment. On AIX, there are separate 32-bit and
64-bit products. If you're getting 'bad magic number' errors, it sounds like
your COBDIR/LIBPATH/PATH setting may be pointing to the wrong Server Express
product.
It *does* matter whether you use procob -- the 64-bit Pro*COBOL -- or
procob32, as they will generate different code, including the sizes of
variables passed into/from Oracle as pointers. If you use the wrong procob,
you will get RTS114 errors at execution time.
Cobsql will, from SX 2.2 SP1 onwards, support 64-bit Pro*COBOL. This ensures
that the correct procob binary gets called for your COBOL working mode, i.e.
32-bit or 64-bit.
As you've specified SQLDEBUG, you should see the command invoked by Cobsql.
Could you tell me what that is please? Also, when compiling your program, if
you pass the -v flag (verbose), please tell me what gets displayed.
Thanks.
Simon.
"Panos Zotos" <pzotos@syntax.gr> wrote in message
news:42ebc.103917$Kc3.3377921@twister2.libero.it...
> I use :
>
> cob -t -g prog.cbl
>
> to create a multi-threaded program. My cobol.dir file includes
>
> confirm
> p(cobsql) csqlt=oracle8 sqldebug display verbose trace deb end-c
mode=ansi
> endp
>
> I then run the program using
>
> cobrun_t prog.int
>
> having first copied the rts I build on top of rts64_t
>
> The same scenario worked from the first time using the 32bit product.
>
>
> One thing I noticed today, is that the procob precompiler cannot be
relinked
> succesfully. When I try to run "relink precomp" to link all precompilers
> according to Oracle instructions, I get an error when procob is reached,
> mentioning a bad magic number. The strange part is that procob exists and
> works, although it does not vaildate as a 64bit application using cobfile
> (but anyway does it matter if procob is 32bit or 64bit since all it does
is
> to create cobol code with expanded sql statements...)
>
> Panos
>
>
>
> "Simon Tobias" <Simon.Tobias@nospam.microfocus.com> wrote in message
> news:c4jdvg$rvf$1@hyperion.microfocus.com...
> are
> fine!
Oracle[color=darkred]
> Oracle
up[color=darkred]
> in
> you're
>
>
| |
| sprog 2004-04-15, 11:17 pm |
| Hi Panos and Simon
We have exactly the same problem. We followed you to the Micro Focus forum but could not find anything. Could you please let us know (myself and the other sys progs here) what the resolution is and give us a copy of the 32/64 bit switch script?
Cheers
Wayne
Perth, Australia
quote: Originally posted by Simon Tobias
Hi Panos.
I think we'd be better discussing this on the Micro Focus forum, accessible
from http://www.cobolportal.com . :-)
It sounds like the operating mode of COBOL -- i.e. 32-bit or 64-bit --
doesn't match your Oracle environment. On AIX, there are separate 32-bit and
64-bit products. If you're getting 'bad magic number' errors, it sounds like
your COBDIR/LIBPATH/PATH setting may be pointing to the wrong Server Express
product.
It *does* matter whether you use procob -- the 64-bit Pro*COBOL -- or
procob32, as they will generate different code, including the sizes of
variables passed into/from Oracle as pointers. If you use the wrong procob,
you will get RTS114 errors at execution time.
Cobsql will, from SX 2.2 SP1 onwards, support 64-bit Pro*COBOL. This ensures
that the correct procob binary gets called for your COBOL working mode, i.e.
32-bit or 64-bit.
As you've specified SQLDEBUG, you should see the command invoked by Cobsql.
Could you tell me what that is please? Also, when compiling your program, if
you pass the -v flag (verbose), please tell me what gets displayed.
Thanks.
Simon.
"Panos Zotos" <pzotos@syntax.gr> wrote in message
news:42ebc.103917$Kc3.3377921@twister2.libero.it...
> I use :
>
> cob -t -g prog.cbl
>
> to create a multi-threaded program. My cobol.dir file includes
>
> confirm
> p(cobsql) csqlt=oracle8 sqldebug display verbose trace deb end-c
mode=ansi
> endp
>
> I then run the program using
>
> cobrun_t prog.int
>
> having first copied the rts I build on top of rts64_t
>
> The same scenario worked from the first time using the 32bit product.
>
>
> One thing I noticed today, is that the procob precompiler cannot be
relinked
> succesfully. When I try to run "relink precomp" to link all precompilers
> according to Oracle instructions, I get an error when procob is reached,
> mentioning a bad magic number. The strange part is that procob exists and
> works, although it does not vaildate as a 64bit application using cobfile
> (but anyway does it matter if procob is 32bit or 64bit since all it does
is
> to create cobol code with expanded sql statements...)
>
> Panos
>
>
>
> "Simon Tobias" <Simon.Tobias@nospam.microfocus.com> wrote in message
> news:c4jdvg$rvf$1@hyperion.microfocus.com...
> are
> fine!
Oracle[color=darkred]
> Oracle
up[color=darkred]
> in
> you're
>
>
| |
| Simon Tobias 2004-04-16, 8:30 am |
| Hi Wayne (and Panos)
Apologies if you're aware of some of this already, but I just wanted to
clarify the steps involved in creating and executing a Pro*COBOL application
with Micro Focus Server Express on UNIX.
When installing Pro*COBOL on UNIX (as part of the main Oracle installation),
you need to have your COBOL environment setup, in order for the installer to
relink a COBOL RTS containing the Oracle support libraries
(rtsora/rtsora32/rtsora64).
The 64-bit edition of Oracle 9i on AIX 5.x creates rtsora -- the 64-bit
version of the run-time -- and rtsora32 -- the 32-bit version of the
run-time.
It's imperative that you use the correct edition of Server Express, i.e.
32-bit or 64-bit -- note well, that these are separate products on this
platform -- for the mode in which you wish to use Oracle. In addition, you
need to ensure that LIBPATH is set to point to the correct Oracle 'lib'
directory -- $ORACLE_HOME/lib32 for 32-bit, or $ORACLE_HOME/lib for 64-bit
If you wish to recreate those executables, say if you've updated your COBOL
environment since installing Oracle, then from looking at the makefiles --
ins_precomp.mk and env_precomp.mk -- then the effective commands to use to
re-link the run-time correctly are as follows (logged in under your Oracle
user ID) :
either mode:
<set up COBDIR, ORACLE_HOME, ORACLE_BASE, ORACLE_SID as appropriate for your
installation>
export PATH=$COBDIR/bin:$ORACLE_HOME/bin:$PATH
32-bit :
export LIBPATH=$COBDIR/lib:$ORACLE_HOME/lib32:$LIBPATH
cd $ORACLE_HOME/precomp/lib
make LIBDIR=lib32 -f ins_precomp.mk EXE=rtsora32 rtsora32
64-bit:
export LIBPATH=$COBDIR/lib:$ORACLE_HOME/lib:$LIBPATH
cd $ORACLE_HOME/precomp/lib
make -f ins_precomp.mk rtsora
Regarding precompiling your application, Oracle provide two versions of
Pro*COBOL. Again, you need to use the correct one depending on whether
you're creating a 32-bit or 64-bit application, as the precompiler will
generate different code.
If invoking Pro*COBOL directly, you need to use :
32-bit : procob32 / procob18_32 , e.g.
procob32 myapp.pco
cob -it myapp.cob
rtsora32 myapp.int
or
64-bit : procob / procob18 , e.g.
procob myapp.pco
cob -it myapp.cob
rtsora myapp.int
If you're using Server Express 2.2 SP1 or later, you can also compile using
the Cobsql preprocessor, which will invoke the correct version of Pro*COBOL
under the covers, allowing for a single precompile-compile step, e.g.
cob -ik myapp.pco -C "p(cobsql) csqlt==oracle8 endp"
This method also aids debugging, as you will see the original source code
while animating, rather than the output from the precompiler. See the Server
Express Database Access manual. Prior to SX 2.2 SP1, Cobsql only supported
the creation of 32-bit applications.
I hope this helps -- if you're still having problems, please let me know.
Regards,
SimonT.
| |
| sprog 2004-04-18, 11:42 pm |
| Hi Simon (and anyone else)
Thanks for that. We still seem to be getting a very unusual error with our compiles in or makes.
A bit of background: we are "upgrading" from Oracle8i, SAS6, Solaris, MF COBOL 4.5 to AIX 5L, Oracle9i, SAS8 and MF Server Express COBOL.
When we attempt to compile our COBOL it works fine. However if the COBOL has embedded Oracle SQL our procomp makes try to access ADA. We do not use ADA. I thought this must have been included by accident; but can find no flag or install option for it. So can you give us any clues as to why we are suffering an ADA plague :-))
Wayne
quote: Originally posted by Simon Tobias
Hi Wayne (and Panos)
Apologies if you're aware of some of this already, but I just wanted to
clarify the steps involved in creating and executing a Pro*COBOL application
with Micro Focus Server Express on UNIX.
When installing Pro*COBOL on UNIX (as part of the main Oracle installation),
you need to have your COBOL environment setup, in order for the installer to
relink a COBOL RTS containing the Oracle support libraries
(rtsora/rtsora32/rtsora64).
The 64-bit edition of Oracle 9i on AIX 5.x creates rtsora -- the 64-bit
version of the run-time -- and rtsora32 -- the 32-bit version of the
run-time.
It's imperative that you use the correct edition of Server Express, i.e.
32-bit or 64-bit -- note well, that these are separate products on this
platform -- for the mode in which you wish to use Oracle. In addition, you
need to ensure that LIBPATH is set to point to the correct Oracle 'lib'
directory -- $ORACLE_HOME/lib32 for 32-bit, or $ORACLE_HOME/lib for 64-bit
If you wish to recreate those executables, say if you've updated your COBOL
environment since installing Oracle, then from looking at the makefiles --
ins_precomp.mk and env_precomp.mk -- then the effective commands to use to
re-link the run-time correctly are as follows (logged in under your Oracle
user ID) :
either mode:
<set up COBDIR, ORACLE_HOME, ORACLE_BASE, ORACLE_SID as appropriate for your
installation>
export PATH=$COBDIR/bin:$ORACLE_HOME/bin:$PATH
32-bit :
export LIBPATH=$COBDIR/lib:$ORACLE_HOME/lib32:$LIBPATH
cd $ORACLE_HOME/precomp/lib
make LIBDIR=lib32 -f ins_precomp.mk EXE=rtsora32 rtsora32
64-bit:
export LIBPATH=$COBDIR/lib:$ORACLE_HOME/lib:$LIBPATH
cd $ORACLE_HOME/precomp/lib
make -f ins_precomp.mk rtsora
Regarding precompiling your application, Oracle provide two versions of
Pro*COBOL. Again, you need to use the correct one depending on whether
you're creating a 32-bit or 64-bit application, as the precompiler will
generate different code.
If invoking Pro*COBOL directly, you need to use :
32-bit : procob32 / procob18_32 , e.g.
procob32 myapp.pco
cob -it myapp.cob
rtsora32 myapp.int
or
64-bit : procob / procob18 , e.g.
procob myapp.pco
cob -it myapp.cob
rtsora myapp.int
If you're using Server Express 2.2 SP1 or later, you can also compile using
the Cobsql preprocessor, which will invoke the correct version of Pro*COBOL
under the covers, allowing for a single precompile-compile step, e.g.
cob -ik myapp.pco -C "p(cobsql) csqlt==oracle8 endp"
This method also aids debugging, as you will see the original source code
while animating, rather than the output from the precompiler. See the Server
Express Database Access manual. Prior to SX 2.2 SP1, Cobsql only supported
the creation of 32-bit applications.
I hope this helps -- if you're still having problems, please let me know.
Regards,
SimonT.
| |
| Simon Tobias 2004-04-19, 9:30 am |
| Hi Wayne.
On the surface, it appears as if you're not picking up the correct Pro*COBOL
binary.
If you invoke 'procob' from the command line, you should see something along
the lines of :
Pro*COBOL: Release 9.2.0.4.0 - Production on Mon Apr 19 13:38:07 2004
followed by a list of Pro*COBOL options.
Do you see this, or do you see a different banner (say, Pro*ADA, or
Pro*Fortran)? Assuming you see something other than a Pro*COBOL banner, then
if you invoke 'whence procob', does it show procob as being picked up from
your Oracle bin directory (/home/oracle/9.2.0/bin/procob in my case) ?
If you're either not seeing the correct Pro*COBOL banner, or it's not
located in the correct directory, I'd suggest rebuilding the procob and
procob32 binaries. Logged in under your Oracle user ID, with the Oracle
environment set up :
cd $ORACLE_HOME/precomp/lib
make -f ins_precomp.mk procob32 procob
and then try your compilation process again.
Regards,
SimonT.
| |
|
| Hi Simon
Firstly, thanks for all your help, it was greatly appreciated.
We have the solution to our problem:
The problem is resolved by modifying the line in the job from:
make -f $SRC_DIR/procob.mk COBS="$SRC_DIR/PFEM025A.cob SYSDATE.cob CNTLGET.cob" EXE=$SRC_DIR/PFEM025A
to
make -f $SRC_DIR/procob.mk build COBS="$SRC_DIR/PFEM025A.cob SYSDATE.cob CNTLGET.cob" EXE=$SRC_DIR/PFEM025A
It appears this (build keyword) is not a requirement for the job to run on Solaris but is for AIX.
All is working fine.
Cheers
Wayne
quote: Originally posted by Simon Tobias
Hi Wayne.
On the surface, it appears as if you're not picking up the correct Pro*COBOL
binary.
If you invoke 'procob' from the command line, you should see something along
the lines of :
Pro*COBOL: Release 9.2.0.4.0 - Production on Mon Apr 19 13:38:07 2004
followed by a list of Pro*COBOL options.
Do you see this, or do you see a different banner (say, Pro*ADA, or
Pro*Fortran)? Assuming you see something other than a Pro*COBOL banner, then
if you invoke 'whence procob', does it show procob as being picked up from
your Oracle bin directory (/home/oracle/9.2.0/bin/procob in my case) ?
If you're either not seeing the correct Pro*COBOL banner, or it's not
located in the correct directory, I'd suggest rebuilding the procob and
procob32 binaries. Logged in under your Oracle user ID, with the Oracle
environment set up :
cd $ORACLE_HOME/precomp/lib
make -f ins_precomp.mk procob32 procob
and then try your compilation process again.
Regards,
SimonT.
|
|
|
|
|