SysWorks©

SysWorks
Callable Routines Reference Manual


Previous Contents Index


SWRK_INSERT_QUEUE_TAIL

The SWRK_INSERT_QUEUE_TAIL routine ...


Format

status =SWRK_INSERT_QUEUE_TAIL(arg1, [arg2])


RETURNS

VMS usage: cond_value
type: integer (unsigned)
access: write only
mechanism: by value in R0

Arguments

arg1


VMS usage: arg1_type
type: integer (unsigned)
access: read only
mechanism: by reference

Specifies arg1...

arg2


VMS usage: arg2_type
type: character string
access: read only
mechanism: by descriptor

Specifies arg2...


Description

The SWRK_INSERT_QUEUE_TAIL routine ...

See also


SWRK_LOCK_RESOURCE

The SWRK_LOCK_RESOURCE routine ...


Format

status =SWRK_LOCK_RESOURCE(arg1, [arg2])


RETURNS

VMS usage: cond_value
type: integer (unsigned)
access: write only
mechanism: by value in R0

Arguments

arg1


VMS usage: arg1_type
type: integer (unsigned)
access: read only
mechanism: by reference

Specifies arg1...

arg2


VMS usage: arg2_type
type: character string
access: read only
mechanism: by descriptor

Specifies arg2...


Description

The SWRK_LOCK_RESOURCE routine ...

See also


SWRK_LOG_FAOZ

The SWRK_LOG_FAOZ routine ...


Format

status =SWRK_LOG_FAOZ(arg1, [arg2])


RETURNS

VMS usage: cond_value
type: integer (unsigned)
access: write only
mechanism: by value in R0

Arguments

arg1


VMS usage: arg1_type
type: integer (unsigned)
access: read only
mechanism: by reference

Specifies arg1...

arg2


VMS usage: arg2_type
type: character string
access: read only
mechanism: by descriptor

Specifies arg2...


Description

The SWRK_LOG_FAOZ routine ...

See also


SWRK_LOG_FAO

The SWRK_LOG_FAO routine ...


Format

status =SWRK_LOG_FAO(arg1, [arg2])


RETURNS

VMS usage: cond_value
type: integer (unsigned)
access: write only
mechanism: by value in R0

Arguments

arg1


VMS usage: arg1_type
type: integer (unsigned)
access: read only
mechanism: by reference

Specifies arg1...

arg2


VMS usage: arg2_type
type: character string
access: read only
mechanism: by descriptor

Specifies arg2...


Description

The SWRK_LOG_FAO routine ...

See also


SWRK_LOG_IMAGE_FINISH

The SWRK_LOG_IMAGE_FINISH routine ...


Format

status =SWRK_LOG_IMAGE_FINISH(arg1, [arg2])


RETURNS

VMS usage: cond_value
type: integer (unsigned)
access: write only
mechanism: by value in R0

Arguments

arg1


VMS usage: arg1_type
type: integer (unsigned)
access: read only
mechanism: by reference

Specifies arg1...

arg2


VMS usage: arg2_type
type: character string
access: read only
mechanism: by descriptor

Specifies arg2...


Description

The SWRK_LOG_IMAGE_FINISH routine ...

See also


SWRK_LOG_IMAGE_START

The SWRK_LOG_IMAGE_START routine ...


Format

status =SWRK_LOG_IMAGE_START(arg1, [arg2])


RETURNS

VMS usage: cond_value
type: integer (unsigned)
access: write only
mechanism: by value in R0

Arguments

arg1


VMS usage: arg1_type
type: integer (unsigned)
access: read only
mechanism: by reference

Specifies arg1...

arg2


VMS usage: arg2_type
type: character string
access: read only
mechanism: by descriptor

Specifies arg2...


Description

The SWRK_LOG_IMAGE_START routine ...

See also


SWRK_LOG_MSG_2_VEC

This routine logs a message which is passed as a message vector.


