Topic
  • 6 replies
  • Latest Post - ‏2014-12-16T18:34:07Z by NickLawrence
tadpole
tadpole
3 Posts

Pinned topic GET_XML_FILE not corretly picking up source from iASP

‏2013-09-25T23:02:39Z |

I am trying to use the GET_XML_FILE to get a source file member from within the iasp.

It seems that the GET_XML_FILE can only get members that exist in *SYSBAS..

Is there a way to select the iasp to use before the GET_XML_FILE is used..

statement being used is as follows and works correctly if the lib/file(member) is in *SYSBAS (i.e QGPL)

SELECT XMLPARSE(DOCUMENT GET_XML_FILE('*libl/qxmlsrc( mystest)))     

         INTO :#XMLCLOB                       

         FROM SYSIBM.SYSDUMMY1;   

  • NickLawrence
    NickLawrence
    69 Posts

    Re: GET_XML_FILE not corretly picking up source from iASP

    ‏2013-09-26T16:52:51Z  

    *LIBL is not documented as a supported way to use the library list to locate the file in the info center.

    Most of the time GET_XML_FILE is used to retrieve stream files from the integrated file system, however the library/file(mbr) syntax to retrieve an XML document from a source physical file member should also work.

    If you are having problems when an explicit library name is provided, I would suggest that you open a PMR with support so that we can look into the problem in detail.

    For your specific example, I think you would be better off using an XML file reference variable to retrieve the XML document.  There are some examples of how to do that in this whitepaper: https://www-304.ibm.com/partnerworld/wps/servlet/download/DownloadServlet?id=K$63TzTFkZwiPCA$cnt&attachmentName=Replacing_xml_extender.pdf&token=MTM4MDIxMjUyODgwOQ==&locale=en_ALL_ZZ

    For embedded SQL, an XML file reference variable should simplify the code, but you will need to use the IFS syntax to address the file. For example if the IASP is named "iasp1" and the source physical file and member would be specified as mylib/myfile(mymbr) the path would be
    /IASP1/QSYS.LIB/MYLIB.LIB/MYFILE.FILE/MYMBR.MBR

  • tadpole
    tadpole
    3 Posts

    Re: GET_XML_FILE not corretly picking up source from iASP

    ‏2013-09-26T23:58:11Z  

    *LIBL is not documented as a supported way to use the library list to locate the file in the info center.

    Most of the time GET_XML_FILE is used to retrieve stream files from the integrated file system, however the library/file(mbr) syntax to retrieve an XML document from a source physical file member should also work.

    If you are having problems when an explicit library name is provided, I would suggest that you open a PMR with support so that we can look into the problem in detail.

    For your specific example, I think you would be better off using an XML file reference variable to retrieve the XML document.  There are some examples of how to do that in this whitepaper: https://www-304.ibm.com/partnerworld/wps/servlet/download/DownloadServlet?id=K$63TzTFkZwiPCA$cnt&attachmentName=Replacing_xml_extender.pdf&token=MTM4MDIxMjUyODgwOQ==&locale=en_ALL_ZZ

    For embedded SQL, an XML file reference variable should simplify the code, but you will need to use the IFS syntax to address the file. For example if the IASP is named "iasp1" and the source physical file and member would be specified as mylib/myfile(mymbr) the path would be
    /IASP1/QSYS.LIB/MYLIB.LIB/MYFILE.FILE/MYMBR.MBR

    HI Nick,

    Thanks for the reply, my testing has shown the following.

    This does not work                /IASP1/QSYS.LIB/MYLIB.LIB/MYFILE.FILE/MYMBR.MBR

    This does not work               /QSYS.LIB/QGPL.LIB/MYFILE.FILE/MYMBR.MBR

    This does work                     QGPL/MYFILE(MYMBR)

    This does not work              MYLIB/MYFILE(MYMBR)  Please note that this is in my iASP

    How doe I create a PMR with support so that we can look into the problem in detail.

  • NickLawrence
    NickLawrence
    69 Posts

    Re: GET_XML_FILE not corretly picking up source from iASP

    ‏2013-09-27T15:22:24Z  
    • tadpole
    • ‏2013-09-26T23:58:11Z

    HI Nick,

    Thanks for the reply, my testing has shown the following.

    This does not work                /IASP1/QSYS.LIB/MYLIB.LIB/MYFILE.FILE/MYMBR.MBR

    This does not work               /QSYS.LIB/QGPL.LIB/MYFILE.FILE/MYMBR.MBR

    This does work                     QGPL/MYFILE(MYMBR)

    This does not work              MYLIB/MYFILE(MYMBR)  Please note that this is in my iASP

    How doe I create a PMR with support so that we can look into the problem in detail.

    Your IBM representative or business partner should be able to help you contact IBM support. We are aware of this problem and are working on a fix, however opening a PMR ensures that you get notified when a fix is available, and that the problem is correctly prioritized by IBM.

  • tadpole
    tadpole
    3 Posts

    Re: GET_XML_FILE not corretly picking up source from iASP

    ‏2014-12-16T03:49:32Z  

    Your IBM representative or business partner should be able to help you contact IBM support. We are aware of this problem and are working on a fix, however opening a PMR ensures that you get notified when a fix is available, and that the problem is correctly prioritized by IBM.

    How goes it Nick, has this been fixed in TR7?

  • B.Hauser
    B.Hauser
    282 Posts

    Re: GET_XML_FILE not corretly picking up source from iASP

    ‏2014-12-16T07:20:16Z  
    • tadpole
    • ‏2013-09-26T23:58:11Z

    HI Nick,

    Thanks for the reply, my testing has shown the following.

    This does not work                /IASP1/QSYS.LIB/MYLIB.LIB/MYFILE.FILE/MYMBR.MBR

    This does not work               /QSYS.LIB/QGPL.LIB/MYFILE.FILE/MYMBR.MBR

    This does work                     QGPL/MYFILE(MYMBR)

    This does not work              MYLIB/MYFILE(MYMBR)  Please note that this is in my iASP

    How doe I create a PMR with support so that we can look into the problem in detail.

    Just a question:

    What naming conventions (*SYSTEM or *SQL) are used in the environment where you execute the GET_XML_FILE function?

    Birgitta

  • NickLawrence
    NickLawrence
    69 Posts

    Re: GET_XML_FILE not corretly picking up source from iASP

    ‏2014-12-16T18:34:07Z  
    • B.Hauser
    • ‏2014-12-16T07:20:16Z

    Just a question:

    What naming conventions (*SYSTEM or *SQL) are used in the environment where you execute the GET_XML_FILE function?

    Birgitta

    The fix should be in the latest DB fix packs.

     

    The naming convention for SQL doesn't affect the name format for the function's parameters. In addition, adopted authority is not honored for most physical file systems in the Integrated File System (which generally uses a POSIX authority model).

     

    The intention is to provide access to non-DB2 data.