Application Development Using COBOL
Part Three - Challenge #04


COBOL manages some of the most critical data and business logic in the world's economy.

As an example, if you are employed by a large financial organization and you eventually assume some of the critical day to day responsibilities for the operation of the financial organization, you will quickly learn that outages and crippled operations are totally unacceptable due to the amount of money lost and risk to the continued viability of the organization.

COBOL programming language, COBOL compiler optimization, and COBOL runtime performance has over 50 years of technology advancements contributing to the well being of world economies foundation. The core business logic of many large enterprises has decades of business improvement and tuning embedded in COBOL programs.

The point - whatever you read or hear about COBOL, be very scepticle. If you ever have the opportunity to work directly with someone involved in writing or maintaining critical business logic using COBOL, you will be learning about the operation of the core business. Business managers, business analysts, and decision makers come and go. The sum of all good business decisions can frequently be found in the decades of changes implemented in COBOL programs. The answer to "How does this business actually work?" can be found in COBOL programs.

Add the following to your awareness of COBOL. It is an absolute myth that you must be at least 50 years old to be good with COBOL. COBOL is incredible easy to learn and understand. One of the many reasons financial institutions like COBOL, is the fact that it is not necessary to be a programmer to read and understand the logic. This is important because critical business logic code is subject to audit. Auditors are not programmers. However, auditors are responsible for insuring the business financial statements are presented fairly. It is COBOL processing that frequently result in the business ledger updates and subsequent financial statements.

So, now a real world lesson, a comment recently made in an well known business journal by someone with a suspect agenda was quoted as saying, "COBOL is a computing language used in business and finance. It was first designed in 1959 and is pretty old and slow." A highly experienced business technology person knows the only true part of that last sentence was that COBOL was first designed in 1959.

It's no secret that lots of banks still run millions of lines of COBOL on mainframes. They probably want to replace that at some point. Why haven't they? Most banks have been around long enough to still feel the pain from the ~1960's Software Crisis. After spending enormous amounts of money, and time, on developing their computer systems, they finally ended up with a fully functional, well-tested, stable COBOL core system.

Speaking with people that have actually worked on such systems, nowadays they have Java frontends and wrappers which add functionality or more modern interfaces, they run the application on virtualized replicated servers, but in the end, everything runs through that single core. And that core is never touched or changed, unless absolutely necessary.

And from a software engineering perspective, that even makes sense. Rewrites are always more expensive than planned, and always take longer than planned (ok, probably not always. But often.). Never change a running system etc.., unless very good technical and business reasons exist.

That is real world!

While Part 2 exposed you to COBOL, this challenge will re-enforce awareness of COBOL that could prove valuable during your career.

COBOL that runs in z/OS Environment is Enterprise COBOL.

Your challenge:

Submit 10 COBOL compiles where the compiled COBOL source code starts out simple, then increases in functionality. These 10 COBOL compiles include 5 that successfully complete and 5 with a problem to correct.

Each successful compile is immediately followed by a compile with a problem. The successful compile can help resolve the problem with the subsequent job.

A few excellent URLs to help with this challenge

For convience, you are given JCL with in-stream COBOL source code in the same PDS member to edit the COBOL source code and immediately submit for compile and execution.

1st Pair of COBOL compile jobs, CBL1 and CBL2

  • Edit CC#####.SOURCE(CBL1)
  • Review CBL1 source, then submit
  • Review output =sd ; st
  • Edit CC#####.SOURCE(CBL2)
  • Review CBL2 source, then submit
  • Review output =sd ; st
  • Find problem in output
  • Edit CC#####.SOURCE(CBL2), correct problem, and submit
  • Success is compile and execution with return code (RC) 00

2nd Pair of COBOL compile jobs, CBL3 and CBL4

  • Edit CC#####.SOURCE(CBL3)
  • Review CBL3 source, then submit
  • Review output =sd ; st
  • Edit CC#####.SOURCE(CBL4)
  • Review CBL4 source, then submit
  • Review output =sd ; st
  • Find problem in output
  • Edit CC#####.SOURCE(CBL4), correct problem, and submit
  • Success is compile and execution with return code (RC) 00
  • Success verification is member CBL4 written into CC#####.CH4.OUTPUT

3rd Pair of COBOL compile jobs, CBL5 and CBL6

  • Edit CC#####.SOURCE(CBL5)
  • Review CBL5 source, then submit
  • Review output =sd ; st
  • Edit CC#####.SOURCE(CBL6)
  • Review CBL6 source, then submit
  • Review output =sd ; st
  • While CBL6 compile and execution completed with RC 00, a problem does exit.
  • Read CC#####.CH4.OUTPUT(CBL6) to recognize the problem.
  • This is a COBOL source problem. The truncation problem must be corrected.
  • Edit CC#####.SOURCE(CBL6), correct problem, and submit
  • Success is compile and execution with a totalled number that is not truncated
  • Success verification is a correct total number written into CC#####.CH4.OUTPUT(CBL6)

4th Pair of COBOL compile jobs, CBL7 and CBL8

  • Edit CC#####.SOURCE(CBL7)
  • Review CBL7 source, then submit
  • Review output =sd ; st
  • Edit CC#####.SOURCE(CBL8)
  • Review CBL8 source, then submit
  • Review output =sd ; st
  • CBL8 compile failed. Study the error message in the compile output and compare source to CBL7 source.
  • Edit CC#####.SOURCE(CBL8) to correct problem and submit
  • Once CBL8 compile is successful, then an execution problem occurs and must be corrected. The first sentence of the error message in SYSOUT DDNAME does explain the problem and correction needed in CBL8 source. Correct the problem and submit
  • Success verification is output written into CC#####.CH4.OUTPUT(CBL8)

5th Pair of COBOL compile jobs, CBL9 and CBL10

  • Edit CC#####.SOURCE(CBL9)
  • Review CBL9 source, then submit
  • Review output =sd ; st
  • Edit CC#####.SOURCE(CBL10)
  • Review CBL10 source, then submit
  • The problem is CBL10 failed to write any output. CC#####.CH4.OUTPUT(CBL10) is empty and it should have the same output as CBL9
  • Review output =sd ; st
  • This is a COBOL source code problem. Study CBL10 and CBL9 source code to find the problem.
  • Edit CC#####.SOURCE(CBL10) to correct problem and submit
  • Success verification is output written into CC#####.CH4.OUTPUT(CBL10)

Upon correction of the problems, =6 , then submit 'zos.public.jcl(ch4)'. This will write CC#####.P3.OUTPUT(#04)

Next: Challenge #05