View previous topic :: View next topic
|
Author |
Message |
Binaya
New User
Joined: 03 Jul 2007 Posts: 77 Location: Hyderabad
|
|
|
|
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 |
|
|
HappySrinu
Active User
Joined: 22 Jan 2008 Posts: 194 Location: India
|
|
|
|
I don't think you need to recompile as long as you don't use those changed columns in your program |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
sri_mf
Active User
Joined: 31 Aug 2006 Posts: 218 Location: India
|
|
|
|
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 |
|
|
Binaya
New User
Joined: 03 Jul 2007 Posts: 77 Location: Hyderabad
|
|
|
|
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 |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
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 |
|
|
the_gautam
Active User
Joined: 05 Jun 2005 Posts: 165 Location: Bangalore
|
|
|
|
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 |
|
|
sri_mf
Active User
Joined: 31 Aug 2006 Posts: 218 Location: India
|
|
|
|
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 |
|
|
Binaya
New User
Joined: 03 Jul 2007 Posts: 77 Location: Hyderabad
|
|
|
|
Generating and Compilation are same....
Regards, |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
sri_mf
Active User
Joined: 31 Aug 2006 Posts: 218 Location: India
|
|
|
|
Good info enrico..Thanks ) |
|
Back to top |
|
|
nashaikh
New User
Joined: 30 Oct 2008 Posts: 3 Location: Pune, India
|
|
|
|
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 |
|
|
Bharath Bhat
Active User
Joined: 20 Mar 2008 Posts: 283 Location: chennai
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi,
What if added columns possess more rows with existing columns with NULL values? |
|
Back to top |
|
|
Bharath Bhat
Active User
Joined: 20 Mar 2008 Posts: 283 Location: chennai
|
|
|
|
Anuj D. wrote: |
Hi,
What if added columns possess more rows with existing columns with NULL values? |
Atleast the primary keys cannot be null. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Fair enough..was trying to be a local interviewer.. |
|
Back to top |
|
|
|