On 29 Aug 2013 17:04, TadPole wrote:
> On 29 Aug 2013 15:52, TadPole wrote:
>
>> On 8/28/13 11:28 PM, TadPole wrote:
>>
>>> <<SNIP>>
>>>
>>> exec sql
>>> SELECT XMLPARSE(DOCUMENT GET_XML_FILE('*libl/qxmlsrc(mystest)',1))
>>> INTO :#XMLCLOB
>>> FROM SYSIBM.SYSDUMMY1;
>>>
>>> but I keep on getting an error as it cannot find the file, any
>>> ideas? By the way I have commitment control on.
> It is because it does not recognize the ASP that the lib is on, if
> I use QGPL it works ok, will post correction of code later.
Yes. That error indicated that the query was running in the iASP
identified with the 033. I expect... the file that is named, must be in
the same iASP group in which the query request is made [of the file
SYSDUMMY1 in SYSIB00033], or the file must be in the *SYSBAS [e.g. in
QGPL, as noted, functions].
Another possibility, if available [although apparently not allowed in
the context for naming the source file], the three-part naming could be
utilized for a database file. That is, the following request which asks
to query the file from the iASP database, thus the source file name
residing there should be found [or so I expect]:
exec sql
SELECT XMLPARSE(DOCUMENT GET_XML_FILE('*libl/qxmlsrc(mystest)'))
INTO :#XMLCLOB
FROM iASPrdb.SYSIBM.SYSDUMMY1;
Reminder: Recall that "For a source physical file, the string must be
in the form 'library/file(member)'" [regardless I had alluded to using
instead: '/qsys.lib/libname.lib/filename.file/mbrname.mbr']. Given the
name is delimited by apostrophes, apparently the case of the name should
be respected, so 'qgpl/qxmlsrc(mystest)' should probably be specified as
'QGPL/QXMLSRC(MYSTEST)'. If the SQL is accepting the lower-case, and
forcing that name as input to upper-case, that may function only due to
a defect; it depends on whether the mixed-case specification
'QGPL/"MyFile"("SrcTest")' also works as expected. Also the second
argument seemed to have no corresponding parameter... thus why the ",1"
was removed in my revision of the from-clause of the SELECT statement
directing to the RDB that defines the iASP.
--
Regards, Chuck