! This file needs to be added into SYS$HELP:DTRHELP.HLB by hand.
!
! One way is to extract the module FUNCTIONS from that library,
! keep an un-modified copy for reference, edit it and include
! the following definitions in one lump or in alphabetical order
! as you please, then put the new module back into the help library.
! Another would be to put it in as a new 'top level' help entry,
! with a definition such as (without the ! in the first column)

!1 Added_functions

! this will put all of the extra functions 'below' this entry.
! Also, remove all of these comment lines (starting with !) before
! adding this into the help library.
!
! B. Z. Lederman	Last updated 10-Apr-1990

2 FN$CHAR
    Convert an ASCII Code to an ASCII Character        (ADDED FUNCTION)

    Input:  an unsigned byte ASCII code (number)

    Output: one character (string)

    Examples:

    DTR> PRINT FN$CHAR(40)

                 Char

    (

    DTR> PRINT FN$CHAR(42)

    *

    DTR> PRINT FN$CHAR(27)|"[H"|FN$CHAR(27)|"[J"

    (This will send the escape sequence to clear the screen on most
     DEC terminals.)

    Reference: LIB$CHAR
2 FN$CLEAR_BIT 
    Clear a bit in a longword            (ADDED FUNCTION)

    Input:  a longword integer (to be changed by a single bit)
            a bit position

    Output: The new value or status?

    Reference:    FOR$JIBCLR
2 FN$CONVERT_RECLAIM
    Invoke the CONVERT/RECLAIM facility            (ADDED FUNCTION)

    Input:  the name of the file to process

    Output: none

    Reference: CONV$RECLAIM
2 FN$DAY_OF_WEEK
    Day of the week                                    (ADDED FUNCTION)

    Input:  a date

    Output: a number.  1 = Monday, 7 = Sunday

    Examples:

    DTR> PRINT "TODAY" USING W(12)
    Wednesday

    DTR> PRINT FN$DAY_OF_WEEK("TODAY")

       Day
        of
       Week

              3

    Reference:    LIB$DAY_OF_WEEK
2 FN$DAYS_SINCE
    the number of days since the base date 17-Nov-1858 (ADDED FUNCTION)

    Input:  a date.

    Output: an integer containing the days since the base date

    Reference:    LIB$DAY

    Example:

    DTR> PRINT "TODAY" USING DD-MMM-YYYY
     5-Jul-1989

    DTR> PRINT FN$DAYS_SINCE("TODAY")

       Days
       Since

          47712
2 FN$DELETE_FILE
    Delete a file                (ADDED FUNCTION)

    Input:  a name of a file to delete

    Output: none

    Reference: LIB$DELETE_FILE
2 FN$DELETE_LOGICAL
    Deletes a supervisor-mode logical from a specified table (ADDED)

    Input:  a character string containing the logical name
            a character string containing the logical name table

    Output: none

    Reference:    LIB$DELETE_LOGICAL
2 FN$DIGITS_ONLY
    Return a character string with only numeric digits (ADDED FUNCTION)

    Input: a string

    Output: a string containing only the digits 0 through 9 (or nothing)

    Example:

        DTR> print fn$digits_only("sd9(j3soi93")

               Digits

        9393
2 FN$EDT
    Edit an ASCII file                    (ADDED FUNCTION)

    Input:  the name of the file to edit.

    Output: none
2 FN$FAO
    Formatted ASCII Output                (ADDED FUNCTION)

    Input:  a format control string
            data values

    Output: a character string

    Examples:

    DTR> PRINT FN$FAO("!%D","","","","","","","","")

                String

     5-JUL-1989 09:46:44.50

    DTR> PRINT FN$FAO("!ZL, !OL",10,"10","","","","","","")

    10, 00000000012

    DTR> PRINT FN$FAO("!XL, !OL",15,"15","","","","","","")

    0000000F, 00000000017

    Reference: LIB$SYS_FAO (or SYS$FAO)
2 FN$FDL_CREATE
    Create a file from an FDL description        (ADDED FUNCTION)

    Input:  the name of an FDL file
            the name of the file to create

    Output: none

    Reference: FDL$CREATE
2 FN$GETMSG
    Get System Message                (ADDED FUNCTION)

    Input:  longword message-id (condition)
            longword (unsigned) flags

    Output: text of corresponding message

    Examples:

    DTR> PRINT FN$GETMSG(1,0)

                                        Message
                                         Text

    %SYSTEM-S-NORMAL, normal successful completion

    DTR> PRINT FN$GETMSG(10,0)

    %SYSTEM-E-ACCVIO, access violation, reason mask=!XB,
        virtual address=!XL, PC=!XL, PSL=!XL

    DTR> PRINT FN$GETMSG(20,0)

    %SYSTEM-F-BADPARAM, bad parameter value

    Reference: LIB$SYS_GETMSG (SYS$GETMSG)
2 FN$GET_SYMBOL
    Gets the value of a DCL symbol.           (ADDED FUNCTION)

    Input: a symbol

    Output: the value of that symbol

    Example:

        DTR> print fn$get_symbol("dtr")

                    FN$GET
                    SYMBOL

        $SYS$SYSTEM:DTR3242

    Reference:    LIB$GET_SYMBOL
2 FN$HELP
    Retrieves help from a help library

    Input:  a help request line (may be null)
            a help library (if null, will search for default library)
            option flags (normally 31 for full help function)

    Output: help text directly to the terminal.

    Example: retrieve help on the DCL DIRECTORY command

        DTR> FN$HELP("DIRECTORY","HELPLIB",31)
2 FN$JIAND
    Bitwise Logical AND of two values        (ADDED FUNCTION)

    Input:  two Longword Integers

    Output: bitwise logical AND of the two inputs

    Example:

    DTR> PRINT FN$JIAND(3,5)

      Bitwise
        AND

              1

    Reference:    MTH$JIAND
2 FN$JIOR
    Bitwise Logical OR of two values        (ADDED FUNCTION)

    Input:  two Longword Integers

    Output: bitwise Logical OR of the two inputs

    Example:

    DTR> PRINT FN$JIOR(3,5)

      Bitwise
        OR

              7

    Reference:    MTH$JIOR
2 FN$JIEOR
    Bitwise Logical Exclusive OR of two values    (ADDED FUNCTION)

    Input:  two Longword Integers

    Output: bitwise Logical Exclusive OR of the two inputs

    Example:

    DTR> PRINT FN$JIEOR(3,5)

      Bitwise
     Exclusive
        OR

              6

    Reference:    MTH$JIEOR
2 FN$JMOD
    Remainder of integer division            (ADDED FUNCTION)

    Input:  two Longword Integers

    Output: remainder of first divided by second.

    Example:

    DTR> PRINT FN$JMOD(5,3)

     Remainder

              2

    DTR> PRINT FN$JMOD(3,5)

              3

    Reference:    MTH$JMOD
2 FN$JNOT
    Bitwise Logical Complement of two values    (ADDED FUNCTION)

    Input:  two Longword Integers

    Output: bitwise Logical Complement of the two inputs

    Example:

    DTR> PRINT FN$JNOT(1)

     Bitwise
    Complement

             -2

    Reference:    MTH$JNOT
2 FN$JMAX
U FN$MAX                    MTH$AMAX1                 - Maximum
    Maximum of two longword integers        (ADDED FUNCTION)	!! ? !!

    Input:  two Longword Integers

    Output: maximum of the two input values.

    Reference:    MTH$JMAX
2 FN$JMIN
U FN$MIN                    MTH$AMIN1                 - Minimum
    Minimum of two longword integers        (ADDED FUNCTION)   !! ? !!

    Input:  two Longword Integers

    Output: minimum of the two input values.

    Reference:    MTH$JMIN
2 FN$OCTL
    Octal string                    (ADDED FUNCTION)

    Input:  a longword (unsigned) integer

    Output: the value of the integer in octal notation

    Functions similarly to FN$HEX

    Example:

    DTR> PRINT FN$OCTL(10)

       Octal

             12

    Reference:    OTS$CVT_L_TO
2 FN$POWER
    Raise a real number to a real power        (ADDED FUNCTION)

    Input:  the number to be raised
            the power

    Output: the result

    Example:

    DTR> PRINT FN$POWER(2.0,3.0)

       Power

     8.0000E+00

    Reference:    OTS$POWRR
2 FN$PRINT_ONLY
    Return a character string with only printing ASCII (ADDED FUNCTION)

    Input: a string

    Output: a string with only the 'printing' ASCII characters
            (blank space through ~ or 32 to 126 decimal)

    Example: used mostly in 'investigative' record definitions when
             browsing through files which may have mixed binary and
             character data.
2 FN$QUEUE_FROM_DEVICE
    Return the name of a queue to which a device is spooled  (ADDED FUNCTION)

    Input: a device name

    Output: the name of the queue, if the device is spooled.

    Examples:

        DTR> print fn$queue_from_device("txa7:")

                                     Queue

        SYS$PRINT

        DTR> print fn$queue_from_device("txa8:")

                                     Queue

        %SYSTEM-W-NOSUCHDEV, no such device available
        -SYSTEM-S-NORMAL, normal successful completion
2 FN$RALLY
    Access to Rally applications         (ADDED FUNCTION)

    Input: a Rally RUN command, with an application file specification.

    Output: none.

    Example:

        DTR> FN$RALLY("RALLY RUN SYS$EXAMPLES:RALLY$TAPES")

    Reference: VAX/Rally documentation.
2 FN$RANDOM
    A random number generator            (ADDED FUNCTION)

    Input:  an unsigned integer longword (seed)

    Output: an F-floating (real) random number

    Reference:    MTH$RANDOM
2 FN$RENAME_FILE
    Renames a file                     (ADDED FUNCTION)
    
    Input:  the source filename
            the new filename

    Output: none

    Reference:    LIB$RENAME_FILE
2 FN$SET_BIT
    Set a bit in a longword                (ADDED FUNCTION)

    Input:    a longword (integer) to be changed by a single bit
            a bit position

    Output:    a value

    Reference:    FOR$JIBSET
2 FN$SET_DEFAULT
    Set the Default Directory                (ADDED FUNCTION)

    Input:  the name of the new default directory

    Output: none

    Reference: SYS$SETDDIR
2 FN$SET_LOGICAL
    (Re)Defines a supervisor mode logical in a specified table (ADDED FUNCTION)

    Input:  the logical name
            the value to assign
            the name of the table

    Output: none

    Reference: LIB$SET_LOGICAL
2 FN$SET_SYMBOL
    Define or redefine a CLI symbol             (ADDED FUNCTION)

    Input:  the CLI symbol
            the CLI symbol value

    Output: none

    Reference: LIB$SET_SYMBOL
2 FN$SOUNDEX
    Return a Soundex value for a character string    (ADDED FUNCTION)

    Input:  a text string to evaluate

    Output: the Soundex value in a 4 character string

    Example: the first two values should match, the third does not.

    DTR> PRINT FN$SOUNDEX("SMITH")

    Soundex

     S530

    DTR> PRINT FN$SOUNDEX("SMYTHE")

     S530

    DTR> PRINT FN$SOUNDEX("SMIF")

     S570

2 FN$STR_ASCII_TO_EBCDIC
    Translate ASCII to EBCDIC             (ADDED FUNCTION)

    Input:  a character string in ASCII

    Output: the string translated to EBCDIC

    Reference:    LIB$TRA_ASC_EBC
2 FN$STR_CASE_BLIND_COMPARE
    Compare Strings Without Regard to Case        (ADDED FUNCTION)

    Input:  two strings to compare

    Output: -1 if first string is less than second
             0 if strings are equal (with blank fill)
            +1 if first string is greater than second

    Examples:

    DTR> PRINT FN$STR_CASE_BLIND_COMPARE("abcd","ABcD")

      String
    Comparison

              0

    DTR> PRINT FN$STR_CASE_BLIND_COMPARE("abcd","ABce")

             -1

    DTR> PRINT FN$STR_CASE_BLIND_COMPARE("abcd","ABcc")

              1

    Reference:    STR$CASE_BLIND_COMPARE
2 FN$STR_EBCDIC_TO_ASCII
    Translate EBCDIC to ASCII            (ADDED FUNCTION)

    Input:  a character string in EBCDIC

    Output: the string translated to ASCII

    Reference:    LIB$TRA_EBC_ASC
2 FN$STR_ELEMENT
    Extract Delimited Element Substring.         (ADDED FUNCTION)

    Input:  the element number (starting with zero for the 1st element)
            the delimiter string which separates elements
            the source string

    Output: the selected substring

    Examples:

    DTR> PRINT FN$STR_ELEMENT(0,"-","012-456-890")

               Element

    012

    DTR> PRINT FN$STR_ELEMENT(1,"-","012-456-890")

    456

    DTR> PRINT FN$STR_ELEMENT(2,"-","012-456-890")

    890

    DTR> PRINT FN$STR_ELEMENT(3,"-","012-456-890")

    %STR-W-NOELEM, no element found

    Reference:    STR$ELEMENT
2 FN$STR_FIND_FIRST_IN_SET
    Find First Character in Set of Characters    (ADDED FUNCTION)

    Input:  a source string
            a set of characters, any one of which may be matched

    Output: the position of the substring (a number)
            zero if there is no match

    Examples: the first doesn't match because of case sensitivity.
              The next two find matches, the last does not.

 DTR> PRINT FN$STR_FIND_FIRST_IN_SET("the quick brown fox","ABCDE")

     In
     Set

           0

 DTR> PRINT FN$STR_FIND_FIRST_IN_SET("the quick brown fox","abcde")

           3

 DTR> PRINT FN$STR_FIND_FIRST_IN_SET("the quick brown fox","efgh")

           2

 DTR> PRINT FN$STR_FIND_FIRST_IN_SET("the quick brown fox","z")

           0

    Reference:    STR$FIND_FIRST_IN_SET
2 FN$STR_FIND_FIRST_NOT_SET
    Find First Character That Does Not Occur in Set (ADDED FUNCTION)

    Input:  a source string
            a set of characters, none of which may be matched

    Output: the position of the substring (a number)

    Examples:

 DTR> PRINT FN$STR_FIND_FIRST_NOT_SET("the quick brown fox","z")

     Not
     In
     Set

           1

 DTR> PRINT FN$STR_FIND_FIRST_NOT_SET("the quick brown fox","the")

           4

 DTR> PRINT FN$STR_FIND_FIRST_NOT_SET("the quick brown fox","THE")

           1

    Reference:    STR$FIND_FIRST_NOT_IN_SET
2 FN$STR_FIRST_CHAR
    ASCII value of first string character        (ADDED FUNCTION)

    Input:  a string (only the first character is converted)

    Output: a longword (integer) value

    Example:

    DTR> PRINT FN$STR_FIRST_CHAR("the quick brown fox")

      First
    Character
      Value

       116

    Reference:    LIB$ICHAR
2 FN$STR_LENGTH
    Length of a string                (ADDED FUNCTION)

    Input:  a source string

    Output: a longword integer value

    Example:

    DTR> PRINT FN$STR_LENGTH("the quick brown fox")

      String
      Length

             19

    Reference:    LIB$LEN
2 FN$STR_POS_EXTRACT
    String extract by position              (ADDED FUNCTION)

    Input:  a character string
            the starting position in the string
            the ending position in the string

    Output: the extracted string

    Example:

    DTR> PRINT FN$STR_POS_EXTRACT("the quick brown fox",5,9)

                String

    quick

    Reference:    STR$POS_EXTR
2 FN$STR_REPLACE
    String replace                        (ADDED FUNCTION)

    Input:  the input string
            the starting position in the string
            the ending position in the string
            the replacement string

    Output: the string with replaced characters

    Example:

    DTR> PRINT FN$STR_REPLACE("the quick brown fox",5,9,"slow")

                String

    the slow brown fox

    Reference: STR$REPLACE,
               The Combined Newsletters September 1988 Page DTR-11
2 FN$STR_TRANSLATE
    String translate                (ADDED FUNCTION)

    Input:  the input string
            a translation table
            a match-string

    Output: a translated string

    Reference:    STR$TRANSLATE
2 FN$STR_TRIM
    Trim trailing blanks and spaces from strings (ADDED FUNCTION)

    Input:  a character string

    Output: a character string with no trailing spaces or tabs

    Example:

 DTR> PRINT FN$STR_TRIM("the quick brown           ")

            Trimmed
            String

 the quick brown

 DTR> PRINT FN$STR_LENGTH(fn$str_trim("the quick brown           "))

   String
   Length

          15

    Reference:    STR$TRIM
2 FN$SWAP_BYTES_LONG
    Swap around the four bytes in a longword   (ADDED FUNCTION)

    Input: a longword integer.

    Output: a longword integer with the bytes reversed in sequence.

    Examples:

        DTR> print fn$swap_bytes_long(1)

           16777216

        DTR> print fn$hex(fn$swap_bytes_long(1))

         FN$HEX

         1000000
2 FN$SWAP_BYTES_WORD
    Swap around the two bytes in a word   (ADDED FUNCTION)

    Input: a word integer.

    Output: a word integer with the bytes reversed in sequence.

    Examples: see FN$SWAP_BYTES_LONG
2 FN$TEST_BIT
    Test a bit in a longword            (ADDED FUNCTION)

    Input:  a longword integer to be tested
            a bit position

    Output: a value

    Reference:    FOR$BJTEST
2 FN$TRIM_FILESPEC
    Trims a file specification.            (ADDED FUNCTION)

    Input:  a source character string
            a desired maximum width

    Output: the trimmed file specification

    Examples:

 DTR> PRINT FN$TRIM_FILESPEC("device:[directory]file.ext;0", 16)

              File
              Spec

 file.ext;0

 DTR> PRINT FN$TRIM_FILESPEC("device:[directory]file.ext;0", 22)

 [directory]file.ext;0

 DTR> PRINT FN$TRIM_FILESPEC("device:[directory]file.ext;0", 32)

 device:[directory]file.ext;0

    Reference:    LIB$TRIM_FILESPEC
2 FN$WAIT
    Places current process in hibernation for specified time (ADDED)

    Input:  the number of seconds to wait (as a real number)

    Output: none

    Reference:    LIB$WAIT
2 Experimental_functions
    The following functions are of limited value and are for
    experimental purposes only.

 FN$ADD_TIMES  LIB$ADD_TIMES
               - add quadwords date/times
 FN$SUB_TIMES  LIB$SUB_TIMES
               - subtract quadwords date/times
 FN$FROM_DELTA LIB$CVT_FROM_INTERNAL_TIM
               - convert quadwords to various time intervals
 FN$TO_DELTA   LIB$CVT_TO_INTERNAL_TIME
               - convert various time intervals to quadwords
 FN$RDO        RDB$INTERPRET
               - Limited access to RDO, the RDB interactive utility
 FN$TPU        TPU$EDIT
               - Edit or process an ASCII file
