Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Is Recompilation Needed?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Binaya

New User


Joined: 03 Jul 2007
Posts: 77
Location: Hyderabad

PostPosted: Wed Mar 19, 2008 3:10 pm    Post subject: Is Recompilation Needed?
Reply with quote

Hi All,

I have a program which uses a DB2 table.
Now 2 new columns has to be added and some existing column size has to be increased in this table.

But my program doesn't use any of these modified columns and will not use the new columns to be added.

Do I need to recompile my program?
If yes why?

Regards,
Back to top
View user's profile Send private message

HappySrinu

Active User


Joined: 22 Jan 2008
Posts: 195
Location: India

PostPosted: Wed Mar 19, 2008 3:21 pm    Post subject:
Reply with quote

I don't think you need to recompile as long as you don't use those changed columns in your program
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Mar 19, 2008 8:02 pm    Post subject:
Reply with quote

Hello,

Quote:
Do I need to recompile my program?
If yes why?
Does your program use a copybook of the entire row?

If yes, you will need to re-compile as displacements/lentgh will have changed.
Back to top
View user's profile Send private message
sri_mf

Active User


Joined: 31 Aug 2006
Posts: 216
Location: India

PostPosted: Thu Mar 20, 2008 12:52 pm    Post subject: Reply to: Is Recompilation Needed?
Reply with quote

I too agree with Dick.If u r using CopyBook of the table for DCLGEN Variables u have to recompile the program.
Back to top
View user's profile Send private message
Binaya

New User


Joined: 03 Jul 2007
Posts: 77
Location: Hyderabad

PostPosted: Thu Mar 20, 2008 1:09 pm    Post subject:
Reply with quote

Yes I am using the DCLGEN for the table.

Quote:
displacements/lentgh will have changed


Yes The DCLGEN length will change but as I am not using the modified or new columns..So why do I need to recompile?

Regards,
Back to top
View user's profile Send private message
Phrzby Phil

Active Member


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

PostPosted: Thu Mar 20, 2008 7:37 pm    Post subject:
Reply with quote

The DCLGEN is not popluated like a COBOL flat file, but rather by each col of a SELECT into it's host variable (which need not even be in a DCLGEN). If the cols being ref'd are not the modified ones, I see no technical reason to recompile. This is one of the features of a database system.
Back to top
View user's profile Send private message
the_gautam

Active User


Joined: 05 Jun 2005
Posts: 165
Location: Bangalore

PostPosted: Fri Mar 21, 2008 3:35 pm    Post subject:
Reply with quote

i do agree with Phrzby Phil. since the program is not using any of the modified columns, there will not be any change in the host variables used by the program. so, there should not be any problem with the program to run without re-compilation.
Back to top
View user's profile Send private message
sri_mf

Active User


Joined: 31 Aug 2006
Posts: 216
Location: India

PostPosted: Wed Mar 26, 2008 3:27 pm    Post subject: Reply to: Is Recompilation Needed?
Reply with quote

I found in Endeavor Document that

Generating Elements
You need to generate elements when any of the following conditions arise:
·If you have added or updated an element that was not generated.
·When a source element(s) changes, such as a copybook, a static called program, or an INCLUDE file.
·When you specify a different processor.

According to that i think the program needs to be generated again.No need of Compilation.

Thanks Phil for ur suggestion
Back to top
View user's profile Send private message
Binaya

New User


Joined: 03 Jul 2007
Posts: 77
Location: Hyderabad

PostPosted: Wed Mar 26, 2008 3:46 pm    Post subject:
Reply with quote

Generating and Compilation are same....

Regards,
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Wed Mar 26, 2008 3:55 pm    Post subject: Reply to: Is Recompilation Needed?
Reply with quote

re-compilations, re-generations, re-builds... call them in any way You want

depend on technical requirements and technical congruence,
but sometimes also on standards and practices of an organization

one reason to regenerate even if not strictly needed is for auditing/control purposes and peace of mind

when analyzing dependencies, the audit team finds that an object has a change/build date lower than that of a component ( program copybook dependency ) ,
suddenly a burst of paper work follows, zillions of people being asked why and how..

so the answer is ....
ask the decision makers and act accordingly
Back to top
View user's profile Send private message
sri_mf

Active User


Joined: 31 Aug 2006
Posts: 216
Location: India

PostPosted: Wed Mar 26, 2008 4:16 pm    Post subject: Reply to: Is Recompilation Needed?
Reply with quote

Good info enrico..Thanks icon_smile.gif)
Back to top
View user's profile Send private message
nashaikh

New User


Joined: 30 Oct 2008
Posts: 3
Location: Pune, India

PostPosted: Wed Feb 04, 2009 7:45 pm    Post subject:
Reply with quote

HappySrinu wrote:
I don't think you need to recompile as long as you don't use those changed columns in your program


My program has a SELECT COUNT (*) statement
and there are no DCLGEN copybooks being used.
Do i need to recompile?
Back to top
View user's profile Send private message
Bharath Bhat

Active User


Joined: 20 Mar 2008
Posts: 283
Location: chennai

PostPosted: Wed Feb 04, 2009 8:04 pm    Post subject:
Reply with quote

Quote:
My program has a SELECT COUNT (*) statement

No. That refers to the no. of rows present in the table. Not columns.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu Feb 05, 2009 12:33 pm    Post subject:
Reply with quote

Hi,

What if added columns possess more rows with existing columns with NULL values?
Back to top
View user's profile Send private message
Bharath Bhat

Active User


Joined: 20 Mar 2008
Posts: 283
Location: chennai

PostPosted: Thu Feb 05, 2009 2:17 pm    Post subject:
Reply with quote

Anuj D. wrote:
Hi,

What if added columns possess more rows with existing columns with NULL values?


Atleast the primary keys cannot be null. icon_wink.gif
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu Feb 05, 2009 2:50 pm    Post subject:
Reply with quote

Fair enough..was trying to be a local interviewer.. icon_razz.gif
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 -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Help Needed with View Direct shailesh_do CA Products 2 Wed Jul 13, 2016 10:39 am
No new posts Information needed on using the COBAN... venugopal.dondla COBOL Programming 5 Thu Oct 08, 2015 3:34 pm
No new posts Help needed in Conditional statement ... vinu78 DB2 5 Tue Sep 15, 2015 10:14 am
No new posts Help needed to locate the changes wh... thesumitk TSO/ISPF 6 Fri Jun 12, 2015 6:21 pm
No new posts Sort help needed guptae DFSORT/ICETOOL 5 Tue Jul 01, 2014 11:34 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us