Joined: 14 Oct 2005 Posts: 1187 Location: Bangalore,India
First make a fairscan on that table to identify which programs are using that particular table.
2) What changes u r making in table
a) If u adding new coloumn than u have to change all those program
that have the query like that
b) if u renaming some coloumn ( changing fielda to fieldb)than u have
to change name of that Particular colum in each program that have
the sql like
c) if u changing defination of some coloumn than u have to make
change length of corrosponding host variable in all those pgm which
have query that contain that particular coloumn
Joined: 01 Aug 2005 Posts: 105 Location: Somerset, NJ
The first thing you've to do when there was a table change is modifing the DCLGEN & copybook to reflect the change and recompile the associated programs.
Before recompiling the programs you'll have to make sure that you've changed the embedded SQLs accordingly.
As an example, let's assume that there were 10 fields in the table and after the change being applied to the table, there're 11 fields now including the new one added at the end, which is defined as NOT NULL. If your program is doing an insert operation and you haven't modified the SQL, the insert operation will fail giving a code of -407.
The explanation is you were trying to insert a null value into a non nullable column.
In brief, you'll have to change the copybooks/SQL statements depending up on the situation.