AS/400 output file break level and overlow field

25 pts.
Tags:
AS/400
I've created a query using WRKQRY to output the file and added break level in the query in order to output the data in unique. I found additional field break level and overlow fields existed in output file. How can I output a file without this 2 additional fields? Thanks in advance.

Answer Wiki

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

Either remove the breaks or when selecting from this new file,  only select those they do not have a break level ID.

Discuss This Question: 7  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.
  • azohawk
    Whenever WRKQRY is used to create levle breaks and the output is an output file, the breaks are indicated by additional fields being added to the file. If you want the outfile without the additional fields, remove the level breaks.

    Using the old Query/400 (WRKQRY) and level breaks to an out file will always add the additional fields. That is the way it always has been and since IBM has indicated that there are no new enhancements to this product, that is the way always will be.

    2,905 pointsBadges:
    report
  • ToddN2000
    What are you breaking on and what summary functions are you using? You may be better off using an OPNQRYF command to do the job.
    89,455 pointsBadges:
    report
  • Charlena
    Breaking level added to filter the duplicate record and generate the output file with selected fields. But the output file added the additional fields of break level and overflow flag.
    25 pointsBadges:
    report
  • deepu9321
    Breaking level for removing the duplicates? 

    Would you need Summary records as well (Main purpose of Breaking level)? 
    4,880 pointsBadges:
    report
  • Charlena
    Yes, breaking level & summary records added in query in order to select unique record for output file.
    25 pointsBadges:
    report
  • ToddN2000
    You might be better of using SQL. Select distinct uniquefld, a.* from myfile a.
    89,455 pointsBadges:
    report
  • deepu9321
    Main Purpose of using Break level is to Group the records and to retrieve Summary (Total/Average/Minimum/Maximum/Count)  of the group. This could contain multiple breaking levels. Output file will contain these two additional fields. 

    You can write down a query to eliminate duplicate records. If not, You would need to ignore the two additional fields and use only the required. 

    It depends on what your requirement is, How are you going to use the resulting file? SQL would be better option.
    4,880 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: