COBOL Limitations

The z/OS Automated Unit Testing Framework (ZUnit) has these limitations with COBOL programs.

Create/modify Test Case

  • SOM-based object-oriented (OO) COBOL programs are not supported.
  • ZUnit accesses files processed by the test target module and subprogram module. ZUnit does not support the test target module where the files are left opened.
  • When creating/modifying a test case with the test runner (AZUTSTRN), ZUnit does not initialize data items of the WORKING-STORAGE SECTION. When running a ZUnit test with test entries, the state of the former test entry is left and might have an influence on the test result of the next test entry.
  • USAGE INDEX is not supported.
  • When creating/modifying a test case with the dynamic test runner (BZUPLAY), ENTRY is not supported.
  • File open errors for input files are detected by ZUnit as AZU1012S error. In such cases, user error handling logic cannot be tested.
  • ZUnit does not support the use of COBOL source that contains Compiler Directive for conditional compilation.
  • ZUnit does not support the case when the source has a nested program that has the same data definition of the source.
  • The REUS option is required to build user applications when recording a batch program with the dynamic test runner (BZUPLAY).
  • DLL is not supported when recording or running tests with the dynamic test runner (BZUPLAY).
  • Level 66 item is not supported.

Debug Test Case

  • If you do not use Delay Debug, right-click and select Add Breakpoint > Stop At All Function Entries in the Breakpoint view. This operation needs to be done just once. By repeating resume, you can see the COBOL source listing.
  • Invoking multiple debugger sessions from ZUnit is not supported.

Test Case Editor

  • The Test Case Editor has limited capabilities for data value validation.
  • The PICTURE phrase of data items is normalized in the Test Case Editor. The data item PIC X(3)9(4)X(2), for example, appears as X(9) in the Test Case Editor. This normalization is based on the COBOL language specification.
  • The hyphen character (-) in data item names appears as an underscore character (_) in the Test Case Editor. ZUnit cannot distinguish between hyphen characters and underscore characters in data item names.
  • When a file is not in specified in file I/O statements, such as READ and WRITE statements, test data for the file cannot be set in the Test Case Editor. Also, when you run the ZUnit test case, a runtime error occurs when opening or closing the I/O file with stubbing file mode. To work around this limitation, prepare a real I/O file in advance.
  • The table defined with OCCURS UNBOUNDED is not shown in the Test Case Editor.
  • The Test Case Editor shows FILLER items for slack bytes added internally by a compiler.

Run Test Case

  • ZUnit requires that VSAM CLUSTER is defined with REUSE, so ALTERNATE INDEX of VSAM is not supported.
  • When the test case needs to be run under Db2 with the AZUTSTRN runner, ZUnit only supports invocation by JCL. Tests from USS and TSO are not supported.
  • When the source program contains File I/O, you cannot run testing from (TSO) (FELZUNIT command) or USS (ZUnit command).
  • Files with PASSWORD clause is not supported.
  • Setting existing VSAM RRDS input files as test data requires IBM® Developer for z/OS® V14.0.0.1 host or later version.
  • When the source program contains File I/O, the test case generated by the client of IBM Developer for z/OS V14.0.0 (or later version) requires the new runner API of the ZUnit runner. If the source program does not contains file I/O, the test case generated by the client works with older versions of ZUnit runner.
  • Partitioned data set members are not supported for input file or expected output file during testing.
  • The COBOL program compiled with LP(64) option is not supported because USAGE POINTER must be 4-bytes.
  • RETURN-CODE is supported only by Dynamic Test Runner in V14.2.4 or later versions. If the test data is set to RETURN-CODE for the AZUSTRN runner, the data is ignored. If the test data is set to RETURN-CODE for older versions of Dynamic Test Runner, you cannot get correct test results.
  • Runner configuration is not populated automatically for the Run As Test Case... action.
  • Runner continuation settings in property groups only apply to the AZUTSTRN runner.

CICS support limitations

  • CICS Transaction Server for z/OS Version 5 Release 4 is supported. Other versions are not supported.
  • The CICS translation for the property group setting and the setting for the recorded application must be consistent. If you use a separate CICS translator for the application, you must set it for the property group.
  • ZUnit supports generating, building, and running a test case for a CICS program. The test case runs outside of CICS: the source module and test case module run as a batch program.
  • The dynamic assignment of CICS target names only supports simple value assignments to variables.
  • When the program under testing is a sub program statically called from a parent CICS program, no data is imported in the recording.
  • The following CICS commands are supported as I/O statements:
    • ABEND
    • ASKTIME
    • ASSIGN APPLID
    • ASSIGN CHANNEL
    • DELETE
    • DELETEQ TD
    • DELETEQ TS
    • ENDBR
    • ENDBROWSE CONTAINER(CHANNEL)
    • FORMATTIME
    • GET CONTAINER(CHANNEL)
    • GETNEXT CONTAINER(CHANNEL)
    • INQUIRE (TDQUEUE)
    • INVOKE WEBSERVICE
    • LINK
    • PUT CONTAINER(CHANNEL)
    • RETURN
    • REWRITE
    • SEND
    • SEND MAP
    • SEND TEXT
    • START
    • START (TRANSID)
    • SYNCPOINT ROLLBACK
    • STARTBR
    • STARTBROWSE CONTAINER(CHANNEL)
    • UNLOCK
    • WRITE
    • WRITEQ TD
    • WRITEQ TS
    • XCTL
    The following CICS commands are supported as I/O statements with the limitation that the SET option is not supported:
    • READ
    • READNEXT
    • READPREV
    • READQ TD
    • REQDQ TS
    • RECEIVE
    • RECEIVE MAP
    If the test target source contains unsupported CICS commands, they are ignored when running a ZUnit test case. This might lead to a different result than when running it under CICS.

SQL support limitations

  • The following commands are supported:
    • SELECT
    • OPEN
    • CLOSE
    • FETCH
    • INSERT
    • UPDATE
    • DECLARE CURSOR
    • SET hostVar
    • DELETE
  • TYPE BINARY and TYPE VARBINARY(COBOL Importer not supported) are not supported.
  • TYPES LOB (BLOB, CLOB...) are not supported.
  • TYPE DECFLOAT is not supported (no DECFLOAT data type in COBOL).
  • "Usage SQL TYPE" is not supported.
  • The data of static CALL will not be recorded when the program under test is contained in the main SQL module.
  • The data of a program to program call will not be recorded when the program under test is a main SQL module.

Batch support (no sub-system) for IBM z/OS Dynamic Test Runner limitations

  • ENTRY statement is not supported for recording/playback.

JCL generation limitations for batch support (both Db2 and non-Db2)

The following kind of JCLs to run applications are not supported. You must manually update the JCL file by selecting Open JCL and update the content appropriately based on the added comments.
  • Except for EXEC PROC=ELAXFGO, no job step with PROC parameter nor procedure definition is supported.
  • Single quotes ' or parentheses () in JCL statements are not correctly interpreted.
  • The DLM parameter for in-stream DD is not interpreted. DLM is always assumed to be /*.