View previous topic :: View next topic
|
Author |
Message |
Mahammad Musthafa
New User
Joined: 02 Dec 2013 Posts: 3 Location: India
|
|
|
|
Hi, my Cobol copybook is getting improper values in test region even though there is no changes in the copybook structure which was retrieved from prod environment. The same copybook is working fine in prod. Can someone throw some light on possible reasons. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
Perhaps you are using it in the wrong program Perhaps the data is different. Perhaps both. Perhaps you are using a different compiler version. Perhaps you are using different compiler options. Perhaps yoiu should give us some details. Perhaps etc etc.... |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
my Cobol copybook is getting improper values in test region even though there is no changes in the copybook structure which was retrieved from prod environment. |
You seem to have a serious misunderstanding about COBOL copybooks. A copybook does not ever, UNDER ANY CIRCUMSTANCES, "get values" (improper or proper). A copybook is source code that is copied into the program during the compile and that is all it does. Your statement "getting improper values in test region" could be construed as meaning the source code, when compiled, is different in test than in production -- if so, then you need to validate the correct SYSLIB is being used in the compile. Or the statement could be construed that the program variables are getting improper values while the program is executing -- and this has NOTHING to do with the copybook and everything to do with differences in test data and production data.
Either way, you need to be clearer in your problem statement. |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1050 Location: Richmond, Virginia
|
|
|
|
To add to Robert's reply, since you are a first time caller, I suggest the following so that you can learn first-hand what is going on here.
In both regions, replace the copybook include statement in the program with the contents of the copybook. Now there is no copybook in use. (You may want to copy the program in each region and use another name so that the original program is intact.)
Run the same test as before and you should get the same discrepancy as before. This should now reinforce what the copybook does and does not do. as Robert said, it merely says: here's some code to include in the program here.
Hopefully you have a long career ahead of you. Like most of us, you'll learn more from your own testing (and mistakes!) than from what others or even manuals tell you.
Good luck and have fun. I did for many years. |
|
Back to top |
|
|
Mahammad Musthafa
New User
Joined: 02 Dec 2013 Posts: 3 Location: India
|
|
|
|
thanks Nic, Robert, Phrzby for your valuable suggestions.
I tried replacing the copy book with it's content but the issue remains same.
To add more details, the problem is that the data getting truncated which is displaying on output FMT screen which is using the copybook content and also the output data length is more than what is declared on source code. |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1050 Location: Richmond, Virginia
|
|
|
|
Quote: |
I tried replacing the copy book with it's content but the issue remains same. |
As expected. Good luck with the rest. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
The copybook that you checked out and the program behind it hovering you incorrect value is obviously not same as what’s in production.
Look at the compile listing of the cobol module in prod and see what version of copybook and relative fields it compiled against. |
|
Back to top |
|
|
Mahammad Musthafa
New User
Joined: 02 Dec 2013 Posts: 3 Location: India
|
|
|
|
Yes.. The test program was different from production version, even though the copybook was same. That was causing incorrect alignment of data.
The issue has been resolved. Thank you all. |
|
Back to top |
|
|
|