Page 1 of 1

Test Copybook changes for CICS COBOL program.

Posted: Wed Mar 28, 2018 8:34 pm
by utkarsh
Hi,

I have a copybook in which for a variable defined at level-10 we have some 88-level variables. For one of the 88-level variable I have added a new value for it, like:

Code: Select all

10 GROUP-VARAIBLE
    88 VAR-1       VALUE 'A'.
    88 VAR-2       VALUE 'B','C','D','I'.

I have added 'I' for var-2. Now I have two questions:

1. Do I need to recompile all the program using this level-10 variable?
2. How do I test CICS program for just copybook change as with NEW COPY I can just get load of new program but not copybook, so how do I move the changes for copybook to CICS region?

Re: Test Copybook changes for CICS COBOL program.

Posted: Wed Mar 28, 2018 8:45 pm
by Robert Sample
You MUST recompile every program that needs to use the 'I' in the 88 level. Other programs that use the copybook you may or may not recompile -- that is optional and usually depends upon site standards.
How do I test CICS program for just copybook change as with NEW COPY I can just get load of new program but not copybook, so how do I move the changes for copybook to CICS region?
You COMPLETELY misunderstand copy books. Copy books are SOURCE code and as such are never going to be part of CICS testing. You make the change(s) for the source program, compile it, newcopy it, and test it. You do not "move the changes for copybook to CICS region" since CICS does not work with source.

Re: Test Copybook changes for CICS COBOL program.

Posted: Thu Mar 29, 2018 11:44 am
by utkarsh
Robert Sample wrote: Wed Mar 28, 2018 8:45 pmYou MUST recompile every program that needs to use the 'I' in the 88 level.
There is only one program which is making use of 'I' in 88 level. There might be group moves in other programs but they don't use this particular variable. There are also programs which are using this copybook but not specifically this variable. Do I need to compile all these programs?
Robert Sample wrote: Wed Mar 28, 2018 8:45 pmYou COMPLETELY misunderstand copy books. Copy books are SOURCE code and as such are never going to be part of CICS testing. You make the change(s) for the source program, compile it, newcopy it, and test it. You do not "move the changes for copybook to CICS region" since CICS does not work with source.
Thanks. That means the compiled version will have the copybook with new changes always? Does this apply to batch process also?

Re: Test Copybook changes for CICS COBOL program.

Posted: Thu Mar 29, 2018 12:39 pm
by enrico-sorichetti
it depends ...
if Your organisation is using a development management tool ( endevor, sclm, ... )
then the decision is not Yours all depends on the setup

but this question should be asked on a forum ONLY for personal education,
( what happens if )
for practical use You should ask Your support ...
they know the practices, rules, standards of Your organisation

Re: Test Copybook changes for CICS COBOL program.

Posted: Thu Mar 29, 2018 5:09 pm
by Robert Sample
That means the compiled version will have the copybook with new changes always?
No, the compiled version will have whatever version of the copybook that existed AT THE TIME OF THE COMPILE. If it was compiled yesterday, it has yesterday's copybook code in it. If it was compiled 3 years ago, it has the copybook from 3 years ago in it. And this is NOT related to CICS -- this is the way COBOL works, on mainframes and on all other platforms. A load module (executable program) in COBOL always is generated from the source (and copybooks) at the time of the compile.

Re: Test Copybook changes for CICS COBOL program.

Posted: Fri Mar 30, 2018 12:11 pm
by utkarsh
Robert Sample wrote: Thu Mar 29, 2018 5:09 pmNo, the compiled version will have whatever version of the copybook that existed AT THE TIME OF THE COMPILE. If it was compiled yesterday, it has yesterday's copybook code in it. If it was compiled 3 years ago, it has the copybook from 3 years ago in it. And this is NOT related to CICS -- this is the way COBOL works, on mainframes and on all other platforms. A load module (executable program) in COBOL always is generated from the source (and copybooks) at the time of the compile.
Thanks. I confused myself while talking about CICS. This is helpful.