On 21-Jul-2016 11:03 -0500, John R. Smith, Jr. wrote:
Am I doing something wrong or does QSYS2.PARTITION_STATISTICS not
exist in 6.1?
The failing invocation and errors are not given [i.e. I do not know
what you are doing]. But, a typical issue for [that particular] UDF is
failing to use the required CHAR(10) typing for the two input arguments.
The SQL will by default, treat literals as VARCHAR, so literals would
need to be wrapped in a casting function such as the following, so the
type-matching allows for proper routine [aka function] resolution [the
process by which a compatible routine is found in the catalog]:
CHAR('LITERALVAL', 10)
Running the following query should be expected to produce the
[truncated] results shown, on a v6r1 system:
select
parmmode as mode
, char(parmname, 25) as parameter_name
, char(data_type, 9) as data_type
, dec(charlen, 5) as charlen
from sysroutines r
join sysparms p
using (specific_schema, specific_name)
where routine_schema = 'QSYS2'
and routine_name = 'PARTITION_STATISTICS'
order by parmno
; -- report output from above query:
....+....1....+....2....+....3....+....4....+....5...
MODE PARAMETER_NAME DATA_TYPE CHARLEN
IN SYSTEM_TABLE_SCHEMA CHARACTER 10
IN SYSTEM_TABLE_NAME CHARACTER 10
…
As an Amazon Associate we earn from qualifying purchases.