Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

impacts on cobol prgm when feilds r added to db2 table

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
rajmainframe

New User


Joined: 28 Nov 2006
Posts: 1
Location: bangalore

PostPosted: Thu Nov 30, 2006 12:24 pm    Post subject: impacts on cobol prgm when feilds r added to db2 table
Reply with quote

hi... this is raj ... doing course of ibm-mainframe i would like to know..

what are all the impacts we get in cobol pgm when i add some more fields to db2 table..
what are all changes i hv to make in cobol pgm...

plz ...reply
Back to top
View user's profile Send private message

guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Thu Nov 30, 2006 12:38 pm    Post subject:
Reply with quote

Hi Rajmainframe,

1) U need to change the dclgen for that table
2) Need to check how many program r using that table
3) IF program r inserting the values in the table then do we define not null for the newly added field then we nee to change insert query & recompile the pgm
4) IF program r having select on that table there can be two case
1) Program r not using that newly added field in that case recompilation is not need but suggest to recompile
2) Program r using newly added field than in that case u need to change in the query & recompile the program.

One more point if any of the program contain select * then u need to change the query to accommodate host variable to newly added field if u need them otherwise change the query to specifying the column name that was there previously in the table
Back to top
View user's profile Send private message
cobolunni

Active User


Joined: 07 Aug 2006
Posts: 128
Location: kerala,india

PostPosted: Thu Nov 30, 2006 1:40 pm    Post subject:
Reply with quote

Quote:
3) IF program r inserting the values in the table then do we define not null for the newly added field then we nee to change insert query & recompile the pgm


I dont think we can define NOT NULL for newly added field
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2180
Location: @my desk

PostPosted: Thu Nov 30, 2006 7:39 pm    Post subject:
Reply with quote

Hi cobolunni,

Tell me whats the problem in defining the table as NOT NULL......

Thanks

Arun
Back to top
View user's profile Send private message
cobolunni

Active User


Joined: 07 Aug 2006
Posts: 128
Location: kerala,india

PostPosted: Fri Dec 01, 2006 4:52 pm    Post subject: Re: impacts on cobol prgm when feilds r added to db2 table
Reply with quote

because in case we are adding a new field to the table in which we had already added the values ,Our new column contains null value for all the rows
that we inserted so we cant specify notnull to our new column because the value of new column will be null for every row that we had added
also in the db2sql manual it is told that
alter add column-name type not null with default is only possible
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Full Time COBOL Software Development ... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:24 am
This topic is locked: you cannot edit posts or make replies. COBOL Software Development Lead at Fi... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:21 am
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us