Global change of file libraries in Query

540 pts.
Tags:
AS/400 Input Files
AS/400 Library
AS/400 Query
Is there a way to globally change the libraries of the input files for a set of AS400 Queries, or possible force it to use *libl. I know that I entered *libl for the file selection, but it then defaults to a specific library.
ASKED: October 31, 2008  3:06 PM
UPDATED: September 25, 2010  8:40 AM

Answer Wiki

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

Hi,

You can always specify *LIBL/Filename when you use RUNQRY.

Regards,

Martin Gilbert.

==========================================================

A Query/400 query isn’t built over a *LIBL file. It is always built over a specific file in a specific library.

When you specify *LIBL during query creation, what you are doing is telling Query/400 to find the first file in the current library list that matches the file name. That becomes the file that is used to build the query. The “*LIBL” is replaced with an actual library name at that time.

The correct method of specifying *LIBL is at run-time on the RUNQRY command. The RUNQRY command can specify *LIBL if the library list should be searched at run-time.

The QRYFILE() parameter default has no value for file-name, so CHGCMDDFT can’t be used to change the default. You can’t change a default value that is null.

To change the file specification, the query must be recreated. There is no interface available to recreate Query/400 queries except interactive WRKQRY.

Tom

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
  • Modiyooch
    That requires massive changes to CL programs which would be more work and analysis than editing queries.
    540 pointsBadges:
    report
  • Gilly400
    Hi, You might be able to change the RUNQRY command defaults to :- QRYFILE((*LIBL/*SAME)) Afraid I don't have a system where I can try this, so I can't give you any guarantee that this'll work. Regards, Martin Gilbert.
    23,730 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