MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » September 2013

Re: UDTF (or similar) to retrieve data from SYSPARTITIONSTAT



fixed

To add to this reply, the SYSPSTAT is a join defined as here -

FROM QSYS.QADBXREF A, LATERAL (SELECT * FROM
TABLE (QSYS2.PARTITION_STATISTICS(A.DBXLIB, A.DBXFIL) )

Vern

On 9/25/2013 2:20 AM, CRPence wrote:
On 24 Sep 2013 10:24, Robert Clay wrote:
<<SNIP>>
AFaIK the SYSPSTAT catalog VIEW is implemented using a UDTF, so just
creating a similar VIEW with whatever additional information should
suffice. No reason to introduce an additional layer of redirection by
using a VIEW of the VIEW of the UDTF, just define a VIEW to directly
inquire of the UDTF in a table reference.

As for DSPOBJD output file... the *MDY ODCDAT has an associated
ODCCEN [documented as having char(1) values for: "Creation century:
0=19xx, 1=20xx"]. My replies in the thread for the following message
might be of interest [e.g. for the UDFs objd_dt and objd_ts]:
Subject: SQL extracts of a DSPOBJD *outfile - dates
http://archive.midrange.com/midrange-l/201212/msg01112.html

However I would not use Display Object Description. The Display File
Description (DSPFD) could suffice, and is better per its ability to
subset the list to the specific types of files per its FILEATR(); the
record format QWHFDPHY for model file QAFDPHY used for lists of
TYPE(*ATR) FILEATR(*PF) has a *YMD column, again with a separate century
indicator. Yet given the intention is merely to obtain just one column,
i.e. the creation date, then perhaps just create a UDF to get a date or
char scalar from the object vs obtaining that from a [previously
populated] table with a JOIN; e.g. using the RTVOBJD for its CRTDATE()
value.







Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact