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

Is Recompilation Needed?


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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: 194
Location: India

PostPosted: Wed Mar 19, 2008 3:21 pm
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

Moderator Emeritus


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

PostPosted: Wed Mar 19, 2008 8:02 pm
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: 218
Location: India

PostPosted: Thu Mar 20, 2008 12:52 pm
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
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

Senior Member


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

PostPosted: Thu Mar 20, 2008 7:37 pm
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
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: 218
Location: India

PostPosted: Wed Mar 26, 2008 3:27 pm
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
Reply with quote

Generating and Compilation are same....

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

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Wed Mar 26, 2008 3:55 pm
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: 218
Location: India

PostPosted: Wed Mar 26, 2008 4:16 pm
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
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
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

Superior Member


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

PostPosted: Thu Feb 05, 2009 12:33 pm
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
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

Superior Member


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

PostPosted: Thu Feb 05, 2009 2:50 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Mainframe Programmer with CICS Skill... Mainframe Jobs 0
No new posts Help needed to assemble IMS sample co... ABENDS & Debugging 4
No new posts RABBIT HOLE NEEDED - "Live"... All Other Mainframe Topics 0
No new posts Mainframe profiles needed @ Cognizant Mainframe Jobs 0
No new posts COBOL Student learning COBOL File Han... COBOL Programming 3
Search our Forums:

Back to Top