Managed File Transfer

 View Only
  • 1.  calculate date for consumer file name

    Posted Mon October 08, 2018 03:34 PM
    ​We have a need to calculate a date for the consumer file based on the run date of the channel that is picking up the file. For example, if the file is picked up October 3, the date as part of the file name needs to be the last day of the previous month (i.e. September 30). I understand this would have to be done with a BP which we do not have for this. Any help would be appreciated on how to write a BP process to accomplish our goal.

    ------------------------------
    Lisa Bush
    ------------------------------

    #DataExchange
    #filetransfer


  • 2.  RE: calculate date for consumer file name

    Posted Tue October 09, 2018 04:13 AM
    Hi Lisa,

    You can use the Timestamp Utility service: https://www.ibm.com/support/knowledgecenter/en/SS3JSW_6.0.0/integrating/integrating/integrator/Timestamp_Utility_svc.html

    For example use the Timestamp Current Time function to get the current month e.g. set format to yyyyMM, then use the XPATH concat() function to append 01 to pass that in as baseTime to the Timestamp subtract function to get the date of the last day of the previous month (baseTimeFormat and format = yyyyMMdd, offsetTime = 1 and scale = day).

    You can then use the concat function again on ASSIGN to append that to the filename (maybe combined with using the substring functions to insert it in the appropriate position e.g. before any extension).

    ------------------------------
    RICHARD CROSS
    ------------------------------