View previous topic :: View next topic
|
Author |
Message |
moncy123
New User
Joined: 13 Jan 2023 Posts: 3 Location: USA
|
|
|
|
Getting the following error while trying to open a cics program in zunit test case editor. Any pointers would be appreciated.
DFHEIBLK is not defined in the DATA DIVISION |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2119 Location: USA
|
|
|
|
The message seems to be self-explanatory, isn't it?
1) find the DATA DIVISION in your code
2) verify, that the DFHEIBLK is really defined (or not?) within the scope of this division... |
|
Back to top |
|
|
moncy123
New User
Joined: 13 Jan 2023 Posts: 3 Location: USA
|
|
|
|
Its a system copybook that is usually not defined in the program..hence the question |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
From the zunit web site at www.ibm.com/docs/en/developer-for-zos/14.1?topic=unit-testing-enterprise-cobol-pli-applications:
Quote: |
Getting started
zUnit provides several tools for creating and running test cases. The following procedures outline the fastest path to running COBOL and PL/I test cases with zUnit. For more information about each step in this process, click the link. For more information about other zUnit processes, such as running a test from JCL or TSO, or generating test results in alternative formats, see the other topics in the zUnit information set.
COBOL
Set property group options for a test case. The property group defines the compiler and link options that zUnit requires to run a test case and defines the test runner configuration and result files. You must define a property group with the options required by zUnit and associate the property group with the programs that you want to test.
Generate a test case program. For Enterprise COBOL source files, the zUnit feature can analyze a source program and generate a test case with test data. The test case generation tools simplify the process of creating test cases, incorporating test data into a unit test, and building and running a test case.
Build and run the test case. zUnit provides menu items for running test cases. These menu items are available in the z/OS Projects and Remote Systems views. After you run a test case, zUnit opens the test results in the test result viewer. |
The property group you are using obviously does not include the CICS copybook library; you need to change it to include it and then test again. |
|
Back to top |
|
|
moncy123
New User
Joined: 13 Jan 2023 Posts: 3 Location: USA
|
|
|
|
Thanks, do you know where the 'CICS copybook library' should be updated |
|
Back to top |
|
|
|