IC5Notice: We have upgraded developerWorks Community to the latest version of IBM Connections. For more information, read our upgrade FAQ.
Topic
  • 2 replies
  • Latest Post - ‏2014-07-31T14:39:12Z by MattMar
Holgi1
Holgi1
1 Post

Pinned topic Can a DXL call other dxl files?

‏2014-07-25T08:58:53Z |

Hello,

I have a lot of differt  dxl files witch I must call very offten.

Is it possible that I call from one dxl - file more other dxl- files?

Other possibility is that I call a at the end of a dxl file the next one.

Is this also possible?

In both cases are the resultfiles independent from each other

Holgi

 

  • Tony_Goodman
    Tony_Goodman
    270 Posts

    Re: Can a DXL call other dxl files?

    ‏2014-07-25T09:16:10Z  

    You don't call other dxl files, rather you call funtions contained in other dxl files.

    Place your commonly used functions in *.inc files and #include those files in your main DXL script.

    Tony

  • MattMar
    MattMar
    8 Posts

    Re: Can a DXL call other dxl files?

    ‏2014-07-31T14:39:12Z  

    Hello,

    The anwser given by Tony_Goodman is the best and nicer way to do what you want. I would add that a call to the #include directive will act exactly as if you had copy/pasted your included file instead. No real subtility here, you can include whatever file you want anywhere in your DXL file, if your included file contains DXL code, it will be called.

    So, small example,

    If you have a file with the following content:

    "ok"

    you can execute the following code:

    print #include <the_above_file>

    and it will works (print "ok").

     

    Regards,

    Arnaud

    Updated on 2014-07-31T14:42:35Z at 2014-07-31T14:42:35Z by MattMar