Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Using SQL to save DB2 File

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using SQL to save DB2 File

    Hi denicolamd, Not knowing the context of your application it's not easy to make any suggestions. I assume you are accessing DB2 tables from the remote (not OS/400 based) application as in case of iSeries job you would use savobj / rstobj for this and would not have to restrict yourself to SQL. Further assumption is that you need to backup / restore a particular table and you know in advance what table it is. If that's the case I would create a permanent backup file with the same structure and then just use delete / insert data to / from backup table. HTH Dmitriy

  • #2
    Using SQL to save DB2 File

    Can I use SQL to save data from a DB2 physical file and then restore it to the file at anytime in the future? I understand that the DDS attributes of the file would remain the same. I was researching and it looked like using the Create Table From * Myfile and saving the results to a source member. Has anyone tried this before and with what results? Thanks

    Comment


    • #3
      Using SQL to save DB2 File

      You can use "create table" to copy all, some or no records from an existing table to a new table. The example below creates a copy of file(table) LOCSHIP in library myLIB, and populates it with selective records. The "with data" at the end is important.
      Code

      Comment

      Working...
      X