Search code examples
cobol

Dependency Management for COBOL


Does anything like transitive dependency management exist in the COBOL world?

Is there any kind of repository system for COBOL binaries?


Solution

  • The answer for your (very broad but still valid) question would be "NO" as the comments already suggest. For this answer I define "dependency management software" as a software which helps to see what programs and files are needed to run an application (which consists of many COBOL programs [otherwise you won't need a management for this]), ideally versioned [for version N of program X I'd need the programs Y and Z in the version M, together with files A and B).

    What makes a working dependency system for COBOL hard is that you would have an easy to track source level dependency (consisting only of source and copy books) and a runtime dependency which you cannot track:

    CALL "SOMEMODULE" (more or less static calls) can be easily tracked, but often you'll see CALL somemodule (highly dynamic calls where the actual module name is stored in a variable). For the later one you'd have to check for all the possible values the variable can get (sometimes only one simple MOVE "PROG" directly before the CALL, sometimes the variable will be changed by sub-programs or even be taken from a file/DB/whatever). The second dependency you normally have are files/DB-connections. These are mostly not static like in ASSIGN to "file1" but dynamic ASSIGN TO filename with the same issues like you have with the dynamic program calls.

    Therefore you often do not have a real dependency management (as defined above) but only have versioned "snapshots" of [compiled] COBOL programs and files with everything packed together that (should) work.

    In the "Windows/Unix world" you have them placed in an archive, a backup procedure (maybe incremental) or a version management which works for binaries.