×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
I am looking for an example of using an SQLDA with a DESCRIBE TABLE
function in an RPG program. I found a few general examples of using an
SQLDA in RPG but nothing specific that would help me unpack the
complexities of the SQLDA. The goal is to eventually package this into
a stored procedure that will mimic the RENAME COLUMN function that is
missing in DB2 for i.
Basically, I want to retrieve the column attribute information about a
specific column in a table and create a duplicate of that column with a
new name and then drop the old column name. I can handle the column
drop and copy of the data but the creation of an exact duplicate of the
column is the difficult part. The suggestion from Midrange-L was to use
an SQL DESCRIBE TABLE function and retrieve the info into an SQLDA.
Having never done that, I need an example to help me along.
I would love to do this only with SQL and without a stored procedure and
I came up with a hack to make it work but there are some potential
issues with the approach I have taken and so a stored procedure is
probably the best route to go.
Anyone have an example or a code snippet that would illuminate the basic
steps?
Thanks
Pete
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com 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.