COBOL programs

Top  Previous  Next

On-line COBOL programs can be debugged using the Animator feature offered by Microfocus Server Express.

Debugging with MicroFocus Server Express

Cross-session method

This method requires an X/Server to be available on the programmer's desktop and it allows the debug of the COBOL programs running on the programmer's terminals as well as background tasks or terminals.

Debug of programs running on current terminal

The following steps must be followed to start the debug of a the current terminal:

connect XCICS using the terminal emulator
activate the X/Server
start the transaction CEDB with these parameters

CEDB ON,DISP=<display address>

wait for the terminal to switch in debug mode
enter the transaction code to debug
the Microfocus animator will start in an XTERM session on the target display

 

The display address must be in the UNIX standard display format: address:display (i.e. 192.168.1.32:0). If no DISPLAY is set to * (asterisk) the display 0 (zero) of the connected terminal is assumed.

Debug of a specific transaction code

Whenever the programmer wants to debug a specific transaction code, even if running on another terminal or as a background task, the TRAN parameter must be provided, according to this procedure:

connect XCICS using the terminal emulator
activate the X/Server
start the transaction CEDB with these parameters

 

CEDB ON,DISP=<display address>,TRAN=<transid>

Whenever the specified transid is started in the XCICS region, the Microfocus animator will start an XTERM session on the target display.

 

Debug of programs running on a specific terminal

Whenever the programmer wants to debug programs running on background terminal (ie. on a printer terminal), the TERM parameter must be provided, according to this procedure:

connect XCICS using the terminal emulator
activate the X/Server
start the transaction CEDB with these parameters

CEDB ON,DISP=<display address>,TERM=<termid>

Whenever a transaction is started on the requested terminal identifier, the Microfocus animator will start an XTERM session on the target display.

Unsolicited Dynamic Attachment Method

This method allow the normal execution of an XCICS program, and only when the user wants to start to debug, attaches the debugger to the running process.

The following steps must be followed to start the animation of a TP program :

connect XCICS using the terminal emulator
enter the transaction:

CEDB ON

wait for terminal to switch in debugging status
take note of the PID shown on the screen (the PID is always shown in the X4J status bar)
open a telnet session and enter:

anim <PID>

Note: when connecting XCICS with a TN3270 emulator (i.e. IBM Personal Communication), obviously no PID number is shown anywhere. In order to easily get the debug status of the terminal and the PID of the working process, simply enter on the screen

CEDB

Deprecated procedure

The following steps must be followed to start the animation of a TP program :

connect XCICS using X4J
start the transaction XANM
disconnect XCICS
reconnect XCICS
send ENTER to XCICS and read the PID number on the status line of X4J

Note: when connecting XCICS with a TN3270 emulator (i.e. IBM Personal Communication), obviously no PID number is shown anywhere. In order to easily get the PID of the working engine, simply enter on the screen

XANM PID

before to start the transaction.

Debugging with ACUCOBOL Extend

XTerm method

This method requires an X/Server to be available on the programmer's desktop and it allows the debug of the COBOL programs running on the programmer's terminals as well as background tasks or terminals.

Debug of programs running on current terminal

The following steps must be followed to start the debug of a the current terminal:

connect XCICS using the terminal emulator
activate the X/Server
start the transaction CEDB with these parameters

 

CEDB ON,DISPLAY=<display address>

wait for the terminal to switch in debug mode
enter the transaction code to debug
the ACUCOBOL debugger animator will start in an XTERM session on the target display

 

The display address must be in the UNIX standard display format: address:display (i.e. 192.168.1.32:0). If no DISPLAY is set to * (asterisk) the display 0 (zero) of the connected terminal is assumed.

Debug of a specific transaction code

Whenever the programmer wants to debug a specific transaction code, even if running on another terminal or as a background task, the TRAN parameter must be provided, according to this procedure:

connect XCICS using the terminal emulator
activate the X/Server
start the transaction CEDB with these parameters

CEDB ON,DISPLAY=<display address>,TRAN=<transid>

Whenever the specified transid is started in the XCICS region, the ACUCOBOL debugger will start an XTERM session on the target display.

Debug of programs running on a specific terminal

Whenever the programmer wants to debug programs running on background terminal (ie. on a printer terminal), the TERM parameter must be provided, according to this procedure:

connect XCICS using the terminal emulator
activate the X/Server
start the transaction CEDB with these parameters

CEDB ON,DISPLAY=<display address>,TERM=<termid>

Whenever a transaction is started on the requested terminal identifier, the ACUCOBOL debugger will start an XTERM session on the target display.

Terminal method

If an X/Server is not available, ACUCOBOL may connect to a telnet session too. The procedures are the same as described above, except for the presence of the parameter TTY in place of DISPLAY:

connect XCICS using the terminal emulator
open a unix session (telnet, ssh or serial) and enter:

runcbl --wait

start the transaction CEDB with these parameters

 

CEDB ON,TTY=<device>

The device string is the one shown in field "Terminal" by the runcbl command.

To debug a specific XCICS terminal or a specific transaction code, add the parameters TERM or TRAN, as described before.

Example

On the UNIX terminal:

# runcbl --wait
Named pipes created
Terminal: pts/14
Waiting for application runtime to open pipe

On the XCICS terminal:

CEDB ON,TTY=pts/14,TRAN=ACCT

Thin client method

If XCICS has been configured with the option "allow_acu_thin=yes", programmers have to debug on the ACUCOBOL thin client. To do that, the ACU thin client must be installed on the programmer workstation.

The procedures are the same as described above, except for the presence of the parameter THIN in place of DISPLAY:

connect XCICS using the terminal emulator
open a DOS shell on the local PC, and run

acuthin --wait --port <port number> --restart

start the transaction CEDB with these parameters

 

CEDB ON,THIN=<thin client address>

The thin client address  is the address of the workstation, followed by ":" and the port number.

To debug a specific XCICS terminal or a specific transaction code, add  the parameters TERM or TRAN, as described before.

Example

On the workstation at IP 192.168.1.32, open the DOS shell and type:

C:\Acucorp\Acucbl700\AcuGT\bin> acuthin --wait --port 8000 --restart

 

On the XCICS terminal:

CEDB ON,THIN=192.168.1.32:8000,TRAN=ACCT