VMS Help  —  PSM Routines, USER-FORMAT-ROUTINE  Arguments
 request_id

    OpenVMS usage:address
    type:         longword (unsigned)
    access:       read only
    mechanism:    by reference
    Request identifier supplied by the symbiont when it calls your
    format routine. The request_id argument is the address of a
    longword containing this request identifier value.

 work_area

    OpenVMS usage:address
    type:         longword (unsigned)
    access:       write only
    mechanism:    by reference
    Work area supplied by the symbiont for the use of your format
    routine. The symbiont supplies the address of this area when
    it calls your routine. The work_area argument is a longword
    containing the address of the work area. The work area is a
    section of memory that your format routine can use for buffering
    and other internal operations.

    The size of the work area allocated is specified by the work_size
    argument in the PSM$PRINT routine. If you do not specify work_
    size in the call to PSM$PRINT, no work area is allocated.

    In a multithreaded symbiont, a separate work area is allocated
    for each thread. This work area is shared by all user routines.
    The work area is initialized to zero when the symbiont is first
    started.

 func

    OpenVMS usage:function_code
    type:         longword (unsigned)
    access:       read only
    mechanism:    by reference
    Function code specifying the service that the symbiont expects
    your format routine to perform. The func argument is the address
    of a longword into which the symbiont writes this function code.

    The function code specifies the reason the symbiont is calling
    your format routine or, in other words, the service that the
    symbiont expects your routine to perform at this time.

    The PSM$K_FORMAT function code is the only one to which your
    format routine must respond. When the symbiont calls your format
    routine with this function code, your routine must move a record
    from the input buffer to the output buffer.

    The symbiont can call your format routine with other function
    codes. Your routine should return the status PSM$_FUNNOTSUP
    (function not supported) when it is called with any of the
    following function codes or with any undocumented function code.
    When the status PSM$_FUNNOTSUP is returned, the symbiont performs
    its normal action as if no format routine were supplied. To
    suppress the symbiont's normal action, you should return SS$_
    NORMAL.

    PSM$K_START_STREAM     PSM$K_STOP_STREAM
    PSM$K_START_TASK       PSM$K_PAUSE_TASK
    PSM$K_RESUME_TASK      PSM$K_STOP_TASK
    PSM$K_RESET_STREAM

    These function codes correspond to message items sent by the job
    controller to the symbiont.

    Other function codes correspond to internal symbiont mechanisms
    that are not part of the public interface to the print symbiont.

    Your format routine should return the status PSM$_FUNNOTSUP or
    SS$_NORMAL when it is called with a message function code or with
    a private function code.

 func_desc_1

    OpenVMS usage:char_string
    type:         character string
    access:       read only
    mechanism:    by descriptor
    Descriptor supplying an input record to be processed by the
    format routine. The func_desc_1 argument is the address of a
    string descriptor. By using this argument, the symbiont supplies
    the input record that your format routine is to process. Because
    this descriptor can be of any valid string type, your format
    routine should use the Run-Time Library string routines to
    analyze this descriptor and to manipulate the input record.

 func_arg_1

    OpenVMS usage:vector_byte_unsigned
    type:         byte (unsigned)
    access:       read only
    mechanism:    by reference
    Carriage control for the input record supplied by func_desc_
    1. The func_arg_1 argument is the address of a 4-byte vector
    that specifies the carriage control for the input record. The
    following diagram depicts the format of this 4-byte vector:

    31           23          15             7           0
    -----------------------------------------------------
    |  Character  |   Count   |  Character  |   Count   |
    -----------------------------------------------------
         Trailing Carriage          Leading Carriage
        Control Information        Control Information

    Bytes 0 and 1 describe the leading carriage control to apply
    to the input data record; bytes 2 and 3 describe the trailing
    carriage control.

    Byte 0 is a number specifying the number of times the carriage
    control specifier in byte 1 is to be repeated preceding the
    input data record. Byte 2 is a number specifying the number of
    times the carriage control specifier in byte 3 is to be repeated
    following the input data record.

    For values of the carriage control specifier from 1 to 255, the
    specifier is the ASCII character to be used as carriage control.
    Value 0 represents the ASCII "newline" sequence. Newline consists
    of a carriage return followed by a linefeed.

    The func_arg_1 argument is not used if your format routine is an
    output filter routine (routine code PSM$K_OUTPUT_FILTER). See the
    Description help topic for more information.

 func_desc_2

    OpenVMS usage:char_string
    type:         character string
    access:       write only
    mechanism:    by reference
    Descriptor of a buffer to which your format routine writes the
    formatted output record. The func_desc_2 argument is the address
    of a string descriptor.

    Your format routine must return the formatted data record by
    using the func_desc_2 argument.

    Your format routine should use the Run-Time Library string
    routines to write into the buffer specified by this descriptor.

 func_arg_2

    OpenVMS usage:vector_byte_unsigned
    type:         byte (unsigned)
    access:       write only
    mechanism:    by reference
    Carriage control for the output record returned in func_desc_2.
    The func_arg_2 argument is the address of a 4-byte vector that
    specifies the carriage control for the output record. See the
    description of func_arg_1 for the contents and format of this
    4-byte vector.

    If you do not process the carriage-control information supplied
    in func_arg_1, then you should copy that value into func_arg_2.
    Otherwise, the carriage-control information will be lost.

    The func_arg_2 argument is not used if your format routine is an
    output filter routine (routine code PSM$K_OUTPUT_FILTER). See the
    Description for more information.
Close Help