VMS Help  —  SOR Routines, SOR$DTYPE  Arguments
 context

    OpenVMS usage:context
    type:         longword (unsigned)
    access:       modify
    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.

 dtype_code

    OpenVMS usage:word_unsigned
    type:         word (unsigned)
    access:       write only
    mechanism:    by reference
    Returned key data type code. The dtype_code argument is the
    address of a word into which SORT/MERGE writes the key data type
    code that can be used in the key_buffer argument to SOR$BEGIN_
    SORT or SOR$BEGIN_MERGE.

 usage

    OpenVMS usage:longword_unsigned
    type:         longword (unsigned)
    access:       read only
    mechanism:    by reference
    Address of a longword containing a code that indicates the
    interpretation of the p1 argument. The following table lists
    and describes the valid usage codes:

    Flag             Description

    SOR$K_ROUTINE    The p1 argument should be interpreted as the
                     address of the procedure value of a routine
                     that SORT/MERGE will call to compare keys
                     described by the dtype_code returned by the
                     call to SOR$DTYPE.
    SOR$K_NCS_TABLE  The p1 argument should be interpreted as the
                     address of a collating sequence identification
                     returned by a call to NCS$GET_CS. SORT/MERGE
                     will use this collating sequence to compare keys
                     described by the dtype_code returned by the call
                     to SOR$DTYPE.

    If SOR$K_ROUTINE is returned, SORT/MERGE will call this routine
    with five reference arguments-ADRS1, ADRS2, LENG1, LENG2, CNTX-
    corresponding to the addresses of the two keys to be compared,
    the lengths of the two keys, and the context longword.

    The comparison routine must return a 32-bit integer value:

    o  -1 if the first key collates before the second

    o  0 if the keys collate as equal

    o  +1 if the first key collates after the second

 p1

    OpenVMS usage:longword_unsigned
    type:         longword (unsigned)
    access:       read only
    mechanism:    by reference
    Address of the procedure value of a routine or the address of
    a collating sequence identification, depending on the usage
    argument.
Close Help