CLLE – Openqry Files

50 pts.
Tags:
AS/400
CLLE
Open Query
Open Query File
OPNQRY
Physical File
Using opnqry files, we create any key field for physical file for temporarily usage.Instead of creating another logical can i create opnqry? Please give code

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.

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

Discuss This Question: 1  Reply

 
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
  • TomLiotta
    Yes, you can. The question becomes "Why do you want to do that?" When you create a query-file, you are essentially creating a new LF at run-time. Every time you run the OPNQRYF command, you create a new LF and then delete it when the job finishes or the query-file is closed. If you simply created a real LF, it would only be created once. (Index maintenance would be on-going as updates happened to the PF, unless the access path was shared.) So, you would usually only use OPNQRYF in a program if the program was run very infrequently, perhaps less than once a month. You might also use OPNQRYF when the view and/or the keys are unpredictable, but those should be very rare choices. SQL is almost always a better choice for many cases. As far as examples go, the Information Center has lots of examples. Just read the OPNQRYF topic -- specifying a key field is in the very first example. Simply searching the Info Center for "opnqryf" brings up lots of discussion. There's no reason to think that our examples will be any more helpful than the ones that are in the official documentation. (If you are a student, you need to show us what you have already tried; we can provide guidance but can't do your work for you.) 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.

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