SQL and OPNQRYF

35 pts.
Tags:
OPNQRYF
SQL
What we can do in SQL which we cannot do in OPNQRYF

Answer Wiki

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

Another interview question?

Discuss This Question: 2  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
  • TomLiotta

    The i 6.1 SQL Reference lists about 27 groups of statements. SQL can do all of them, but OPNQRYF can do only one. By itself, that says that OPNQRYF relates to less than 4% of the SQL language. OPNQRYF supports 65 builtin functions, while SQL supports approximately 155 including all of the ones from OPNQRYF.

    Listing everything that SQL can do that OPNQRYF cannot do would require listing perhaps 80% of the entire SQL language.

    But even if just the basic SELECT statement is considered, there are tables that SQL can access with SELECT that OPNQRYF cannot process completely. With recursive SQL and common table expressions (and other features), the SQL SELECT goes far beyond OPNQRYF capabilities.

    Also, OPNQRYF cannot take advantage of the SQE to help with optimization and performance while SQL can. And OPNQRYF cannot run on a PC or Mac or under Linux, but SQL can.

    It would take far too long to list stuff that SQL can do that OPNQRYF can't. Maybe the biggest thing that SQL can do is be upgraded by IBM. OPNQRYF is a command that is effectively dead and should not be used in any new programming. IBM no longer enhances it.

    Employers should begin thinking about releasing employees who continue using OPNQRYF for new development. Our jobs involve doing what's best for employers. If we don't, then we shouldn't be working for them.

    Tom

    125,585 pointsBadges:
    report
  • WoodEngineer
    I started using OPNQRYF in the 1980's.  It was rather cumbersome and very tedious but it was the only such tool our IT department had at the time.

    When SQL came along it became much easier and faster to accomplish the same tasks and it does so much more.  Some tasks which required a good bit of coding can now be accomplished with a single SQL statement.

    The learning curve is pretty fast.  You can experiment with SQL using STRSQL.  When the results are what you need, copy the SQL statements into your RPG or COBOL program.

    Also, keep in mind that IBM is making no further enhancements to DDS.  Instead, they are directing customer to use DDL which is part of SQL.  In fact, some of the newer DB2 features can only be realized by using DDL.
    6,345 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