Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

retirementCalculator Simple COBOL Batch Application to Demo zUnit Batch

Recommended setup:

  • IDZ 16.0.6 Client
  • ZUNIT Backend V15
  • zAppBuild June Release supporting zunit testing

Architecture

This is a very simple batch application calculating the retirement date.

retirement-calc/cobol:
EBUD0RUN.cbl
|__> EBUD01.cbl
     |_> EBUD02.cbl
     |_> EBUD03.cbl
     

To invoke the application there are a couple of jcls

JCL function
retirementCalculator/jcls/EBUD0RUN.jcl invokes main pgm EBUD0RUN and passes the input variables for the calulation through SYSIN
retirementCalculator/jcls/RUNZUNIT.jcl Sample jcl to invoke zUnit Runner (at a later time)

Workflow

Preparation

  1. Prepare your IDZ environment and clone this repository
  2. Build the application programs using DBB User Build (on zTEC 201, you can use /var/dbb/dbb-zappbuild/build.groovy)
  3. Verify, that the application works as expected using the supplied EBUD0RUN.jcl

Workspace settings

  1. Please make sure, that you are using the BZU cfg
  2. Select that IDZ prompts you for the zUnit Test configuration data alt text
  3. Import the Remote Property Group for zUnit to IDZ and assign it as the default property group for the z/OS files https://ibm.box.com/s/y1y328afi5sbtq6bs5lo19bh0ntykhmg

Generate a Test Case

  1. Open the test data editor from the zUnit Context menu on EBUD01.cbl

  2. Select the existing zUnit Test configuration data

  3. Select the 3 sub folders for the generated zunit artifacts alt text

  4. Start recording the BATCH Job

  5. Select the remote system

  6. Select the local JCL EBUD0RUN from this git repository

  7. Submit through the Record Job button

  8. Import recorded data alt text

  9. Generate the test case alt text

  10. Compile and link the generated test case using DBB User Build

Run Unit Test

  • Select the bzucfg file, and run a userbuild on the test case alt text
  • Alternatively, run the Unit Test from the zUnit Context Menu. alt text

Found limitations

With IDZ 15.0 GA code

  • The bzu report file seems to be written in the wrong encoding?

With IDZ 14.2.3 GA code

  • the playback file is not automatically imported into local project (I have manually copied it, and renamed it)
  • Cannot invoke Run Test case from the zUnit context menu
  • you cannot append a second recording to the playback file

Building the retirementCalculator with IBM Z Open Editor (VS Code)

The zapp yaml file in retirementCalculator/zapp.yaml

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages