Managed File Transfer

 View Only
Expand all | Collapse all

Scheduling a file transfer dated yesterday

  • 1.  Scheduling a file transfer dated yesterday

    Posted Wed February 01, 2023 03:17 PM
    Hi all

    Firstly, I'm pretty new to this, so please be gentle with me! :-)

    I'm trying to set up Connect Direct to deliver some files, on a daily basis, with the filename containing yesterdays date.

    So, running at 05:00, transferring daily_report_YYYYMMDD.csv where YYYYMMDD is yesterday.

    I was wondering if anyone had any tips/experience with this and might be able to point me in the right direction?

    We used to have an internally written VB app that managed all this, but instead of rewriting it, I was hoping Connect Direct might have the ability to do that?

    Thanks

    Daniel

    ------------------------------
    Daniel Dickinson
    ------------------------------

    #DataExchange
    #filetransfer


  • 2.  RE: Scheduling a file transfer dated yesterday

    Posted Mon February 06, 2023 04:06 PM
    Hi,

    I would create a batch file and use the OS scheduler to have it executed on a daily bases at 05:00. The batch file calculates yesterday's date in YYYYMMDD format, builds the submit command line accordingly and executes it through the Connect:Direct CLI.


    Assuming %YESTERDAY% contains the calculated date, build your submit command with a symbolic variable for the source file (&SRCFILE), like
    submit file=myproc.cdp &SRCFILE="daily_report_%YESTERDAY%.csv";
    Specify &SRCFILE on the COPY step in your CD process, like
    COPY FROM (FILE="&SRCFILE")



    ------------------------------
    Volker Friedrich
    ------------------------------