IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Load new table with Old unload - DB2


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
germanyrajesh

New User


Joined: 09 May 2023
Posts: 17
Location: Norway

PostPosted: Mon Feb 19, 2024 9:09 pm
Reply with quote

Hi,

There exist table with 5 columns and data in it.

I need to add a new column in between not at the end. Before DROP/RE-CREATE. I have taken the copy and unload of the table.

Now, new column has been added to the table. Total number of columns is 6.

However, what is the easiest and best way to load back the data into the new table using unload which was taken before the changes.

New column (CHAR - datatype) should have default value SPACES.

Thanks
Back to top
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 592
Location: London

PostPosted: Wed Feb 21, 2024 8:12 pm
Reply with quote

You may be able to modify a copy ofthe unload data to match the requirement using DFSORT
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Sat Feb 24, 2024 7:34 pm
Reply with quote

If the new column is not null with default, all you need to do is use LOAD utility control cards that match the old data.
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Wed Feb 28, 2024 1:32 am
Reply with quote

If the new column is not null with default, all you need to do is use LOAD utility control cards that match the old data.
Back to top
View user's profile Send private message
germanyrajesh

New User


Joined: 09 May 2023
Posts: 17
Location: Norway

PostPosted: Thu Feb 29, 2024 2:16 pm
Reply with quote

don.leahy wrote:
If the new column is not null with default, all you need to do is use LOAD utility control cards that match the old data.


Thank you icon_smile.gif
Back to top
View user's profile Send private message
germanyrajesh

New User


Joined: 09 May 2023
Posts: 17
Location: Norway

PostPosted: Thu Feb 29, 2024 2:16 pm
Reply with quote

don.leahy wrote:
If the new column is not null with default, all you need to do is use LOAD utility control cards that match the old data.



Thank you icon_smile.gif
Back to top
View user's profile Send private message
germanyrajesh

New User


Joined: 09 May 2023
Posts: 17
Location: Norway

PostPosted: Thu Feb 29, 2024 2:16 pm
Reply with quote

Pete Wilson wrote:
You may be able to modify a copy ofthe unload data to match the requirement using DFSORT


Thank you icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts how to eliminate null indicator value... DB2 7
No new posts Unload and Load ISPF Table TSO/ISPF 4
No new posts ISPF Table to add a new column TSO/ISPF 1
No new posts Inserting into table while open selec... DB2 1
No new posts Pulling a fixed number of records fro... DB2 2
Search our Forums:

Back to Top