Scheduling join queries in AS/400

434320 pts.
Tags:
AS/400
CL script
JOIN statement
I have an AS/400 join query that runs across 5 tables. I need to get it to run programmatically via scheduled CL scripts.  I'm trying to make it work using RUNQRY, but that only shows the query itself, not the results. How can I make this work?

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

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

    I'm trying to make it work using RUNQRY, but that only shows the query itself, not the results.

    Since RUNQRY doesn't show the query and actually shows the result, your statement doesn't make much sense. Can you give a little more detail about your coding? Show us the code and describe what happens. Numerous suggestions seem likely.

    Tom

    125,585 pointsBadges:
    report
  • philpl1jb

    If you prompt RUNQRY (press f4) -- then F9=All parameters

    You will see:

    Report output type . . . . . . . *RUNOPT  <-- change to *PRINTER

    Print query definition . . . . . *RUNOPT <-- change to *NO

    You should get printer output of your query.

    54,020 pointsBadges:
    report
  • TomLiotta
    Good catch, Phil. That's such an old option I forgot it was possible. The 'Print query definition' can cause the general query definition to be printed. The query results are still created, though (unless you know a way to shut it off). Even requesting *DISPLAY' in batch should still print the results. -- Tom
    125,585 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.

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

Following

Share this item with your network: