Compiling COBOL program on AIX may result in Oracle database connection problems

Technote (troubleshooting)


Problem(Abstract)

Attempts to compile with COBOL for AIX 4.1.1.x may result in some problems with connection to Oracle databases.

Cause

The addition of the -brtl compiler option in COBOL for AIX 4.1.1 may result in some problems with connection to Oracle databases.

Resolving the problem

In  COBOL for AIX, V4.1.1, the compiler specifies the -brtl option by default during the link step. 

If you remove this option, it may solve a problem with connections to Oracle databases.

To take advantage of this modification, you must modify the compilation link step and re-link all the programs in your entire application.   In order to remove the -brtl option, you can either:

  • remove the option directly from the installed configuration file
    or
  • create a copy of the default configuration file and use this copy when linking your application. 

To modify the default configuration file, /etc/cob2.cfg, change the following line in the configuration:

runlib1  = -brtl,-L/usr/lpp/cobol/lib,-lcob2_r
to
runlib1  = -L/usr/lpp/cobol/lib,-lcob2_r

Note: If you modify the default configuration file, you will have to do that each time you install a new PTF.

To use a copy of the configuration file without the -brtl option, follow these steps:
  1. Make a coTo modify the default configuration file,py of the default configuration file /etc/cob2.cfg.

  2. Change your new copy of the configuration file to remove the -brtl option:

    runlib1     = -brtl,-L/usr/lpp/cobol/lib,-lcob2_r
    to
    runlib1     = -brtl,-L/usr/lpp/cobol/lib,-lcob2_r

  3. Use the -F option to use your copy of the compiler configuration file instead of /etc/cob2.cfg

For example, to use /u/myhome/myconfig.cfg instead of /etc/cob2.cfg as the configuration file to compile myfile.cbl, issue this command:
cob2 myfile.cbl -F/u/myhome/myconfig.cfg

More details on tailoring a copy of the configuration file can be found in the IBM COBOL for AIX Programming Guide, under Tailoring your compilation.

Rate this page:

(0 users)Average rating

Document information


More support for:

COBOL for AIX
Compiler

Software version:

4.1.1

Operating system(s):

AIX

Reference #:

1611701

Modified date:

2014-02-27

Translate my page

Machine Translation

Content navigation