1

in java we have ivy, maven and others for handling library dependencies. For example I tell ivy that my program uses a framework-jar version 1.0 and ivy makes sure, that my program gets this jar when being compiled. When there comes an update and the framework-jar is now available in version 1.1, then my program still gets the version 1.0. I can however tell ivy that another program of mine should take the newer version 1.1.

Are there similar mechanisms in the cobol environments so that i can make sure my cobol program A uses copybook C in version 1.0 and my cobol program B uses copybook C in version 1.1?

  • I have the same question too honestly! :) – maple_shaft Oct 9 '14 at 10:36
1

3 old Cobol programmers sitting here and we think this CAN'T be done in the form you need. The only thing that might be helpful is that you can use the "OF" statement to include the copybook from a different library for each of your 2 programs. Alternatively, you could just add a version Suffix to the name of the copybook maybe?

0

Start with WIDGET-UPDATE, clone it to create WIDGET-UPDATE-V1, and change COBOL program C to PERFORM WIDGET-UPDATE-V1.

I suppose one could partially satisify the requirement by hardcoding the version as a "parameter".

In Program A

MOVE '1' TO WU-VERSION.
PERFORM WIDGET-UPDATE.

In Program B

MOVE '1.1' TO WU-VERSION.
PERFORM WIDGET-UPDATE.

In CopyBook C

EVALUATE WU-VERSION
    WHEN '1'
        PERFORM WIDGET-UPDATE-V1
    WHEN '1.1'
        PERFORM WIDGET-UPDATE-V1-1
    WHEN OTHER
        PERFORM INVALID-VERSION
END-EVALUATE.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.