|
On 21-Mar-2012 09:06 , Victor Hunt wrote:
I am searching our system (7.1) for files with specific text in the
file description. In the past I have used the QADBXREF file for this
purpose. I noticed today that some files in QADBXREF have no file
text in any of the obvious file text fields (DBXTXT, DBXREM,
DBXTXT2). When I use the WRKF command I see file descriptions for the
files I'm interested in that are blank in QADBXREF. It is my
understanding that the QADBXREF file has all file related information
in it. I assume that file description text is stored somewhere else.
Where might the file text descriptions be located?
DBXTXT2? On v7r1 be sure to avoid CCSID(*HEX) for the job, because
the "text" fields are since changed to the data type GRAPHIC with
CCSID(1200) for which CCSID translation is a requirement to view the data.
Note: The database file object stores the TEXT() description from
when the object was originally created [TEXT Qdbfhtxt and CCSID Qdbftcid
per QDBRTVFD API] and that is re-represented [a copy] in the Object
Information Record [OIR] for the *FILE.
Perform the following script to verify the DBXTXT in the database
cross-reference physical file QADBXREF in QSYS:
dspfd TheLib/*ALL *BASATR *OUTFILE FILEATR(*LF *PF *DDMF)
OUTFILE(QTEMP/FDBASATR)
with x as /* Assumes one library only, for the DSPFD */
(select dbxfil
, case when dbxatr='AL' then 'DDMF' else dbxatr end dbxatr
, case when dbxatr='AL' then 'N' else dbxrel end dbxrel
, dbxtyp, dbxtxt
from qsys/qadbxref /* qsys/qadbxlfi for usr w/o *allobj */
where dbxlib=(select distinct atlib from qtemp/fdbasatr) )
SELECT atfile fn, dbxfil xn
, atfatr fa, dbxatr xa, atftyp tp
, atdtat fd, dbxtyp xd
, atfls fx, dbxrel xx
, attxt ft, dbxtxt xt
FROM qtemp/fdbasatr left outer join X
on atfile=dbxfil
WHERE atdtat<>dbxtyp
or (atfls<>dbxrel and atnofm=1)
or attxt<>dbxtxt /* Most notably */
or dbxfil is null
FWiW if there are no differences, a similar query after the request
to DSPOBJD TheLib/*ALL *FILE *FULL OUPUT(*OUTFILE) OUTFILE(qtemp/od)
could be used to generate the OIR text instead; presumably what is shown
in WRKF.
Regards, Chuck
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.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 on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.