40 pts.
 How to run query in AS 400?
New user, like to knw in detail how to run query in AS 400 with snapshot will be better.

Software/Hardware used:
ASKED: September 6, 2010  8:59 AM
UPDATED: January 1, 2011  1:32 AM

Answer Wiki:
Last Wiki Answer Submitted:  Be the first to answer this question.
All Answer Wiki Contributors:  Be the first to answer this question.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

What kind of query? What language are you using? What operating system version is installed? What will you do with the query result set — use it for reporting? for display? for updating?

Tom

 108,240 pts.

 

Any querry, with SQL language. Version 5.9 for Windows.

 40 pts.

 

You run a query against an AS/400 database on Windows the same way you run a query on Windows against any remote database. You can install a client product that executes queries, or you can write a program, e.g., a VB program, that executes queries through an ODBC connection (or JDBC or ADO or whatever driver connection you can configure).

Since you’re running Windows, it’s not clear what the question is about. Are you wanting to learn how ODBC is used on Windows? (Or JDBC or any other remote database connection technology?) Do you want to know about writing programs on Windows for remote database access?

A common way for developers to run basic SQL queries is through the iSeries Navigator “Run SQL Scripts” feature. Are you familiar with iSeries Navigator? Are you a developer?

Tom

 108,240 pts.

 

for AS/400 – Use WRKQRY command.. (Query/400)..

 315 pts.

 

You should do a Google search on Query 400 and try reading the book first.
…and…
for AS/400 – Use WRKQRY command.. (Query/400)..

A search for { query 400 } might be useful, though if you had actually run such a search and tried to sift through the results, you would find little to do with SQL. Such a search wouldn’t help much.

And WRKQRY isn’t appropriate. QUERY/400 is not a good tool for those who are familiar with SQL. It’s been nearly obsoleted by Query Manager for 20 years or so. WRKQRY is only useful when SQL can’t be used or when QUERY/400 was used in the past to create queries that need to be modified.

STRQM should be used whenever it’s available. AS/400s, iSeries and later systems with the SQL Development product installed should using QM and moving away from any QUERY/400 queries.

If QUERY/400 queries already exist, QM can also execute them.

Tom

 108,240 pts.