IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

a copybook getting improper values in test, was fine in prod


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Mahammad Musthafa

New User


Joined: 02 Dec 2013
Posts: 3
Location: India

PostPosted: Sat Jul 18, 2020 12:58 am
Reply with quote

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
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Sat Jul 18, 2020 1:41 am
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Sat Jul 18, 2020 2:52 am
Reply with quote

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
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Sat Jul 18, 2020 5:27 am
Reply with quote

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
View user's profile Send private message
Mahammad Musthafa

New User


Joined: 02 Dec 2013
Posts: 3
Location: India

PostPosted: Mon Jul 20, 2020 11:05 pm
Reply with quote

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
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Mon Jul 20, 2020 11:24 pm
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Tue Jul 21, 2020 1:30 am
Reply with quote

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
View user's profile Send private message
Mahammad Musthafa

New User


Joined: 02 Dec 2013
Posts: 3
Location: India

PostPosted: Wed Jul 22, 2020 11:05 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
No new posts Trying to change copybook in online c... CICS 4
Search our Forums:

Back to Top