Metadata-Version: 2.4
Name: oliviadb-dli
Version: 0.1.0
Summary: DL/I calls from Python on OliviaDB: schedule programs on DBD/PSB definitions and make GU, GN, ISRT, REPL, DLET and the other calls
License-Expression: Apache-2.0 AND (AGPL-3.0-only OR LicenseRef-OliviaDB-Commercial)
Project-URL: Homepage, https://olivia-db.com/
Project-URL: Documentation, https://docs.olivia-db.com/dli-quickstart/
Project-URL: Source, https://github.com/OliviaDB/oliviadb-python
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE-native.md
Dynamic: license-file

<!-- SPDX-License-Identifier: Apache-2.0 -->
# oliviadb-dli

DL/I calls from Python on OliviaDB: open a store, import DBDGEN and PSBGEN source, schedule a
program on a PSB and make its calls (GU, GN, GNP, the hold forms, ISRT, REPL, DLET and the system
service calls) with I/O areas and segment search arguments, as an IMS program does through its PCBs.

```python
from oliviadb_dli import Library, Runtime, Ssa

with Library.load().open("store") as system:
    system.load_library("dli")  # PARTDB.dbd, PARTPSB.psb
    prog = system.schedule("PARTPSB", Runtime.ASCII_BE)
    io = bytearray(prog.io_size(1))
    status = prog.call(1, "GU", io, [Ssa("PART").qual("PARTNO", "=", b"P00001").build()])
    print(status, bytes(io), prog.pcb(1).key_feedback)
    prog.terminate()  # commit; abort() backs out
```

## Licence

The Python code is Apache-2.0. The wheels for Linux (x86_64, aarch64) and macOS (arm64, x86_64)
also contain OliviaDB's DL/I library `liboliviadb_dli`, which is licensed under AGPL-3.0-only or
OliviaDB's commercial licence. A wheel as a whole is therefore
`Apache-2.0 AND (AGPL-3.0-only OR LicenseRef-OliviaDB-Commercial)`: using it is using the
AGPL-licensed library, unless you have OliviaDB's commercial licence. The source distribution
contains no library.

## The library

Loaded from the file `OLIVIADB_DLI_LIB` names, else the wheel's copy, else the system's library
search path. It needs C ABI version 13 or later (OliviaDB 0.1.0).

## Character sets

`Program.call` and `Ssa` write names, function codes and operators in ASCII, for programs
scheduled with `Runtime.ASCII_BE` or `Runtime.ASCII_LE`. A program scheduled with
`Runtime.EBCDIC` makes its calls with `Program.call_bytes` and SSAs in EBCDIC bytes of its own.
