# bezouwenr/qshoni architecture

> Architecture diagram of the GitHub repository bezouwenr/qshoni, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bezouwenr/qshoni
- Repository: https://github.com/bezouwenr/qshoni

## Overview

QshOni is an IBM i library of CL wrappers that lets CL, RPG, and COBOL job streams invoke QShell/PASE programs and consume their output. The main workflow is a caller invoking a wrapper, the wrapper running a command or script, and stdout or an exit status returning for the caller to use. Other documented branches cover SQL, file transfer, save/restore, IFS browsing, and logging. Source excerpts are limited to sample scripts; links for other command families rely on README statements, not inspected implementations.

Main entry points: [`QSHCALL.CMD`](https://github.com/bezouwenr/qshoni/blob/master/QSHCALL.CMD) (QSHCALL), [`QSHPYCALL.CMD`](https://github.com/bezouwenr/qshoni/blob/master/QSHPYCALL.CMD) (Python calls), [`RUNSQLPRM.CMD`](https://github.com/bezouwenr/qshoni/blob/master/RUNSQLPRM.CMD) (Parameterized SQL), [`RUNSQLSRC.CMD`](https://github.com/bezouwenr/qshoni/blob/master/RUNSQLSRC.CMD) (SQL source commands)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_execution["Command execution"]
  node_qsh_exec["QSH execution<br/>[QSHEXEC.CMD]"]
  node_qsh_call["QSHCALL<br/>[QSHCALL.CMD]"]
  node_python_call["Python calls<br/>[QSHPYCALL.CMD]"]
  node_php_run["PHP runner<br/>[QSHPHPRUN.CMD]"]
  node_python_run["Python runner<br/>[QSHPYRUN.CMD]"]
  node_stdout_result["Stdout results<br/>[QSHGETPR2.CMD]"]
end

subgraph group_data["SQL and data"]
  node_sql_actions["Parameterized SQL<br/>[RUNSQLPRM.CMD]"]
  node_sql_source["SQL source commands<br/>[RUNSQLSRC.CMD]"]
  node_query_commands["Query commands<br/>[QSHQRYTMP.CMD]"]
  node_db2[("IBM i Db2")]
end

subgraph group_operations["System operations"]
  node_transfer["File transfer<br/>[QSHSSH.CMD]"]
  node_save_restore["Save and restore<br/>[QSHSAVIFS.CMD]"]
  node_ifs_browse["IFS browsing<br/>[WRKIFSLIST.CMD]"]
  node_job_logging["Job logging<br/>[QSHWRTLOG.CMD]"]
end

subgraph group_samples["Runtime samples"]
  node_sample_python["Python call sample<br/>[pycallparm1.py]"]
  node_sample_php["PHP call sample<br/>[phpcallparm1.php]"]
end

node_ibmi_caller(("IBM i caller"))

node_ibmi_caller -->|"invokes"| node_qsh_exec
node_ibmi_caller -->|"invokes"| node_qsh_call
node_ibmi_caller -->|"invokes"| node_python_call
node_ibmi_caller -->|"invokes"| node_php_run
node_ibmi_caller -->|"invokes"| node_python_run
node_qsh_call -->|"runs script"| node_sample_php
node_python_call -->|"runs script"| node_sample_python
node_sample_python -->|"writes parameters"| node_stdout_result
node_sample_php -->|"writes parameters"| node_stdout_result
node_ibmi_caller -->|"invokes"| node_sql_actions
node_ibmi_caller -->|"invokes"| node_sql_source
node_ibmi_caller -->|"invokes"| node_query_commands
node_sql_actions -->|"executes SQL"| node_db2
node_sql_source -->|"executes SQL"| node_db2
node_query_commands -->|"queries"| node_db2
node_ibmi_caller -->|"invokes"| node_transfer
node_ibmi_caller -->|"invokes"| node_save_restore
node_ibmi_caller -->|"invokes"| node_ifs_browse
node_ibmi_caller -->|"invokes"| node_job_logging

click node_qsh_exec "https://github.com/bezouwenr/qshoni/blob/master/QSHEXEC.CMD"
click node_qsh_call "https://github.com/bezouwenr/qshoni/blob/master/QSHCALL.CMD"
click node_python_call "https://github.com/bezouwenr/qshoni/blob/master/QSHPYCALL.CMD"
click node_php_run "https://github.com/bezouwenr/qshoni/blob/master/QSHPHPRUN.CMD"
click node_python_run "https://github.com/bezouwenr/qshoni/blob/master/QSHPYRUN.CMD"
click node_stdout_result "https://github.com/bezouwenr/qshoni/blob/master/QSHGETPR2.CMD"
click node_sample_python "https://github.com/bezouwenr/qshoni/blob/master/qshpython/pycallparm1.py"
click node_sample_php "https://github.com/bezouwenr/qshoni/blob/master/qshphp/phpcallparm1.php"
click node_sql_actions "https://github.com/bezouwenr/qshoni/blob/master/RUNSQLPRM.CMD"
click node_sql_source "https://github.com/bezouwenr/qshoni/blob/master/RUNSQLSRC.CMD"
click node_query_commands "https://github.com/bezouwenr/qshoni/blob/master/QSHQRYTMP.CMD"
click node_transfer "https://github.com/bezouwenr/qshoni/blob/master/QSHSSH.CMD"
click node_save_restore "https://github.com/bezouwenr/qshoni/blob/master/QSHSAVIFS.CMD"
click node_ifs_browse "https://github.com/bezouwenr/qshoni/blob/master/WRKIFSLIST.CMD"
click node_job_logging "https://github.com/bezouwenr/qshoni/blob/master/QSHWRTLOG.CMD"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_qsh_exec,node_qsh_call,node_python_call,node_php_run,node_python_run,node_stdout_result toneBlue
class node_sql_actions,node_sql_source,node_query_commands,node_db2 toneAmber
class node_transfer,node_save_restore,node_ifs_browse,node_job_logging toneMint
class node_sample_python,node_sample_php toneRose
class node_ibmi_caller toneIndigo
```

## Components

### Command execution

- [QSH execution](https://github.com/bezouwenr/qshoni/blob/master/QSHEXEC.CMD): `QSHEXEC.CMD`
- [QSHCALL](https://github.com/bezouwenr/qshoni/blob/master/QSHCALL.CMD): `QSHCALL.CMD`
- [Python calls](https://github.com/bezouwenr/qshoni/blob/master/QSHPYCALL.CMD): `QSHPYCALL.CMD`
- [PHP runner](https://github.com/bezouwenr/qshoni/blob/master/QSHPHPRUN.CMD): `QSHPHPRUN.CMD`
- [Python runner](https://github.com/bezouwenr/qshoni/blob/master/QSHPYRUN.CMD): `QSHPYRUN.CMD`
- [Stdout results](https://github.com/bezouwenr/qshoni/blob/master/QSHGETPR2.CMD): `QSHGETPR2.CMD`

### SQL and data

- [Parameterized SQL](https://github.com/bezouwenr/qshoni/blob/master/RUNSQLPRM.CMD): `RUNSQLPRM.CMD`
- [SQL source commands](https://github.com/bezouwenr/qshoni/blob/master/RUNSQLSRC.CMD): `RUNSQLSRC.CMD`
- [Query commands](https://github.com/bezouwenr/qshoni/blob/master/QSHQRYTMP.CMD): `QSHQRYTMP.CMD`
- **IBM i Db2**

### System operations

- [File transfer](https://github.com/bezouwenr/qshoni/blob/master/QSHSSH.CMD): `QSHSSH.CMD`
- [Save and restore](https://github.com/bezouwenr/qshoni/blob/master/QSHSAVIFS.CMD): `QSHSAVIFS.CMD`
- [IFS browsing](https://github.com/bezouwenr/qshoni/blob/master/WRKIFSLIST.CMD): `WRKIFSLIST.CMD`
- [Job logging](https://github.com/bezouwenr/qshoni/blob/master/QSHWRTLOG.CMD): `QSHWRTLOG.CMD`

### Runtime samples

- [Python call sample](https://github.com/bezouwenr/qshoni/blob/master/qshpython/pycallparm1.py): `qshpython/pycallparm1.py`
- [PHP call sample](https://github.com/bezouwenr/qshoni/blob/master/qshphp/phpcallparm1.php): `qshphp/phpcallparm1.php`

### Other components

- **IBM i caller**

## Connections

- IBM i caller → QSH execution: invokes (evidence: `README.md`)
- IBM i caller → QSHCALL: invokes (evidence: `README.md`)
- IBM i caller → Python calls: invokes (evidence: `README.md`)
- IBM i caller → PHP runner: invokes (evidence: `README.md`)
- IBM i caller → Python runner: invokes (evidence: `README.md`)
- QSHCALL → PHP call sample: runs script (evidence: `qshphp/phpcallparm1.php`)
- Python calls → Python call sample: runs script (evidence: `qshpython/pycallparm1.py`)
- Python call sample → Stdout results: writes parameters (evidence: `qshpython/pycallparm1.py`)
- PHP call sample → Stdout results: writes parameters (evidence: `qshphp/phpcallparm1.php`)
- IBM i caller → Parameterized SQL: invokes (evidence: `README.md`)
- IBM i caller → SQL source commands: invokes (evidence: `README.md`)
- IBM i caller → Query commands: invokes (evidence: `README.md`)
- Parameterized SQL → IBM i Db2: executes SQL (evidence: `README.md`)
- SQL source commands → IBM i Db2: executes SQL (evidence: `README.md`)
- Query commands → IBM i Db2: queries (evidence: `README.md`)
- IBM i caller → File transfer: invokes (evidence: `README.md`)
- IBM i caller → Save and restore: invokes (evidence: `README.md`)
- IBM i caller → IFS browsing: invokes (evidence: `README.md`)
- IBM i caller → Job logging: invokes (evidence: `README.md`)
