# `Sp_Relation_Call_Rep` (procedure)


- **Type:** PROCEDURE
- **Deterministic:** NO
- **SQL data access:** CONTAINS SQL

## Parameters

| # | Mode | Name | Type |
|---|---|---|---|
| 1 | IN | `s_proName` | `varchar(255)` |
| 2 | IN | `s_proParam` | `varchar(4000)` |
| 3 | IN | `s_proOut` | `varchar(255)` |
| 4 | OUT | `sReturn` | `varchar(4000)` |

## Body

_Body is not pre-cached. To inspect: `mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE PROCEDURE `Sp_Relation_Call_Rep`'`._

## Narrative

**Business context:** Generic dynamic-call helper — given a target procedure name plus a delimited param string, builds and executes a CALL statement, then fetches a single OUT variable back. Intended to wrap legacy `Sp_*` procs into a uniform "report call by name" entry point.

**What it does:** Reads `information_schema.PARAMETERS` for `s_proName` (cursor over ORDINAL_POSITION), splits `s_proParam` by `;`, walks each parameter — for IN it splices the literal value into the CALL list, for OUT/INOUT it splices `@p_name`. Builds `CALL(p1,p2,...)` via `PREPARE`/`EXECUTE`/`DEALLOCATE`, then fires `SELECT ,@<s_proOut> INTO @p_sReturn` to extract the named OUT into `sReturn`.

**Invocation:** Status: appears orphaned. The body queries `information_schema.PARAMETERS` with `SPECIFIC_SCHEMA = 'xlyweberp'` hard-coded (not the saas multi-tenant schema), and no caller exists in `gdsmodule`, `gdsconfigformmaster`, other routines, or xly-src (only the install script `script/标版/30100101/Sp_Relation_Call_Rep.sql` ships it). Looks like a deprecated dispatcher superseded by `GenericProcedureCallServiceImpl` — candidate for maintainer audit.
