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

Unload and Load ISPF Table


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
upendrasri

Active User


Joined: 28 Sep 2017
Posts: 124
Location: India

PostPosted: Sat Jun 01, 2024 3:44 pm
Reply with quote

Hi,

We have a requirement to add a new column in ISPF Table. I have create new table with new column.

I want to copy data from my old table to new table.
Is it possible to unload data from old table to a ps file and load it to new table?

If anyone performed similar activity earlier, Please assist me.

Thanks.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1329
Location: Bamberg, Germany

PostPosted: Sat Jun 01, 2024 6:09 pm
Reply with quote

Check with ISPF 3.16 (it has an EXPORT/IMPORT function).
Back to top
View user's profile Send private message
upendrasri

Active User


Joined: 28 Sep 2017
Posts: 124
Location: India

PostPosted: Sun Jun 02, 2024 12:47 pm
Reply with quote

Hi Joerg,

I have tried with 3.16 but the problem is

1. My input table is having 37 colums
2. My output table is having 40 colums

When I tried export from input table to a dataset and import from this dataset to output table its copying data but its same as my input table and removing extra 3 colums.

My requirement is it should copy 37 colums and other 3 colums left as it is..

Thanks..
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 730
Location: Denmark

PostPosted: Sun Jun 02, 2024 1:05 pm
Reply with quote

You should do something like this:

TBOpen old table
TBCreate new table with all fields
Copy old table to new table, populating the new fields. The simplest way to copy is:
TBQuery old-table rows(rownum)
do rownum
TBGet old-table
TBAdd new-table
end
TBend old table
TBCLOSE new-table - to create in library
rename old table member to backup
rename new table member to old name
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1329
Location: Bamberg, Germany

PostPosted: Sun Jun 02, 2024 3:16 pm
Reply with quote

It's easier using ISPF 3.16 here. You can even add the new fields to the export DSN and import the new structure.
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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Preserve changes to ISPF Panel Variables TSO/ISPF 1
No new posts how to eliminate null indicator value... DB2 7
No new posts can an ISPF appl save user changes in... TSO/ISPF 14
No new posts ISPF Table to add a new column TSO/ISPF 1
No new posts Inserting into table while open selec... DB2 1
Search our Forums:

Back to Top