Created On:  05 October 2012


I look in $COBDIR/bin and I see the "cob" command, but I also see "cob32" and "cob64".   If I want to compile in 32-bit mode, should I use "cob32"?   Likewise, should I use "cob64" for 64-bit mode?


The intention is that end-users will use the basic "cob" command under all circumstances.  The "cob" command will notice the active cobmode at the time, then invoke either "cob32" or "cob64" behind the scenes as appropriate.

The COBOL system is actively operating in one mode or another at any one time.  The current mode can be revealed by entering the "cobmode" command.

The mode can be affected by setting the COBMODE environment variable.  For example:

 $ export COBMODE=32

 $ cobmode
 Effective Default Working Mode: 32 bit

 $ export COBMODE=64

 $ cobmode
 Effective Default Working Mode: 64 bit

The mode can also be affected by various flags or options of the "cobmode" command.  Entering "cobmode -?" (with the "-?" flag) displays the following usage screen:

 $ cobmode -?
 Usage: cobmode [-v] [-a|-l|{-s|-u|-d [32|64]}] [-t ]
 Where: -s    Operates on the SYSTEM default
        -u    Operates on the USER default
        -d    Operates on the DIRECTORY default
        -l    Operates on the SHELL default
        -a    List all defaults
        -v    Operate verbosely
        -t    Specify a tool name to search for

 If '32' or '64' is specified, the mode is set to that value.
 If none of '-s', '-u' and '-l' are specified, the effective mode is reported.
 The '-t' option can be used to trace how a specific tool is located.

Other utilities besides "cob" also exist in $COBDIR/bin with "32" and "64" versions, including "anim", "rebuild", "cobanimsrv", "cobjrun", "dfed", etc.  For example:

 $ cd $COBDIR/bin

 $ ls rebuild*
 rebuild  rebuild32  rebuild64

The intention is that end-users will invoke just the base name of the utility, then the COBOL system will automatically invoke the appropriate "32" or "64" version behind the scenes.

Incident #2588625