which are all the components get affected when you alter a table by inserting a column in your db2 program.say you are using cobol,db2 and jcl.
alter table
Collapse
X
-
Tags: None
-
Depends on the construction of the table you are updating. But say it is a basic table with one index. When you add a row to the table Db2 will create and add a new row to the index. Until these changes are committed the new record will be locked. Depending on the "lock level" you have set this may just affect the one row or could affect all the rows on the current page.
By calling a piece of SQL in DB2 from an application program (in your example COBOL) you will have also loaded the "DB2 package" from the system catalogue into the DB2 subsystem. The DB2 package is basically an interpretation of the SQL you wrote in the COBOL program which is created when you BIND the DBRM into the database. You will also be affecting the DB2 logs as the activity will be recorded.
Hope that was what you were after,
Regards
Snib -
Sorry, I read ROW instead of column so please ignore my previous response as it is definitely wrong!
If you are altering a table structure in a COBOL program then you will be affecting the SYSCOLUMNS catalogue table. You will potentially, via relationships in SYSPACKDEP, also invalidate 1 or more packages that use the table. You will also affect changes to SYSTABLES ( I think - can't find my reference guide to check the columns on the SYSTABLES table!).
Not really adviced as part of an application process as any dependant SQL could start failing on INSERTs or UPDATEs due to the new column - depends on how you define the default value for the new column.
heop that helps, apologise about the other rubbish post!
SnibComment
Comment