OBJUSER

Synopsis

HELP:   User-defined object store SPI backend (store.objuser())
TYPE:   OBJECT
SYNTAX: OBJUSER(NAMESPACE='str',LIBRARY='str',FUNCTION='str',PARAMETER='str',TRACE,LOGGING,DEBUG)

Description

Use user-defined FOBJ object store SPI backend for archive read.

The FOBJ SPI (Object Store Exit) lets a user-supplied shared library handle object-level storage I/O. The library exports a single entry point conforming to the TfFobjExit signature and processes the 7 FOBJ function codes defined in FOBJ.h.

The NAME parameter identifies the archive namespace passed to the provider as pcNamStr during open. LIBRARY and FUNCTION select the shared library and its entry point (defaults: libfsse / FOBJUSR). An optional PARAMETER string is forwarded as pcParStr for provider-specific configuration. The TRACE switch enables diagnostic output from the provider.

LOGGING enables info-level log messages from the OBJSSE bridge and the FOBJ provider (sets FOBJ_FLAG_LOG in the OPN call). DEBUG adds per-operation detail to the log output (sets FOBJ_FLAG_DEBUG; requires LOGGING to be set).

FOBJ SPI -- Object Store Provider Interface

A FOBJ provider is a shared library that exports one C function conforming to the TfFobjExit signature defined in FOBJ.h. The provider receives all storage requests from FL5 through this single entry point and must implement the 7 FOBJ function codes listed below.

FL5 ships a reference provider (libfsse / entry point FOBJUSR) that maps the FOBJ SPI to the built-in OBJFLDR folder-based object store backend. Custom providers can target any storage backend (cloud blob storage, relational database, key-value store, etc.) by implementing the same interface.

The FOBJ SPI is the object-level counterpart to the FSEG SPI. While FSEG operates on integer-keyed binary segments, FOBJ operates on string-keyed binary objects. FL5 uses FOBJ internally to store the segment-store index objects (directory, member descriptors) on top of arbitrary object backends.

Entry Point

The provider library must export a function with this C signature:

void FOBJUSR(
    void*               pvGbl,
    void**              ppHdl,
    int*                piRetco,
    unsigned int        uiVersion,
    const unsigned int* piFunc,
    TuFobjPar*          puPara,
    unsigned int        uiMsgSiz,
    char*               pcMsg);

The name FOBJUSR is the default; it can be overridden with the FUNCTION CLEP parameter. The arguments are:

The provider must set *piRetco = 0 on success. For GET when the object does not exist the provider must set *piRetco = FOBJ_RTC_NFD (1) -- this code has a specific meaning in the OBJSSE bridge and must not be used for other error conditions. All other errors are represented by any non-zero value other than FOBJ_RTC_NFD.

Interface Version

The current interface version is FOBJ_VERSION = 0x0100. A provider must check uiVersion at OPN time and reject versions it does not support.

FOBJ Function Codes

The *piFunc argument selects the operation.

Open Parameters (TsFobjOpn)

Fields set by the caller before OPN:

Fields written by the provider at OPN:

Close Parameters (TsFobjCls)

Get Parameters (TsFobjGet)

Put Parameters (TsFobjPut)

Check Parameters (TsFobjChk)

FOBJ Flags (TsFobjOpn.uiFlg)

Provider Parameter String

The built-in reference provider (libfsse) parses the PARAMETER string as a semicolon-separated list of key=value pairs:

Custom providers may define their own parameter string format. The string is passed verbatim as pcParStr and is not interpreted by FL5.

Object Key Format

The OBJSSE bridge prefixes every object key with the version ID to allow multiple archive versions to coexist in the same namespace. Key format: <version-id>/<object-name>. A provider that stores objects in a flat namespace does not need to parse or interpret the key format.

Logging

When FOBJ_FLAG_LOG is set in uiFlg, the provider may call FLM_LOG(FLMLOG_TYP_INFO, ...) with message tags starting with FSSE-OBJ- (reference provider) or any provider-specific prefix. Messages are routed through the FL5 log framework.

When FOBJ_FLAG_DEBUG is additionally set, the provider may emit FLMLOG_TYP_DEBUG messages for per-operation detail.

The OBJSSE bridge itself logs with the OBJSSE- prefix regardless of provider flags.

z/OS SAF Resource Groups

On z/OS with GLOBAL.OBU.CONTROL defined in the $FLAM RACF class, FL5 performs authorization checks before loading the provider. Four resource groups are used (all checked at READ attribute level):

FOBJ_FLAG_STRONG is set when uiSafLevel < 8, meaning RACF is in strict mode (GLOBAL.MUSTDEF=UPDATE or lower). With STRONG set, both the namespace and the parameter string were explicitly approved. Without STRONG (permissive mode), SAF accepted RC=4 (not defined).

See Also

Arguments