using QDBRTVFD to find SQL view create statement

pts.
Tags:
Application development
AS/400
CLP
IBM DB2
RPGLE
Hello all. Just wanted to know if anyone out there knows how to use QDBRTVFD to retrieve the SQL view create statement. For our update process, I am scanning the customer's libraries to find buisiness views. When I find them, I want to extract the SQL view create statement (like in DSPFD) and place it in a file to be used later to recreate this view. Any help would be greatly appreciated!!!

Answer Wiki

Thanks. We'll let you know when a new response is added.

I’ve no experience with the command line version, however, you will find that the iSeries Navigator, installed with all the options, will make your task much easier. You can expand the databases to see schema, and once that is expanded you will have the option to look at the views in the schema. From there you can retrieve the DDL with only a couple of mouse clicks. There are other options as well that you might find useful…(I’m using v5r3 of the navigator, and some of the terms changed from prior versions, but if you’re not too far back the concepts will still apply)

=================================================

Access to SQL and the system catalog are all you need. Codd’s 12 Rules pretty dictate that. (Consider Rule 0 plus rule 4.)

The SYSVIEWS table should supply everything you need.

Tom

Discuss This Question: 4  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Mwutzke
    I assume by "business view" you are referring to views created via SQL. You can usually find good examples of API code on the internet. If you search for 'QDBRTVFD example' you should get several examples. Here's one: http://www.iseriesnetwork.com/ClubTech/TNT400/bo400ng/as400qdbrtvfd.htm GFY
    0 pointsBadges:
    report
  • Oldwood
    Have a look at Carsten Flensburgs example source code. Might be of use for you. http://www.think400.dk/apier_7.htm#eks0003
    15 pointsBadges:
    report
  • Costevet
    The DDL for the view is in the system catalog. Just query SYSVIEWS
    0 pointsBadges:
    report
  • JPLamontre
    the command line version of iseries extractor is at http://jplamontre.free.fr/AS400/RTVSQL.htm
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following