Re: Sort file by computed field

From: Warren Simmons (wsimmons5_at_optonline.net)
Date: 06/14/04

  • Next message: Hugh Candlin: "Re: IMS Assistance"
    Date: Mon, 14 Jun 2004 00:59:42 GMT
    
    

    Sally,

    You say that you are to sort on a computed field that is not in the
    record.

    One guess would be, do the computation, and add the value of that
    result to a field you place in the interium file (first pass of the
    sort).

    Then it seems that it would be possable to sort the records on that
    added field, and create what ever resulting record layout you need
    for the output in the Last pass own code. As it stands it looks like
    you are grouping something by value.

    All the 100, 200, 300, etc. BTW, I mean the first record with no value
    would appear as the first record of the output file along with all the
    other records with no value. If that group has a name, it might be
    something like all between one value and the next group minus one.
    \
    You will probably get other opinions.

    Warren Simmons

    Sally Pascoe wrote:
    > I want to sort records for a report in descending order of a computed
    > field.
    >
    > How do I sort records in a file based on a computed field based on two
    > fields in that file but the computed field is not in the file?
    >
    > Even a keyword for the command so I had something to look for would be
    > a help.
    >
    > Thank you


  • Next message: Hugh Candlin: "Re: IMS Assistance"

    Relevant Pages

    • Re: Sort file by computed field
      ... >How do I sort records in a file based on a computed field based on two ... You use the SORT verb. ... The OUTPUT PROCEDURE prints the report. ...
      (comp.lang.cobol)
    • Re: Sorting Months
      ... Add a computed field that returns the month number (either the Month ... function, or format as mm, not m). ... Sort on that field, even if you don't ... > instead of by calendar order. ...
      (microsoft.public.access.reports)
    • Re: Sort Ascending
      ... Easiest solution would be to add a computed field to the query, and sort on ... there are some entries that do not have any dates. ... ascending sort. ...
      (microsoft.public.access.modulesdaovba)
    • Re: Sort by Month
      ... Add a computed field to your query, and sort by it. ... > format of dd/mm/yy. ...
      (microsoft.public.access.queries)
    • Re: Sort file by computed field
      ... > How do I sort records in a file based on a computed field based on two ... Seeing that this is a COBOL newsgroup - how about using a COBOL sort? ...
      (comp.lang.cobol)