You recently responded to this question: How can I add a field to the end of a physical file? Is it possible to add a field in LF? I know one way is by editing the source using option two from wrkmbrpdm. I will change the parm LVLCHK to *No, so that I don't have to recompile all programs. But is there any other way? Is it possible by CHGPF?
The CHGPF command (& SQL Alter Table) can be used to add, remove, and change columns from physical files and SQL tables. Logical files would have to be dropped and recreated. The last statement is not correct. The system handles all that for you.
You're right, I meant to say one of the benefits of using CHGPF & ALTER TABLE are that DB2 handles the logical file dependencies.
MORE INFORMATION ON THIS TOPIC
Search400.com's targeted search engine: Get relevant information on DB2/400.
The Best Web Links: tips, tutorials and more.
Check out this online event, Getting the Most out of SQL & DB2 UDB for the iSeries.
Dig Deeper on Oracle on iSeries
Related Q&A from Kent Milligan
When working with DB2 files with columns that have both short and long names, there is no option choose which column names are returned via ODBC ... Continue Reading
When developing tables in a parent-child relationship, use a primary key and a foreign key along with a unique ID to make your database easier to ... Continue Reading
IBM did not change the default of the reuse deleted files function to YES for physical files in order to minimize the impact on any existing ... Continue Reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.