Skip to Content
avatar image
Former Member

want to pick old files first (First In First Out mode)

Hi,

My scenario is File to Idoc Scenario getting multiple files in batch mode into source FTP server. But i want to pick which file has first loaded into ftp server that particular file only i want to process first.

my source file name doesn't contain any Timestamp value . but by considering the FTP server timings we have to pick the file.

From the source I'm getting files like ( Jain_1.xml , Jain_2.xml ,Jain_3.xml.... ect...) so in my sender adapater i have mentioned that file name as Jain.xml*

For picking earliest file suggest me some solution.

for this how can achive this. and what are the things we have to do.

Regards

Jain

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    avatar image
    Former Member
    Feb 03, 2009 at 07:02 AM

    Hi Jain,

    Use Jain*.xml instead. It will pick it in order.

    jain* will substitue values for the * field and the appropriate files will be picked up.

    Best Regards,

    Kshitij

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Dear Sharma,

      Right now I'm using Jain*.xml only.. but my previous message some typing misteque it was displaying like that. But I have given Jain *.xml only . so it was picking files randomly . But for picking according to the files load time what we have to do.

      Regards

      Jain

  • avatar image
    Former Member
    Feb 03, 2009 at 07:15 AM

    Hi Jain,

    Found this for you.....this will definitely help..

    picking-files-in-order

    processing-of-files-in-a-particular-order

    Also Jain, just go to search option and search with the string "picking files in order". Im sure you will find a multitude of responses.

    Best Regards,

    Kshitij

    Edited by: Kshitij Sharma on Feb 3, 2009 8:17 AM

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Dear Sharma,

      Thanks for your spontenious response. But as you suggested a option of Sequence of processing option was in only for NFS. but I'm getting the files in FTP server so, in My Communication Channel Transport Protocol is : FTP... not the NFS.

      so, in the FTP case how can we do this...

      Plesae suggest me..

      Regards

      jain

  • avatar image
    Former Member
    Feb 03, 2009 at 08:03 AM

    Hi Jain,

    I havent exactly tried doing this one. I used file*.txt once but i didn't need it to pick in any order. My scenario had to pick all the files...

    but i found this for you.....

    File Adapter , Processing Sequence

    EDIT :

    picking-files-in-order

    Read the above link Jain. File adapter does not give a processing sequence for FTP protocol.

    But it reads files in alphabetical order. So you have 2 choices.

    1> Either use NFS to run your scenarios

    2> Else rename your files to Jain_a.xml, Jain_b.xml, Jain_c.xml. This way they will be in alphabetical order and hence will be picked in the order you want.

    If you want to rename your files dynamically at runtime. Look at the variable substitution concept.

    That can be found here...

    /people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i

    To learn more about it...just search with the string variable substitution in the forums and you will find answers.

    Best Regards,

    Kshitij

    Edited by: Kshitij Sharma on Feb 3, 2009 9:12 AM

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 10, 2009 at 06:34 AM

    Any Suggestions please.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 10, 2009 at 06:50 AM

    Hi Jain,

    May I know what have you done to resolve your Issue. Can you please share with us, what settings you have made in order to process the first file in FTP server.

    Regards,

    Varun

    Add comment
    10|10000 characters needed characters exceeded

    • Has any body got the solution for thie problem ?

      I am also reading the files from a FTP folder and having a problem of reading it in sequence.

      I want the oldest file in that folder to be read first and in sequence thereafter.

      Please suggest if there's any other ways/options to make this work

      Thanks and Regards,

      Amit Bhagwat