Your question cannot be easily answered:
1. Convert DDS to DDL --> Create the SQL-Code (CREATE OR REPLACE Statements)
with Reverse Engineering or the GENERATE_SQL stored procedure.
2. Modify the generated SQL Scripts
3. Run the modified SQL Scripts --> Run the CREATE OR REPLACE Table
Statement first and the run the SQL Codes for all dependent objects.

No need to save or copy any data --> If you want to be save, you can save
the table first.
If something goes wrong restore the table and (if necessary) recreate all
depenent database objects.

To avoid problems you should rework your programs:
1. Create a base view which includes (in the first step) all columns of the
base table or physical file
2. Create additional views for hiding complexity and moving business logic
into the database on the top of the base view.
3. Convert native I/O with embedded SQL but access ony SQL views and select
only the columns you need.
4. Create standard procedures for Insert, Update or Delete, so there is only
a single procedure that will perform any update or any insert or any delete
for a specific table.

If you need some more help ... let me know.

Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"Shoot for the moon, even if you miss, you'll land among the stars." (Les
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
?Train people well enough so they can leave, treat them well enough so they
don't want to.? (Richard Branson)

-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of
Richard Schoen
Sent: Mittwoch, 24. November 2021 16:56
To: midrange-l@xxxxxxxxxxxxxxxxxx
Subject: RE: Deploying DB2 Table Changes

Right. Thus the complexity.

In my scenario you can assume V7R3 and higher.

There could be: DDL, DDS, add new fields, remove fields, resize fiels, add
indexes, add logical files, the list is endless.......

And any one of these things can then cause level checks for RPG, COBOL or CL

I knew this wouldn't be a simple question, but I'm curious where to start.

And in the end the answer may be: manually rename/move old table, manually
stage the new table and copy data back, then recompile all the associated
objects to avoid level checks.

Which also begs the question as to whether DSPPGMREF has any alternatives to
id potentially affected changed programs.

I'm working with a IBMi dev team who is going from single box development to
have a dev/test machine and production machine and trying to make their
deployment options easier.

Richard Schoen
Email: richard@xxxxxxxxxxxxxxxxx
message: 6
date: Wed, 24 Nov 2021 14:37:37 +0000
from: Alan Shore via MIDRANGE-L <midrange-l@xxxxxxxxxxxxxxxxxx>
subject: RE: Deploying DB2 Table Changes

Hi Richard
The answer to your question is tape recording number 26 It depends First -
what release are you on? If you are on an extremely old (decades) release,
you may have no choice What change are you doing?
Adding one or more new fields?
Changing an existing field - if so - from what to what

Alan Shore
Solutions Architect
IT Supply Chain Execution


60 Orville Drive
Bohemia, NY 11716
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
E-mail : ASHORE@xxxxxxxxxxxxxxxxxxxx
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related

Help support by shopping at with our affiliate link:

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.