VMS Help
SOR Routines, SOR$END_SORT

 *Conan The Librarian (sorry for the slow response - running on an old VAX)

    The SOR$END_SORT routine performs cleanup functions, such as
    closing files and releasing memory.

    Format

      SOR$END_SORT  [context]

  1 - Returns

    OpenVMS usage:cond_value
    type:         longword (unsigned)
    access:       write only
    mechanism:    by value

    Longword condition value. Most utility routines return a
    condition value in R0. Condition values that this routine can
    return are listed under Condition Values Returned.

  2 - Argument

 context

    OpenVMS usage:context
    type:         longword
    access:       write only
    mechanism:    by reference
    Value that distinguishes between multiple, concurrent SORT/MERGE
    operations. The context argument is the address of a longword
    containing the context value. When your program makes its first
    call to a SORT/MERGE routine for a particular sort or merge
    operation, the context longword must equal zero. SORT/MERGE
    then stores a value in the longword to identify the operation
    just initiated. When you make subsequent routine calls for the
    same operation, you must pass the context value supplied by
    SORT/MERGE.

  3 - Description

    The SOR$END_SORT routine ends a sort or merge operation, either
    at the end of a successful process or between calls because of an
    error. If an error status is returned, you must call SOR$END_SORT
    to release all allocated resources. In addition, this routine can
    be called at any time to close files and release memory.

    The value of the optional context argument is cleared when the
    SOR$END_SORT routine completes its operation.

    Some of the following condition values are used with different
    severities, depending on whether SORT/MERGE can recover. Thus,
    if you want to check for a specific status, you should use
    LIB$MATCH_COND.

  4 - Condition Values Returned

    SS$_NORMAL         Normal successful completion.
    SOR$_CLOSEIN       Error closing file as input.
    SOR$_CLOSEOUT      Error closing file as output.
    SOR$_ENDDIAGS      Completed with diagnostics.
    SOR$_END_SORT      SORT/MERGE terminated, context = context.
    SOR$_SYSERROR      System service error.
  Close     HLB-list     TLB-list     Help  

[legal] [privacy] [GNU] [policy] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.