With these routines you can switch debugging on and off as you wish and debug more than one program without having to stop and restart the Character Animator process. You start up Character Animator in one session, using the cobanimsrv command. In a second session you run a program that has a different COBANIMSRV environment variable value, or if it is not set, is running in a different directory. This program starts running as normal, not animated.

When a call to CBL_DEBUG_START is encountered with an identifier parameter that matches the value of the COBANIMSRV environment variable for the Character Animator process, or if the identifier parameter is unset, is running in the same directory, then Character Animator attaches to the program.

For example, in one session enter:

export COBANIMSRV=myid

myid is now a unique identifier you can use to match Character Animator to a program. Enter the command to start Character Animator:


Character Animator waits for a COBOL program to start that has a matching identifier. In another session enter:


The program starts running without animation. A call to CBL_DEBUG_START is encountered:

call CBL_DEBUG_START using by value     flags, timeout,
                           by reference "myid", 
                           returning    status-code 

The unique identifier myid matches that of Character Animator, so Character Animator attaches to this process. In the first session, the Character Animator main screen is displayed and the cursor placed on the line of containing the CBL_DEBUG_START call.

You can stop or suspend debugging by issuing a call to CBL_DEBUG_STOP.

CBL_DEBUG_START and CBL_DEBUG_STOP calls can also be used to switch remote and local animation on and off.

Note: To control cross-session animation using CBL_DEBUG_START and CBL_DEBUG_STOP, you must either:
  • Use different COBANIMSRV environment variable values for the Character Animator process and the program, in which case you can run them in the same directory
  • Run them in different directories

If the COBANIMSRV environment variable values for the Character Animator process and the program match, Character Animator will start animating the program immediately, instead of when the first call to CBL_DEBUG_START is encountered.