AS/400 Query Rows

25 pts.
Tags:
AS/400
AS/400 Query
We have been running a series of queries that create a final report for years. All of a sudden when we run the report, it only has the first 100 rows. Where would I look to see if somehow we have put a limit in one of the queries?

Answer Wiki

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

Are the queries static or modified daily to run?

I would first check dates within the query.  The second item would be the matching of input files.

The second item would be check the input to each query for total number of records.

I would then check to see if any new PTF’s were loaded and applied.

Start with the first query and see what the output results would be.  Repeat until the last query.

Run the report with query and then do it again with SQL.

Why are you not using SQL to generate the report?

Discuss This Question: 5  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
  • ToddN2000
    HAs the file been cleaned up / purged of old data like a year end or has there been an upgrade and the historical data has not been moved to the new file ? Check the queries for date issues and broken joins/links to other files.
    11,860 pointsBadges:
    report
  • Tinamh
    Thank you. This is a series of queries that pull biweekly payroll data to a final query that is then imported to Excel to a template. We enter the new paycheck date for each query and run them in a specific order. The person that designed is no longer with us and we are not that familiar with query or SQL. We will go back and check each query - I was hoping there would be one place where the number of records could be limited that we could check for each query in the series.
    25 pointsBadges:
    report
  • ToddN2000

    Were the queries created from WRKQRY or CRTQMQRY?  Try WRKQRY, option 5,  and enter the query name. You can check what files are used by selecting file selections with a 1. You can check the selection criteria by placing a 1 next to "Select records". Verify your selection conditions are still valid. If it's not found with the WRKQRY command try WRKQMQRY. Then select with option 10 to check out the source behind the query. This will show the files and selections criteria being used. If you are still having issues try and post you selection code and we can review it.

     

     

    11,860 pointsBadges:
    report
  • ToddN2000
    Also if they were created using WRKQRY you can check the output from each one. Go back to WRKQRY, option5, enter name/library. Then place a 1 in "select output type". It is most likely creating a file to be used as input to the next query. You can find the name of this file here....You mentioned that the person who designed it is no longer with you. Did they leave on good terms? Is it possible they may have modified this process before they left ?
    11,860 pointsBadges:
    report
  • Tinamh
    Thank you, Todd.  They were created in WRKQRY. We will follow your suggestions above.  The person left on good terms about 4 years ago and we have been running these queries every 2 weeks without issues until 2 weeks ago.
    25 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