100 pts.
 Do we need to compile LF when its PF changes
Hi, I have one small query. I have changed one PF, do I need to recompile it's dependent LF(s) ? For e.g I have earlier a PF say PF1 having 4 fields A,B,C,D (with keys A,B) now I have added a new field E. Do I need to recompile its dependent LFs say LF1,LF2.. Appreciate your quick response !

Software/Hardware used:
ASKED: July 20, 2012  9:21 AM

Answer Wiki:
Last Wiki Answer Submitted:  Be the first to answer this question.
All Answer Wiki Contributors:  Be the first to answer this question. pankaj2r   100 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

A few questions:Have you Compiled the PF?Did you compile the PF in the same library as the dependant LF’s?Basically, in order to compile the PF you will need to delete the LF’s and recompile them after the PF has compiled. The the answer to you wuestion is Yes, you must recompile dependant Lf’s. 

 380 pts.

 

1.  If you used the command CHGPF or SQL ALTER TABLE you will not need to recompile the logicals
 
2.  If the logical has a field list you may want to add the field to the logical and recompile the logical. 

 44,220 pts.

 

Thought I learned something new today. Tried the CHGPF command and it worked fine. New fields were in both th PF and LF without having to recompile them. The only problem I found is you still get a level check on the programs using the LF. 
Is there a way to avoid this with out setting the file to *LVLCHK *NO?
 

 3,915 pts.

 

No .. since you’ve changed the physical file and the logical file structure you want the programs to fail!!!  (what if you made the first field in the file one character wider…..). 
 
 

 44,220 pts.

 

If the format level identifier changes for a file, programs that open the file will need to be recompiled in order to avoid a level check.
 
It doesn’t matter how the file was changed. If a PF was changed with CHGPF and the related LFs received a new level ID, programs that open the LFs will need to be recompiled.
 
Tom

 108,360 pts.