Cobol

Cobol is supported since version 4.0. This page covers only the Cobol specific aspects. Please also read page Usage to get a complete picture of running unit tests..

Currently the following assertions are supported:

Setup and tear down procedures are named differently:

We will happily enable more procedures for Cobol if there is a need for it. Feel free to open a ticket on the Tickets page for that.

Creating test cases

Cobol Test Suites are created like in RPG. Different to RPG command RUCRTCBL is used:

RUCRTCBL TSTPGM(RPGUNIT/RUPLUGINT1) SRCFILE(QEXAMPLE)

Unlike RPG, which can export many procedures per module, Cobol is limited to one procedure per module. The good news is, that multiple compilation units can be entered in a single Cobol source member. See also Cobol example TEMPLCBL in file QSRC.

Compiling that source member produces the following modules:

Then all modules are linked to test tuite service programm TEMPLCBL.

Please also notice, that parameter NOMONOPRC must be specified either in the source member or at command RUCRTCBL.