Format

status =SWRK_LOG_MSG_VEC_2 (flags, source_file, source_reference, message_vector, facility_code, return_message_buffer)


RETURNS

VMS usage: cond_value
type: integer (unsigned)
access: write only
mechanism: by value in R0

See SWRK_LOG_MSG_VEC for more details about the first four arguments.


Arguments

flags


VMS usage: flags
type: longword (unsigned)
access: read only
mechanism: by value

Specifies which logging actions the routine should take.

source_file


VMS usage: char_string
type: character string
access: read only
mechanism: by descriptor

Specifies the source from which the message is being logged.

source_reference


VMS usage: number
type: longword (unsigned)
access: read only
mechanism: by value

Specifies a reference number within the source.

message_vector


VMS usage: cntrlblk
type: longword (unsigned)
access: read only
mechanism: by reference

Specifies the message vector which contains the messages to be logged.

facility_code


VMS usage: char_string
type: character string
access: read only
mechanism: by descriptor

Specifies the facility code to be used for the first message in the message vector. If this argument is omitted, the facility code indicated in the message vector status will be used by default.

return_message_buffer


VMS usage: char_string_ptr
type: character string pointer
access: write only
mechanism: by reference

Specifies the return address of a pointer to the expanded message buffer. The SysWorks logging procedures use internal buffers to store the expanded message before it is written to any log file or destination. The contents of these buffers are left intact until the next call to a message logging routine. Therefore, the address returned can be used by the caller to implement extra facilities not directly provided by the SysWorks message logging procedures.


Description

This procedure logs the message specified by the message vector to appropriate log files. It expands the SWRK_LOG_MSG_VEC routine by providing access to some internal features.

SWRK_LOG_MSG_VEC

This routine logs a message which is passed as a message vector.


Format

status =SWRK_LOG_MSG_VEC (flags, source_file, source_reference, message_vector)


RETURNS

VMS usage: cond_value
type: integer (unsigned)
access: write only
mechanism: by value in R0

Arguments

flags


VMS usage: flags
type: integer (unsigned)
access: read only
mechanism: by value

Specifies which logging actions the routine should take. The following values are permitted:
Flag Usage
LOG_M_CONTEXT Log the message in a context shared log file. The file name SWRK_CONTEXT_LOG_FILE is used to create the context log file. Defining this name as a logical name allows the log file to be created with another file specification.
LOG_M_CRASH Force the image to crash. Overrides LOG_M_EXIT if that is also specified.
LOG_M_DEFAULT Use the current default flags value.
LOG_M_ERROR Log the message to SYS$ERROR.
LOG_M_EXIT Force the image to exit. Ignored in LOG_M_CRASH is also specified.
LOG_M_FLUSH Force any cached log file (such as an image log file) to be flushed.
LOG_M_IMAGE Log the message to the image log file.
LOG_M_INDIRECT Log a one line message in the context log file which directs the reader to the (image) log file which contains the full message. Overrides LOG_M_CONTEXT if that is also specified.
LOG_M_MAIL Send the message as mail. The address to which the mail is sent is defined by the logical name SWRK_MAIL_ADDRESS . The equivalence of this logical may start with an @, in which case the address is a distribution list.
LOG_M_MORE Replace any leading percent character with a hyphen, effectively creating a continuation message.
LOG_M_NOHEADING Don't include a heading line.
LOG_M_NOW Don't return or exit until the message is logged. This flag is assumed if LOG_M_CRASH or LOG_M_EXIT are specified.
LOG_M_OPERATOR Log the message to the operator log file.
LOG_M_OUTPUT Log the message to SYS$OUTPUT.
LOG_M_SIMPLE Equivalent to LOG_M_ERROR + LOG_M_OUTPUT + LOG_M_NOHEADING.
LOG_M_TRACE Log the message to the image trace file.

source_file


VMS usage: char_string
type: character string
access: read only
mechanism: by descriptor

Specifies the source from which the message is being logged. In C, this would normally be a descriptor provided by the SWRK_BASE.H header file and based on the __FILE__ builtin. In Cobol, it would be a string literal containing the procedure name passed by descriptor.

This argument is used to construct an initial line inserted before the remainder of the message indicating where the message was logged from. If this argument is ommitted, no initial line will precede the remaining message.

source_reference


VMS usage: number
type: longword (unsigned)
access: read only
mechanism: by value

Specifies a reference number within the source. In C, this would normally be the line number provided by the __LINE__ builtin. If this argument is omitted a value of zero is assumed by default.

message_vector


VMS usage: cntrlblk
type: longword (unsigned)
access: read only
mechanism: by reference

Specifies the message vector which contains the messages to be logged.


Description

This procedure logs the message specified by the message vector to appropriate log files. Other logging procedures (such as SWRK_LOG_STATUS) convert their arguments into a message vector and call this procedure.

SWRK_LOG_OUTPUT_2

The SWRK_LOG_OUTPUT_2 routine ...


Format

status =SWRK_LOG_OUTPUT_2(arg1, [arg2])


RETURNS

VMS usage: cond_value
type: integer (unsigned)
access: write only
mechanism: by value in R0

Arguments

arg1


VMS usage: arg1_type
type: integer (unsigned)
access: read only
mechanism: by reference

Specifies arg1...

arg2


VMS usage: arg2_type
type: character string
access: read only
mechanism: by descriptor

Specifies arg2...


Description

The SWRK_LOG_OUTPUT_2 routine ...

See also


SWRK_LOG_OUTPUT

The SWRK_LOG_OUTPUT routine ...


Format

status =SWRK_LOG_OUTPUT(arg1, [arg2])


RETURNS

VMS usage: cond_value
type: integer (unsigned)
access: write only
mechanism: by value in R0

Arguments

arg1


VMS usage: arg1_type
type: integer (unsigned)
access: read only
mechanism: by reference

Specifies arg1...

arg2


VMS usage: arg2_type
type: character string
access: read only
mechanism: by descriptor

Specifies arg2...


Description

The SWRK_LOG_OUTPUT routine ...

See also


SWRK_LOG_PRINTF

This routine logs a message which is passed as a C style format string with optional arguments.


Format

status =SWRK_LOG_PRINTF (flags, source_file, source_reference, format [, output_source...])


RETURNS

VMS usage: cond_value
type: integer (unsigned)
access: write only
mechanism: by value in R0

See SWRK_LOG_MSG_VEC for more details about the first three arguments.


Arguments

flags


VMS usage: flags
type: longword (unsigned)
access: read only
mechanism: by value

Specifies which logging actions the routine should take.

source_file


VMS usage: char_string
type: character string
access: read only
mechanism: by descriptor

Specifies the source from which the message is being logged.

source_reference


VMS usage: number
type: longword (unsigned)
access: read only
mechanism: by value

Specifies a reference number within the source.

format


VMS usage: char_string
type: null terminated character string
access: read only
mechanism: by reference

Specifies characters to be written literally to the output or converted as specified in the outout_source arguments.

output_source


VMS usage: varying_arg
type: longword (signed)
access: read only
mechanism: by value

Specifies optional expressions whose resultant types correspond to conversion specifications given in the format specification.

If no conversion specifications are given, you may omit the output sources. Otherwise, the function call must have exactly as many output sources as there are conversion spec- ifications, and the conversion specifications must match the types of the output sources.

Conversion specifications are matched to output sources in left-to-right order. Excess output pointers, if any, are ignored.


Description

This routine logs the formatted message specified by the format and output source arguments to appropriate log files. It is similar to a call to sprintf followed by a call to SWRK_LOG_TEXT.

See also

SWRK_LOG_MSG_VEC
SWRK_LOG_TEXT


Previous Next Contents Index