IBM Sterling Transformation Extender

 View Only
  • 1.  RESOURCELIB->FILEEXISTS()

    Posted Thu January 11, 2024 12:11 PM

    Hi,

    RESOURCELIB->FILEEXISTS()

    is this function really exists? i could see this function works with design studio but i am not able to find any details about this function in IBM documentation.

    Please share, if any one has any details about this function

    Thanks

    Santanu



    ------------------------------
    Santanu Baral
    ------------------------------


  • 2.  RE: RESOURCELIB->FILEEXISTS()

    Posted Fri January 12, 2024 12:10 PM

    I don't see it either.  However this function is very simple, you give the filename as input and returns a 0 or 1 if the file exists or not.  

    You can also open a support ticket to ask the documentation to be updated for all functions in the Resourcelib.



    ------------------------------
    Rex Chan
    ------------------------------



  • 3.  RE: RESOURCELIB->FILEEXISTS()

    Posted Fri January 12, 2024 01:04 PM

    I tested with ITX 10.1.1.  This is my rule:

    =NUMBERTOTEXT(resourcelib->FILEEXISTS("C:\WTX_10.1_Workspace\Test\SampleData.txt"))

    Since the file exists, it returns 1.

    The reason why I use NUMBERTOTEXT is because the function return a number (0 or 1) and my output type tree is defined as text.  If you define the output as Numeric, you don't need this extra function.

    I changed the file name to one that doesn't exist.

    =NUMBERTOTEXT(resourcelib->FILEEXISTS("C:\WTX_10.1_Workspace\Test\SampleData.dat"))

    It return 0.



    ------------------------------
    Rex Chan
    ------------------------------



  • 4.  RE: RESOURCELIB->FILEEXISTS()

    Posted Sun January 14, 2024 01:52 AM

    Thank you so much for your time



    ------------------------------
    Santanu Baral
    ------------------------------



  • 5.  RE: RESOURCELIB->FILEEXISTS()

    Posted Tue January 16, 2024 11:23 AM

    Just as an FYI, all of the mapping functions (including the resourcelib functions) have 'mini documentation' directly in the product user interface. This should provide you with the basics for using each. In Design Studio you get to this by right clicking in the rule bar and selecting INSERT FUNCTION from the list. Hope this helps. -Steph



    ------------------------------
    Stephanie Fetzer
    ------------------------------