Limit Query PF File Size

Tags:
AS 400
AS/400 queries
Physical File
When creating a PF thru AS/400 Query, would like to limit file size?
1

Answer Wiki

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

If using the WRKQRY command there is not a way to do it. You can limit based on your select but you cannot set a limit of say 50,000. You might be able to get around this by running the query once. Then use the CHGPF and set your file size limit and CLRPFM Then the next time you run the query use the add to member option until it errors out, You might be better of doing this using SQL to create the table and setting the limit in the select statement. 

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.
  • TheRealRaven
    Mostly agree with the 'Answer'. If you mean the "Query" product accessed with WRKQRY, I don't recall ever seeing a good way to limit output file size directly.

    It can almost always be done indirectly by limiting storage for each user through the MAXSTG() attribute. Having it set for *NOMAX is just asking for trouble.

    Regardless, if the capability to create files is given, it has to be anticipated that the files might be large.
    35,690 pointsBadges:
    report
  • ToddN2000
    I'm not sure why you would want to put a limit on it other than building a file to use for test data. Would not make sense to truncate a file indiscriminately. If that is the case and you want a test file to work with, limit the data by increasing the select options or better yet do this using SQL where you can control your result file output.
    0 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: