Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Service module to create OS log files.

Syntax

Code Block
Response = Logging_Services(@Service, @Params)

Returns

The meaning of the response value depends on the service.

Parameters

ParameterDescription
@ServiceThe name of the service being requested. Required.
@ParamsGeneric parameters. Refer to a specific service to determine the actual parameters used.

Remarks

This module provides several useful services for creating and appending log files.

Services

ServiceDescription
NewLog

Usage:
Logging_Services('NewLog',LogPath, LogFileName, RowDelimiter, ColumnDelimiter, ColumnHeaders, ColumnWidths, QuoteValues, ClearLog)

Comments:
Performs a health check against all attached tables and returns back any issues.

Returns:
Returns two lists which are delimited by an @RM. The first list is an @FM list of attached tables. The second list is an @FM list of results (groups that have GFEs or an empty string if there are none). Items in each list correspond which each other based on their list position.

AppendLog

Usage:
Logging_Services('AppendLog', Tablenames, SaveList)

Comments:
Performs a health check against the indicated tables and returns back any issues. Note: This uses the Verify_LH subroutine to check for GFEs. All results are stored in the SYSLHVERIFY table with a KeyID of VolumeLabel*DatabaseID*TableName. Returns the list of groups that have GFEs or returns an empty string if there are none. The list of GFEs or empty strings will themselves be @FM delimited to correspond with the tables passed into this service.

Returns:
An @FM delimited array of table names and associated GFE information.

GetLogPath

Usage:
Logging_Services('GetLogPath', TableName)

Comments:
Returns an array of information related to the database table being passed in.

Returns:
An @FM delimited array of table information:

AttributeDescription
<1>Database ID
<2>MFS/BFS list
<3>Volume Label (if available)
<4>Volume Path (if available)
<5>BFS (if available)


GetLogFileName

Usage:
Logging_Services('GetLogFileName', TableName)

Comments:
Returns an array of information related to the database table being passed in.

Returns:
The handle array created by the Open statement.

GetLogFullPath

Usage:
Logging_Services('GetLogFullPath', TableName)

Comments:
Clears the table handle array array from cache. This will force the GetTableHandle service to call the Open statement again.

Returns:
N/A

GetRowDelimiter

Usage:
Logging_Services('GetRowDelimiter', KeyID, NotExpired, ExpirationDuration, IgnoreMFSRoutines)

Comments:
Reads a data row for the indicated Key ID and database table.

Returns:
The requested data row.

GetColumnDelimiter

Usage:
Logging_Services('GetColumnDelimiter', TableName, KeyID, DataRow, IgnoreSelfLock, IgnoreMFSRoutines, IgnoreAllLocks)

Comments:
Writes a data row for the indicated Key ID and database table.

Returns:
N/A

GetColumnHeaders

Usage:
Logging_Services('GetColumnHeaders', TableName, KeyID, IgnoreSelfLock, IgnoreMFSRoutines)

Comments:
Deletes a data row for the indicated Key ID and database table.

Returns:
N/A

GetColumnWidths

Usage:
Logging_Services('GetColumnWidths', TableName, KeyID, IgnoreSelfLock)

Comments:
Attempts to perform a semaphore lock on the indicated tablename and Key ID.

Returns:
A Boolean flag indicating if the lock request was successfully performed.

GetQuoteValues

Usage:
Logging_Services('GetQuoteValues', TableName, KeyID)

Comments:
Attempts to release a semaphore lock on the indicated tablename and Key ID.

Returns:
A Boolean flag indicating if the lock release was successfully performed.

CreateLogFile

Usage:
Logging_Services('CreateLogFile', TableName, AliasName, Volume, DatabaseID)

Comments:
Attempts to create an alias for the indicated table, volume, and database. It returns a True$ if successful or a False$ if unsuccessful.

Returns:
A Boolean flag indicating if the alias request was successfully performed.

Params

The proper use of the generic arguments are defined in the definition of each service above.