Another interview question?
Register Hereor login if you are already a member
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.