Library /sys$common/syshlp/helplib.hlb  —  ACCOUNTING  /SORT
    Sorts the selected records.

    Format

      /SORT[=([-]sort_field[,...])]

1  –  Keyword

 sort_field[,...]

    Specifies the sort key.

    The following table shows the keywords available. You can specify
    up to ten sort fields.

    Keyword          Sorts on This Field

    ACCOUNT          Account
    ADDRESS          Address of the node that made the DECnet for
                     OpenVMS request
    BUFFERED_IO      Number of buffered I/Os
    DIRECT_IO        Number of direct I/Os
    ELAPSED          Elapsed time
    ENTRY            Print or batch job queue entry number
    EXECUTION        Number of images run by the process
    FAULTS           Number of hard and soft page faults
    FINISHED         Time record was logged in the accounting file
    GETS             Number of GETs from the file that was printed
    IDENT            Process identifier (PID)
    IMAGE            Image name (sorts only on file name portion of
                     the image file specification)
    JOB              Name of print or batch job
    NODE             Name of the node that made the DECnet for
                     OpenVMS request
    OWNER            PID of parent process
    PAGE_FILE        Peak page file usage
    PAGE_READS       Number of hard page faults
    PAGES            Number of pages printed
    PRIORITY         Base process priority, or print or batch queue
                     priority
    PROCESS          Type of process
    PROCESSOR        Total CPU time used
    QIOS             Number of QIOs to the printer
    QUEUE            Name of print or batch queue
    QUEUED           Time print job was queued
    STARTED          Start time
    STATUS           Final exit status code
    TERMINAL         Terminal name
    TYPE             Type of record
    UIC              User identification code
    USER             User name at local node
    VECTOR_          Vector CPU time (see the description of the
    PROCESSOR        /FULL qualifier for further details)
    VOLUMES          Number of volumes mounted
    WORKING_SET      Peak working set size

    For each keyword, see the description of the corresponding
    Accounting utility qualifier or the table in the /TYPE qualifier
    section for details of the types of record in which the
    corresponding field is present.

2  –  Description

    The /SORT qualifier merges the selected records from each
    input file (each file listed in the parameter to the ACCOUNTING
    command) and sorts them using the specified sort key. The records
    are sorted according to the value of the first sort field in the
    list, and when two or more records have the same value in this
    field, they are sorted by the value of the second sort field in
    the list, and so on.

    The records are sorted in ascending order of the sort field
    value. If the keyword is preceded by a minus sign, the records
    are sorted in descending order.

    When you use the /SORT qualifier, records are rejected if they do
    not contain the sort field. For example, /SORT=IMAGE rejects all
    records that are not of type IMAGE, because the image name field
    is only present in records of type IMAGE. Similarly, /SORT=PAGES
    rejects all records except those for print jobs.

    You cannot use the /SORT qualifier with the /SUMMARY qualifier.

3  –  Examples

    1.$ ACCOUNTING /TYPE=PRINT /SORT=USER

      This example processes the file SYS$MANAGER:ACCOUNTNG.DAT. It
      produces a brief report of all the records for print jobs and
      displays them in user name order.

      The following example shows the report that is produced:

 Date / Time           Type  Subtype Username     ID      Source  Status
 -------------------------------------------------------------------------
  4-JAN-2000 09:53:05  PRINT         BROWN        20A00193        00040001
 13-JAN-2000 13:36:04  PRINT         BROWN        20A00442        00000001
 13-JAN-2000 12:42:37  PRINT         BROWN        20A00442        00000001
 13-JAN-2000 14:43:56  PRINT         DECNET_MAIL  20A00456        00000001
 14-JAN-2000 19:39:01  PRINT         DECNET_MAIL  20A00265        00000001
 14-JAN-2000 20:09:03  PRINT         DECNET_MAIL  20A00127        00000001
 14-JAN-2000 20:34:45  PRINT         DECNET_MAIL  20A00127        00000001
 14-JAN-2000 11:23:34  PRINT         FISH         20A0032E        00040001
 14-JAN-2000 16:43:16  PRINT         JONES        20A00070        00040001
 14-JAN-2000 09:30:21  PRINT         SMITH        20A00530        00040001

    2.$ ACCOUNTING MYFILE1.DAT,MYFILE2.DAT /SORT=IMAGE -
      _$ /FULL /REJECTED=NON_IMAGE.DAT

      This example processes two files, MYFILE1.DAT and MYFILE2.DAT,
      to produce a full report of records of type IMAGE, sorted in
      image name order. It creates the file NON_IMAGE.DAT, and copies
      all records except those of type IMAGE to that file. Notice
      that no selection qualifiers are used, and so all records are
      selected for processing. When the records are sorted, records
      that do not contain an image name are rejected.
Close Help