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: 2284
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
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm
No new posts XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm
No new posts COBOL DB2 program - zIIP eligible vasanthz COBOL Programming 7 Wed May 31, 2017 5:12 am


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