Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
a copybook getting improper values in test, was fine in prod

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: a copybook getting improper values in test, was fine in prod
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: 2378
Location: Hampshire, UK

PostPosted: Sat Jul 18, 2020 1:41 am    Post subject: Reply to: a copybook getting improper values in test, was fine in prod
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: 8553
Location: Dubuque, Iowa, USA

PostPosted: Sat Jul 18, 2020 2:52 am    Post subject: Reply to: a copybook getting improper values in test, was fine in prod
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: 1008
Location: Richmond, Virginia

PostPosted: Sat Jul 18, 2020 5:27 am    Post subject:
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    Post subject:
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: 1008
Location: Richmond, Virginia

PostPosted: Mon Jul 20, 2020 11:24 pm    Post subject:
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

Senior Member


Joined: 21 Sep 2010
Posts: 2443
Location: NY,USA

PostPosted: Tue Jul 21, 2020 1:30 am    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Problème reproducing a production bu... ELLAHEYA ABENDS & Debugging 1 Mon Jun 15, 2020 7:05 pm
No new posts JDBC Driver -Default Values yogi.47eie DB2 0 Mon May 18, 2020 7:27 pm
No new posts Feild level validation to test first ... sruthi3466 JCL & VSAM 10 Thu Apr 23, 2020 2:47 pm
No new posts Scripting TSO TEST Harold Barnes CLIST & REXX 3 Wed Apr 15, 2020 7:19 am
No new posts IDMS record copybook Susanta IDMS/ADSO 3 Mon Feb 24, 2020 8:55 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us